After creating an order you can add an attachment to it (option available for not cancelled orders only).
Adding an attachment takes two steps – uploading a file and adding it to a specific order.

Authorization and access

Authorization process is described here. Each API request must also consist of unique Api-key obtained during application registration together with client_id and client_secret.

For accessing freights API no additional scopes are set, therefore the scope parameter can be left empty.

Headers

  • Accept: application/json
  • Content-type: application/json
  • Authorization: Bearer {access_token}
  • Api-key: {unique_app_api-key}

Available file types

  • JPG, GIF, PNG, BMP, PDF, ODT, DOC, TXT, DOCX, TIFF, ODS, XLS, XLSX, PPT, RTF

Uploading file url parameters

  • URL: https://api.platform.trans.eu
  • Endpoint: /ext/media-storage-api/v1/assets
  • Http Method: PUT

File should be send in request body.

Json response example

{"id": "eb6bd829-0794-4553-8d8f-7f000ea76d15",
"path": "https://service.media-storage.query/v1/assets/eb6bd829-0794-4553-8d8f-7f000ea76d15",
    "ttl": {},
    "file": {},
        "image": {}
    }
}

Adding file to an order url parameters

  • URL: https://api.platform.trans.eu
  • Endpoint: /orders-api/v1/orders/:orderId/attachments
  • Http Method: POST

 

Description of fields:

Name Type Example Description
media_id
string eb6bd829-0794-4553-8d8f-7f000ea76d15 Id of previously uploaded file
media_name
string Media name File name
description
string Documentation File description (maximum 200 characters)
type_id
string Waybill One of the following: waybill, transport_order, cession_scan, cargo_photo, invoice_scan, cmr, other
visible_to_contractor Boolean True Defines if file should be visible to contractor

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

{}