Skip to main content

Upload a file

POSThttps://carchost.fieldcontrol.com.br/uploads

First 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-Agent and Content-Type: application/json headers. Limit: 1 request per second (learn more).

Request​

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

JSON, sent with the Content-Type: application/json header.

entityTypestringrequired

Where the file will be attached. Currently only order.

Accepted values: order.At least 2 characters.

entityIdstringrequired

Work order identifier.

titlestringrequired

File 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.

typestringrequired

MIME type of the file (e.g. application/pdf, image/jpeg, video/mp4).

sizenumberrequired

Size 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): entityType other than order, 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.