Cancel order by Id

This method allows you to can­cel select­ed order, which was pre­vi­ous­ly cre­at­ed by any com­pa­ny employ­ee. To be can­celled, order must be active.

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • End­point: /ext/orders-api/v1/orders-created/{orderId}/cancel
  • 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.

Available reasons for cancellation

For shippers and forwarders (orders-created):

  • contractor_did_not_obey_arrangements
  • oth­er
  • out_of_stock
  • otherwise_transported
  • contractor_tried_to_change_arrangements

For carriers and forwarders (orders-received):

  • no_car
  • no_driver
  • contractor_tried_to_change_arrangements
  • contractor_did_not_obey_arrangements
  • oth­er

Example

Sam­ple Json for can­cel order by Id using required data only

{
  "reasons": [
    "other"
  ],
  "explanation": "Example explanation"
}

Response

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