Upload a file
https://carchost.fieldcontrol.com.br/uploadsFirst step to attach a file: returns the endpoint and the fields (form) to send the file in multipart/form-data. After the upload, attach the file to the order in Attach a file to the order, using the URL of the uploaded file in path.
Requires the
X-Api-Key,User-AgentandContent-Type: application/jsonheaders. Limit: 1 request per second (learn more).
Request
Headers
User-AgentstringrequiredIdentification of your application.
Example: MinhaIntegracao/1.0.
Request body
JSON, sent with the Content-Type: application/json header.
entityTypestringrequiredWhere the file will be attached. Currently only order.
Accepted values: order.At least 2 characters.
entityIdstringrequiredWork order identifier.
titlestringrequiredFile name, with extension: .pdf, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .jpg, .jpeg, .heic, .webp, .png, .mp4, .avi, .mov, .kml, .txt, .csv, .xml or .zip.
At least 2 characters.
typestringrequiredMIME type of the file (e.g. application/pdf, image/jpeg, video/mp4).
sizenumberrequiredSize in bytes, up to 50 MB.
From 0 to 52428800.
Responses
- 201
Upload data, valid for 20 minutes.
- 401
API key missing (
Missing API Key) or invalid (Invalid API Key). See Authentication. - 403
Account blocked (
Account blocked), expired (Account expired) or on a plan that does not allow integration (Account plan not allowed). See Authentication. - 422
Invalid body (resourceValidationErr):
entityTypeother thanorder, invalid order, extension or type not accepted, or file larger than 50 MB. - 429
Limit of 1 request per second exceeded. See Rate limit.
- 500
Unexpected server error.