This endpoint is for editing one or more orders.

order is what needs to be edited. It's not necessary to send the whole order, only the data that needs to be changed. The request for editing orders should be sent using HTTP PATCH method. For example, if you want to change origin address, you can just send this:

{
  "order": {
    "origin": {
      "address": "Klausdalsbrovej 601",
      "zipCode": "2750",
      "city": "Ballerup"
    }
  },
    "orderIds": [
    "58f71c7d97b77e0011c14f02"
  ]
}

This will only change address, zipCode and city under origin for the orders whose ids are included in orderIds array. In the case of the above example order with id of "58f71c7d97b77e0011c14f02" will be updated.

Edit cargo

To edit cargo you need to list the cargo the either needs to be created, changed or deleted. If one of your cargo items won't be changed or deleted, it's not necessary to put it into the request.

For every cargo item there need to be a action key which can have following 3 values:

  • create
  • update
  • delete

If not all cargo items that's being sent it contains an action key, it will default back to use the old deprecated option to change cargo.

Create cargo example

Here's an example to create cargo:

{
  "cargoReference": "reference",
  "cargoNr": "cargo number",
  "description": "cargo description",
  "type": "pallet",
  "amount": 1,
  "weight": 1000,
  "volume": 1,
  "dimensions": {
    "length": 10,
    "width": 10,
    "height": 10
  },
  "barcode": "barcode#1",
  "action": "create"
}

Update cargo example

If you need to update a cargo item, you just need to send in what needs to be changed together with the unique ID for the cargo item as cargoId. This example shows that the amount and description is being changed:

{
  "cargoId": "67998ff697a2b503a63f7b4b",
  "amount": 2,
  "description": "updated cargo description",
  "action": "update"
}

Delete cargo example

To delete a cargo item you only need to add the unique cargoId and the action values. Everything else will be ignored

{
  "cargoId": "67998ff697a2b503a63f7b4b",
  "action": "delete"
}

📘

Recommendation

It is recommended only to send the edited part. It is possible to send unedited data, but to save data it's better to only send the edited data.

🚧

Edit cargo (deprecated option)

If you want to edit the cargo lines, it is necessary to list all of them, and not the edited one.

This was the old way to do and no longer recommended and therefor you should use what described under Edit cargo

Language
Click Try It! to start a request and see the response here!