Order attachments

After cre­at­ing an order you can add an attach­ment to it (option avail­able for not can­celled orders only).
Adding an attach­ment takes two steps — upload­ing a file and adding it to a spe­cif­ic order.
You can also down­load a file attached to an order.

Authorization and access

Autho­riza­tion process is described here. Each API request must also con­sist of unique Api-key obtained dur­ing appli­ca­tion reg­is­tra­tion togeth­er with client_id and client_secret.

Adding file to an order url parameters

  • URL: https://api.platform.trans.eu
  • End­point: /orders-api/v1/orders/{orderId}/attachments
  • Http Method: POST

Description of fields:

NameTypeExam­pleDescrip­tion
media_id
stringeb6bd829-0794–4553-8d8f-7f000ea76d15Id of pre­vi­ous­ly uploaded file
media_name
stringMedia nameFile name
descrip­tion
stringDoc­u­men­ta­tionFile descrip­tion (max­i­mum 200 char­ac­ters)
type_id
stringWay­billOne of the fol­low­ing: way­bill, transport_order, cession_scan, cargo_photo, invoice_scan, cmr, oth­er
visible_to_contractorBooleanTrueDefines if file should be vis­i­ble to con­trac­tor

Json example

{
  "media_id": "eb6bd829-0794-4553-8d8f-7f000ea76d15",
  "media_name": "Media name",
  "description": "Documentation",
  "type_id": "Waybill",
  "visible_to_contractor": true
}

Json response example

{}

Downloading file from an order

In order to down­load an attach­ment you have to give media_id which you’ll find in attach­ments object.

Delete attachement of an order

  • URL: https://api.platform.trans.eu
  • End­point: /orders-api/v1/orders/:orderId/attachments/:attachmentId
  • Http Method: DELETE

Response

Response for prop­er­ly giv­en freight id is Http code 204 with no response con­tent.