UploadAttachment
Uploads a file attachment to QuickBooks Online, associating it with a transaction or record for supporting documentation.
Input
| Name | Type | Description |
| FilePath | String | The full file path, including the file name, that is to be uploaded as an attachment. This path is required when you want the stored procedure to read the file directly from the file system. |
| FileName | String | The name of the file that is to be attached. This name is required if the FilePath parameter is not defined and you are supplying the file content separately. |
| ContentType | String | The content type of the file to upload (for example, image/jpeg for a JPEG image). This field is required to correctly handle and store the file. |
| Category | String | The category that is assigned to this attachment. This field is optional and can be used to classify attachments into groups. |
| Lat | String | The latitude coordinate of the location from which the attachment was requested or created. This field is optional and can be used for geotagging. |
| Long | String | The longitude coordinate of the location from which the attachment was requested or created. This field is optional and can be used for geotagging. |
| PlaceName | String | The name of the place from which the attachment was requested or created. This field is optional and can be used for geotagging. |
| Note | String | A note that is either related to the attachment or stored as a standalone note. This field is optional. |
| Tag | String | A tag name that is assigned to the requested attachment. This field is optional and can be used for categorization or search. |
| AttachableRef_EntityRef_Value | String | The unique identifier (Id) of the object to which the file is to be attached (for example, 129). This field is optional. |
| AttachableRef_EntityRef_Type | String | The type of the object to which the file is to be attached (for example, Bill). This field is required if the AttachableRef_EntityRef_Value parameter is set. |
Result Set Columns
| Name | Type | Description |
| Id | String | The unique Id that QuickBooks Online assigns to the newly created attachment. This Id is used to reference the attachment programmatically. |
| AttachableRef_EntityRef_Value | String | The unique Id of the object to which this attachment is linked. This field confirms the association created by the stored procedure. |
| AttachableRef_EntityRef_Type | String | The type of the object to which this attachment is linked (for example, Bill or Invoice). This field confirms the association that is created by the stored procedure. |
| AttachableRef_IncludeOnSend | String | Indicates whether this attachment should be included automatically when the associated object is emailed or sent from QuickBooks Online. |
| ContentType | String | The content type of the uploaded file (for example, image/jpeg for a JPEG image). |
| Category | String | The category that QuickBooks Online has stored for this attachment. |
| Lat | String | The latitude coordinate of the location from which the attachment was uploaded or recorded. |
| Long | String | The longitude coordinate of the location from which the attachment was uploaded or recorded. |
| PlaceName | String | The name of the place from which the attachment was uploaded or recorded. |
| Note | String | A note that is related to the attachment or stored as a standalone note as saved in QuickBooks Online. |
| Tag | String | The tag name that QuickBooks Online has stored for this attachment. |
| FileAccessUri | String | The permanent Uniform Resource Identifier (URI) that can be used to access or download this attachment from QuickBooks Online. |
| FileName | String | The file name of the uploaded attachment as stored in QuickBooks Online. |
| Metadata_CreateTime | String | The date and time stamp (Coordinated Universal Time) for when QuickBooks Online created this attachment record. |
| Metadata_LastUpdatedTime | String | The date and time stamp (Coordinated Universal Time) forwhen this attachment record was last modified in QuickBooks Online. |
| Size | String | The size of the uploaded attachment in bytes as stored in QuickBooks Online. |
| SyncToken | String | The version control token for this attachment record that is used to prevent conflicting updates. QuickBooks Online increments this token each time the record is modified. |
| TempDownloadUri | String | The temporary URI that can be used to directly download this attachment by clients. This link typically expires after a limited time. |
| Result | String | The result message that is returned by the stored procedure after attempting to upload or link the attachment. This message indicates whether the operation succeeded or failed. |
| FileData | String | The Base64-encoded data of the file that QuickBooks Online returns if the FilePath parameter is not defined and file content must be read directly. This field allows you to retrieve the attachment as encoded data instead of via a URI. |