Add invoice for transport document to an order

This method allows to add invoice scan with basic invoice data to an exist­ing order. Method avail­able for car­ri­ers and for­warders in car­ri­er role. Invoice file must be uploaded first.

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • End­point: /ext/orders-api/v1/orders/{order-Id}/invoice
  • Method: POST

Headers

  • Con­tent-type: application/json
  • Accept: application/json
  • Autho­riza­tion: Bear­er {access_token}
  • Api-key: {unique_ap­p_api-key}

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.

Structure of adding an invoice

JsonExam­pleTypeIs requiredDescrip­tion
invoice_dataObjectYesInvoice data
invoice_number13/12/1234StringYesInvoice num­ber
invoice_issuance_date2021-12-13StringYesInvoice issuance date
sales_date2021-12-13StringYesSales date
net_value1230FloatYesNet val­ue
cur­ren­cyPLNStringYesCur­ren­cy
payment_due_date2021-12-20StringYesPay­ment term (date)
payment_offset_days7IntYesPay­ment term (days)
gross_value1512.90FloatNoGross val­ue
tax_value23IntNoVat type (must be one of fol­low­ing — 0,5,8,23)
media_nameInvoiceStringYesAttach­ment name
media_id72d71c93-355b-4119–9c5d-2460f368297b,StringYesMedia id (returned after upload­ing a file)
visible_to_contractorTrueBooleanYesInvoice vis­i­ble to con­trac­tor
descrip­tionExam­ple descrip­tionStringYesFile descrip­tion

Example Json

{
  "invoice_data": {
    "invoice_number": "13/12/1234",
    "invoice_issuance_date": "2021-12-13",
    "sales_date": "2021-12-13",
    "net_value": 1230,
    "currency": "pln",
    "payment_due_date": "2021-12-20",
    "payment_offset_days": 7,
    "gross_value": 1512.9,
    "tax_value": 23
  },
  "media_name": "invoice",
  "media_id": "72d71c93-355b-4119-9c5d-2460f368297b",
  "visible_to_contractor": true,
  "description": "Example description"
}