{"id":4035,"date":"2022-11-15T14:58:47","date_gmt":"2022-11-15T13:58:47","guid":{"rendered":"https:\/\/www.trans.eu\/api\/?p=4035"},"modified":"2025-12-29T10:41:52","modified_gmt":"2025-12-29T09:41:52","slug":"order-additional-costs-add-remove-update","status":"publish","type":"post","link":"https:\/\/www.trans.eu\/api\/orders\/order-attachments\/order-additional-costs-add-remove-update\/","title":{"rendered":"Order additional costs \u2014 add, remove, update"},"content":{"rendered":"\n<p>After cre\u00adat\u00ading a trans\u00adport order, you can add, remove and update addi\u00adtion\u00adal costs. Option avail\u00adable only with fin\u00adished trans\u00adport orders for users with DOE (Dig\u00adi\u00adtal Order Exe\u00adcu\u00adtion) prod\u00aduct.<\/p>\n\n\n\n<!--more-->\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><tbody><tr><td><strong>Json<\/strong><\/td><td><strong>Exam\u00adple<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Is required<\/strong><\/td><td><strong>Descrip\u00adtion<\/strong><\/td><\/tr><tr><td>cat\u00ade\u00adgo\u00adry<\/td><td>\n<div>\n<div>oth\u00ader-pay\u00adments<\/div>\n<\/div>\n<\/td><td>String<\/td><td>Yes<\/td><td>The type of cost. The cat\u00ade\u00adgo\u00adry can have the fol\u00adlow\u00ading val\u00adues:<br>- con\u00adtrac\u00adtu\u00adal-penal\u00adty,<br>- com\u00adpen\u00adsa\u00adtion,<br>- oth\u00ader-pay\u00adments<\/td><\/tr><tr><td>name<\/td><td>example_name<\/td><td>String<\/td><td>Yes<\/td><td>Any name to iden\u00adti\u00adfy the addi\u00adtion\u00adal cost<\/td><\/tr><tr><td>price<\/td><td>-<\/td><td>Object<\/td><td>Yes<\/td><td>One of the price val\u00adues must be select\u00aded<\/td><\/tr><tr><td>price.value<\/td><td>1234<\/td><td>Int<\/td><td>Yes \/ No<\/td><td>Val\u00adue spec\u00adi\u00adfied in the cur\u00adren\u00adcy of the trans\u00adport order<\/td><\/tr><tr><td>price.percentage<\/td><td>102<\/td><td>Int<\/td><td>Yes \/No<\/td><td>Per\u00adcent\u00adage of the order val\u00adue<\/td><\/tr><tr><td>settlement_method<\/td><td>deb\u00adit-note<\/td><td>String<\/td><td>Yes<\/td><td>Method of cost set\u00adtle\u00adment. The settlement_method can have the fol\u00adlow\u00ading val\u00adues:<br>- sep\u00ada\u00adrate-item-on-invoice<br>- includ\u00aded-in-freight-price<br>- deb\u00adit-note<\/td><\/tr><tr><td>descrip\u00adtion<\/td><td>example_description<\/td><td>String<\/td><td>No<\/td><td>Addi\u00adtion\u00adal cost con\u00adsid\u00ader\u00ada\u00adtions<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Adding costs<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Url parameters and connection settings<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>URL:<\/strong>&nbsp;https:\/\/api.platform.trans.eu<\/li>\n\n\n\n<li><strong>End\u00adpoint:<\/strong> \/ext\/orders-api\/v1\/orders-created\/{orderId}\/costs<\/li>\n\n\n\n<li><strong>Method:<\/strong> POST<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Headers:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Con\u00adtent-type: application\/json<\/li>\n\n\n\n<li>Accept: application\/json<\/li>\n\n\n\n<li>Autho\u00adriza\u00adtion: Bear\u00ader {access_token}<\/li>\n\n\n\n<li>Api-key: {unique_app_api_key}<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Authorization<\/h3>\n\n\n\n<p>Autho\u00adriza\u00adtion process&nbsp;<a href=\"https:\/\/www.trans.eu\/api\/general-information\/authorization-process\/\" target=\"_blank\" rel=\"noopener\" title>is described here<\/a>. Each API request must also con\u00adsist of unique Api-key obtained dur\u00ading appli\u00adca\u00adtion reg\u00adis\u00adtra\u00adtion togeth\u00ader with client_id and client_secret.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Request<\/h3>\n\n\n\n<p>Sam\u00adple of response for adding costs.<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>[\n  {\n    \"name\": \"asdf2314\",\n    \"description\": \"1234 sadf test\",\n    \"settlement_method\": \"2_separate_item_on_invoice\",\n    \"category\": \"1_contractual_penalty\",\n    \"price\": {\n      \"value\": 1234\n    }\n  },\n  {\n    \"name\": \"asdf\",\n    \"settlement_method\": \"1_included_in_freight_price\",\n    \"category\": \"1_contractual_penalty\",\n    \"price\": {\n      \"percentage\": 102\n    }\n  }\n]<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Response<\/h3>\n\n\n\n<p>Response: 204 No Con\u00adtent<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Removing costs<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Url parameters and connection settings<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>URL:<\/strong>&nbsp;https:\/\/api.platform.trans.eu<\/li>\n\n\n\n<li><strong>End\u00adpoint:<\/strong> \/ext\/orders-api\/v1\/orders-created\/{orderId}\/costs\/{costsId*}<\/li>\n\n\n\n<li><strong>Method:<\/strong> DELETE<\/li>\n<\/ul>\n\n\n\n<p>* You can find the cost ID using the method: <a href=\"https:\/\/www.trans.eu\/api\/orders\/details-of-created-order\/\">https:\/\/www.trans.eu\/api\/orders\/details-of-created-order\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Headers:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Con\u00adtent-type: application\/json<\/li>\n\n\n\n<li>Accept: application\/json<\/li>\n\n\n\n<li>Autho\u00adriza\u00adtion: Bear\u00ader {access_token}<\/li>\n\n\n\n<li>Api-key: {unique_app_api_key}<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Response<\/h3>\n\n\n\n<p>Response: 204 No Con\u00adtent<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Updating costs<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Url parameters and connection settings<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>URL:<\/strong>&nbsp;https:\/\/api.platform.trans.eu<\/li>\n\n\n\n<li><strong>End\u00adpoint:<\/strong> \/ext\/orders-api\/v1\/orders-created\/{orderId}\/costs\/{costsId}<\/li>\n\n\n\n<li><strong>Method: <\/strong>PUT<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Headers:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Con\u00adtent-type: application\/json<\/li>\n\n\n\n<li>Accept: application\/json<\/li>\n\n\n\n<li>Autho\u00adriza\u00adtion: Bear\u00ader {access_token}<\/li>\n\n\n\n<li>Api-key: {unique_app_api_key}<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Request<\/h3>\n\n\n\n<p>Sam\u00adple of request for updat\u00ading costs.<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  \"name\": \"asdf2314\",\n  \"description\": \"1234sadftest\",\n  \"settlement_method\": \"2_separate_item_on_invoice\",\n  \"category\": \"1_contractual_penalty\",\n  \"price\": {\n    \"value\": 1234\n  }\n}<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Response<\/h3>\n\n\n\n<p>Response: 204 No Con\u00adtent<\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"dont-break-out\">After cre\u00adat\u00ading a trans\u00adport order, you can add, remove and update addi\u00adtion\u00adal costs. Option avail\u00adable only with fin\u00adished trans\u00adport orders \u2026<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"wp_typography_post_enhancements_disabled":false,"footnotes":""},"categories":[104],"tags":[],"class_list":["post-4035","post","type-post","status-publish","format-standard","hentry","category-order-attachments"],"acf":[],"aioseo_notices":[],"lang":"en","translations":{"en":4035},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/4035","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/comments?post=4035"}],"version-history":[{"count":1,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/4035\/revisions"}],"predecessor-version":[{"id":5478,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/posts\/4035\/revisions\/5478"}],"wp:attachment":[{"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/media?parent=4035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/categories?post=4035"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trans.eu\/api\/wp-json\/wp\/v2\/tags?post=4035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}