Add an attachment to a sales order
Add a new attachment to a specific sales order. The filename should be specified in the Content-Disposition
header, and the Content-Type
header must reflect the MIME type of the attachment being uploaded. The file itself should be included in the request body, and should be less than 4 MB in size.
application/pdf
POST
/salesorders/{id}/attachments
cURL (application/pdf)
curl \
--request POST 'https://rest.api.24sevenoffice.com/v1/salesorders/{id}/attachments' \
--header "Content-Disposition: filename="attachment.pdf"" \
--header "Content-Type: application/pdf" \
--header "Authorization: string" \
--data-binary '@file'
curl \
--request POST 'https://rest.api.24sevenoffice.com/v1/salesorders/{id}/attachments' \
--header "Content-Disposition: filename="attachment.pdf"" \
--header "Content-Type: application/pdf" \
--header "Authorization: string" \
--data-binary '@file'
curl \
--request POST 'https://rest.api.24sevenoffice.com/v1/salesorders/{id}/attachments' \
--header "Content-Disposition: filename="attachment.pdf"" \
--header "Content-Type: application/pdf" \
--header "Authorization: string"
Response examples (201)
# Headers
Access-Control-Allow-Origin: string
Access-Control-Allow-Credentials: string
X-Trace-Id: string
# Payload
{
"fileId": "file-1234567890",
"orderId": 1234,
"fileName": "attachment.pdf",
"mediaType": "application/pdf",
"size": 2048000,
"timestamp": "2023-06-01T12:00:00Z",
"tags": [
"invoice",
"urgent"
]
}