Skip to main content

Attach a file to the order

POSThttps://carchost.fieldcontrol.com.br/orders/{id}/attachments

Attaches an already uploaded file to a work order. The success response uses status 200.

Requires the X-Api-Key, User-Agent and Content-Type: application/json headers. Limit: 1 request per second (learn more).

Request​

Path parameters

idstringrequired

Work order identifier.

Example: NDJiMWQ0YzQtOWNmOC00NWE2LTg2MjItYjNjNzZjZjk0MmM4OjIyOTE1.

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

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

pathstringrequired

File URL.

At least 5 characters.

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.

sizenumberrequired

Size in bytes, up to 50 MB.

From 0 to 52428800.

typestringrequired

MIME type, for example application/pdf, image/jpeg, image/png, video/mp4, text/csv or application/zip. Videos stay in processing until compression finishes.

Responses

  • 200

    Attachment created.

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

  • 404

    Resource not found. The response body is empty.

  • 422

    Invalid body (resourceValidationErr): title extension or type not accepted, or size larger than 50 MB. Invalid order identifier: uriValidationErr.

  • 429

    Limit of 1 request per second exceeded. See Rate limit.

  • 500

    Unexpected server error.