Order additional costs — add, remove, update

After cre­at­ing a trans­port order, you can add, remove and update addi­tion­al costs. Option avail­able only with fin­ished trans­port orders for users with DOE (Dig­i­tal Order Exe­cu­tion) prod­uct.

JsonExam­pleTypeIs requiredDescrip­tion
cat­e­go­ry
oth­er-pay­ments
StringYesThe type of cost. The cat­e­go­ry can have the fol­low­ing val­ues:
- con­trac­tu­al-penal­ty,
- com­pen­sa­tion,
- oth­er-pay­ments
nameexample_nameStringYesAny name to iden­ti­fy the addi­tion­al cost
price-ObjectYesOne of the price val­ues must be select­ed
price.value1234IntYes / NoVal­ue spec­i­fied in the cur­ren­cy of the trans­port order
price.percentage102IntYes /NoPer­cent­age of the order val­ue
settlement_methoddeb­it-noteStringYesMethod of cost set­tle­ment. The settlement_method can have the fol­low­ing val­ues:
- sep­a­rate-item-on-invoice
- includ­ed-in-freight-price
- deb­it-note
descrip­tionexample_descriptionStringNoAddi­tion­al cost con­sid­er­a­tions

Adding costs

Url parameters and connection settings

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

Headers:

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

Authorization

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.

Request

Sam­ple of response for adding costs.

[
  {
    "name": "asdf2314",
    "description": "1234 sadf test",
    "settlement_method": "2_separate_item_on_invoice",
    "category": "1_contractual_penalty",
    "price": {
      "value": 1234
    }
  },
  {
    "name": "asdf",
    "settlement_method": "1_included_in_freight_price",
    "category": "1_contractual_penalty",
    "price": {
      "percentage": 102
    }
  }
]

Response

Response: 204 No Con­tent

Removing costs

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • End­point: /ext/orders-api/v1/orders-created/{orderId}/costs/{costsId*}
  • Method: DELETE

* You can find the cost ID using the method: https://www.trans.eu/api/orders/details-of-created-order/

Headers:

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

Response

Response: 204 No Con­tent

Updating costs

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • End­point: /ext/orders-api/v1/orders-created/{orderId}/costs/{costsId}
  • Method: PUT

Headers:

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

Request

Sam­ple of request for updat­ing costs.

{
  "name": "asdf2314",
  "description": "1234sadftest",
  "settlement_method": "2_separate_item_on_invoice",
  "category": "1_contractual_penalty",
  "price": {
    "value": 1234
  }
}

Response

Response: 204 No Con­tent