Add Attachments
This service allows you to POST attachments to BigChange, which can be associated with a selected entity type.
Query String Parameters
Name | Type | Description | Required |
---|---|---|---|
Action | String | AddAttachments | Required |
EntityType | Int | Entity type of the item you want to attach the file to. | Required |
EntityId | Int | Id of the entity you’d like to associate the file attachment. This must match the entity type. For example, if you select entity type 1, then the entity id MUST be a JobId. | Required |
RollBackOnFailedAttachment | Bool | If true, operation will be rolled back if any unsafe file is detected or any PDF conversion fails. | Optional |
Post Body Parameters
Name | Type | Description | Note |
---|---|---|---|
Files | Multipart MIME format | ||
Attachments | Json object | See Note. | Example |
note
Attachments
A serialised string containing details of the file uploaded with the following variables:
- String Filename
- String Type
- Bool ConvertToPdf
- Bool Compressed
Example:
[
{
"Filename": "20190424_155521.jpg",
"Type": "image/jpg",
"ConvertToPdf": false,
"Compressed": false
}
]
Response Codes
Example
- Request
- Response
Request URL
https://webservice.bigchange.com/v01/services.ashx?action=AddAttachments&EntityType=1&EntityId=1262001
Response Data
{ "Code": 0 }