After creating a transport order, you can add, remove and update additional costs. Option available only with finished transport orders for users with DOE (Digital Order Execution) product.
Json | Example | Type | Is required | Description |
category |
other-payments
| String | Yes | The type of cost. The category can have the following values: - contractual-penalty, - compensation, - other-payments |
name | example_name | String | Yes | Any name to identify the additional cost |
price | - | Object | Yes | One of the price values must be selected |
price.value | 1234 | Int | Yes / No | Value specified in the currency of the transport order |
price.percentage | 102 | Int | Yes /No | Percentage of the order value |
settlement_method | debit-note | String | Yes | Method of cost settlement. The settlement_method can have the following values: - separate-item-on-invoice - included-in-freight-price - debit-note |
description | example_description | String | No | Additional cost considerations |
Adding costs
Url parameters and connection settings
- URL: https://api.platform.trans.eu
- Endpoint: /ext/orders-api/v1/orders-created/{orderId}/costs
- Method: POST
Headers:
- Content-type: application/json
- Accept: application/json
- Authorization: Bearer {access_token}
- Api-key: {unique_app_api_key}
Authorization
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.
Request
Sample 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 Content
Removing costs
Url parameters and connection settings
- URL: https://api.platform.trans.eu
- Endpoint: /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:
- Content-type: application/json
- Accept: application/json
- Authorization: Bearer {access_token}
- Api-key: {unique_app_api_key}
Response
Response: 204 No Content
Updating costs
Url parameters and connection settings
- URL: https://api.platform.trans.eu
- Endpoint: /ext/orders-api/v1/orders-created/{orderId}/costs/{costsId}
- Method: PUT
Headers:
- Content-type: application/json
- Accept: application/json
- Authorization: Bearer {access_token}
- Api-key: {unique_app_api_key}
Request
Sample of request for updating costs.
{
"name": "asdf2314",
"description": "1234sadftest",
"settlement_method": "2_separate_item_on_invoice",
"category": "1_contractual_penalty",
"price": {
"value": 1234
}
}
Response
Response: 204 No Content