Changing terms of the order after their acceptance

Description

This method allows you to to change the con­di­tions in an accept­ed trans­port order. This is a key func­tion­al­i­ty for logis­tics and trans­port com­pa­nies that often have to react to dynam­ic changes in trans­port plans – such as cor­rec­tions to address­es, dates, loading/unloading times, or pay­ment terms.

Con­di­tions that we can change:

  • loads (can be send as emp­ty array)
  • shipment_external_id
  • oper­a­tions
  • spots
  • pay­ment
  • require­ments

After such oper­a­tion car­ri­er will be able to accept order terms.

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • End­point: /ext/orders-api/v2/{OrderId}/amendment/draft
  • 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.

Update order request

Exam­ple of request for chang­ing terms.

{
    "freight": {
        "loads": [],
        "requirements": {
            "transport": {
                "type": "ltl"
            }
        },
        "shipment_external_id": "123",
        "spots": [
            {
                "spot_order": 1,
                "place": {
                    "address": {
                        "locality": "Kraków",
                        "postal_code": "31-001",
                        "country": "PL"
                    }
                },
                "operations": [
                    {
                        "operation_order": 1,
                        "loads": [],
                        "type": "loading",
                        "timespans": {
                            "begin": "2025-01-22T13:00:00+0200",
                            "end": "2025-01-22T14:00:00+0200"
                        }
                    }
                ]
            },
            {
                "spot_order": 2,
                "place": {
                    "address": {
                        "locality": "Dąbrowa Środkowa",
                        "postal_code": "59-330",
                        "country": "PL"
                    }
                },
                "operations": [
                    {
                        "type": "unloading",
                        "operation_order": 1,
                        "loads": [],
                        "timespans": {
                            "begin": "2025-01-23T11:00:00+0200",
                            "end": "2025-01-23T11:00:00+0200"
                        }
                    }
                ]
            }
        ]
    },
    "additional_terms": "string",
    "payment": {
        "days": 12,
        "price": {
            "value": 999999,
            "currency": "pln"
        }
    }
}

Response

{
    "_links": {
        "self": {
            "href": "https://service.freight-orders.query:80/api/rest/v1/orders/5f932ac1-6d3e-4cff-b3d4-2357df4e938a/amendment-drafts"
        }
    },
    "id": "df256b9f-ff3c-46e5-8054-a0ded4e3503d"
}