v1
latestOpenAPI 3.0.12026-08-0688138402.2 KBSales orders
Update a sales order
Updates an existing sales order and its order lines. Updating order lines is exclusively possible with open orders.
Sales orders are used handle all processes of the order flow, including but not limited to picking, packing, sending shipments, and capturing payments through the Shipmondo app.
put/sales_orders/{id}
Path parameters
idinteger required
ID for the sales order that needs to be updated
Request body
Example request
{
"shipment_template_id": 710,
"return_shipment_template_id": 710,
"sales_order_packaging_id": 11242,
"order_status": "open",
"assigned_staff_account_id": 12,
"ship_to": {
"name": "Lene Hansen",
"address1": "Skibhusvej 52",
"zipcode": "5000",
"city": "Odense C",
"country_code": "DK",
"email": "lene@email.dk",
"mobile": "12345678",
"telephone": "12345678",
"vat_no": "DK12345678",
"instruction": "Place on the front porch."
},
"bill_to": {
"name": "Lene Hansen",
"address1": "Skibhusvej 52",
"zipcode": "5000",
"city": "Odense C",
"country_code": "DK",
"email": "lene@email.dk",
"mobile": "12345678",
"telephone": "12345678",
"vat_no": "DK12345678"
},
"sender": {
"name": "Min Virksomhed ApS",
"attention": "Lene Hansen",
"address1": "Strandvejen 6B",
"zipcode": "5240",
"city": "Odense NØ",
"country_code": "DK",
"email": "info@minvirksomhed.dk",
"mobile": "70400407",
"telephone": "70400407"
},
"service_point": {
"id": "95558",
"name": "Påskeløkkens Købmand",
"address1": "Paaskeløkkevej 11",
"zipcode": "5000",
"city": "Odense C",
"country_code": "DK"
},
"order_lines": [
{
"id": 1234,
"quantity": 2,
"unit_price_excluding_vat": "800.0",
"vat_percent": "0.25",
"unit_weight": 2000,
"custom_product_data": [
"Example text"
]
}
],
"carrier_fields": {
"sort_code": "SM123D",
"availability_token": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
},
"tags": [
"tag1"
]
}Response
Successful.
Example response
{
"id": 11227,
"order_id": "27000",
"reference": "DK3400",
"ordered_at": "2017-06-16T06:25:44.557Z",
"order_status": "open",
"fulfillment_status": "authorized",
"payment_status": "unfulfilled",
"fulfilled_percent": 33,
"source_name": "Testcompany ApS",
"order_note": "Note",
"shipment_template_id": 710,
"return_shipment_template_id": 710,
"sales_order_packaging_id": 11242,
"bookkeeping_integration_id": 241,
"created_at": "2018-06-16T06:25:44.557Z",
"updated_at": "2018-06-16T06:25:44.557Z",
"ship_to": {
"name": "Lene Hansen",
"address1": "Skibhusvej 52",
"zipcode": "5000",
"city": "Odense C",
"country_code": "DK",
"email": "lene@email.dk",
"mobile": "12345678",
"telephone": "12345678",
"vat_no": "DK12345678",
"instruction": "Place on the front porch.",
"address_validation": {
"state": "danger",
"suggestion": {
"city": "Odense SØ",
"address": "Hvilehøjvej 25",
"zipcode": "5220",
"country_code": "DK"
}
}
},
"bill_to": {
"name": "Lene Hansen",
"address1": "Skibhusvej 52",
"zipcode": "5000",
"city": "Odense C",
"country_code": "DK",
"email": "lene@email.dk",
"mobile": "12345678",
"telephone": "12345678",
"vat_no": "DK12345678"
},
"sender": {
"name": "Min Virksomhed ApS",
"attention": "Lene Hansen",
"address1": "Strandvejen 6B",
"zipcode": "5240",
"city": "Odense NØ",
"country_code": "DK",
"email": "info@minvirksomhed.dk",
"mobile": "70400407",
"telephone": "70400407"
},
"payment_details": {
"amount_excluding_vat": "1600.0",
"amount_including_vat": "2000.0",
"authorized_amount": "2000.0",
"captured_amount": "2000.0",
"refunded_amount": "null",
"currency_code": "DKK",
"vat_amount": "400.0",
"vat_percent": "0.25",
"payment_method": "quickpay",
"transaction_id": "123456789",
"payment_gateway_id": "4012"
},
"service_point": {
"id": "95558",
"name": "Påskeløkkens Købmand",
"address1": "Paaskeløkkevej 11",
"zipcode": "5000",
"city": "Odense C",
"country_code": "DK"
},
"order_lines": [
{
"id": 1234,
"line_type": "item",
"item_sku": "TS001-WH",
"item_variant_code": "White",
"item_name": "T-Shirt",
"quantity": "2.0",
"unit_price_excluding_vat": "800.0",
"discount_amount_excluding_vat": "0.0",
"amount_excluding_vat": "1600.0",
"amount_including_vat": "2000.0",
"vat_amount": "400.0",
"vat_percent": "0.25",
"currency_code": "DKK",
"item_barcode": "12345678",
"item_bin": "AB-001",
"shipped_quantity": "0.0",
"unit_weight": 2000,
"image_url": "http://example.com/image",
"cost_price": "50.0",
"country_code_of_origin": "DK",
"customs_commodity_code": "123456",
"customs_description": "Example contents",
"custom_product_data": [
"Example text"
],
"item_id": 12345
}
],
"order_fulfillments": [
{
"code": "27000-1",
"shipment_id": 14500,
"order_packaging_id": 16,
"created_at": "2017-06-16T06:25:44.557Z",
"updated_at": "2017-06-16T06:25:44.557Z",
"fulfillment_lines": [
{
"shipped_quantity": "1.0"
}
]
}
],
"assigned_staff_account_id": 12,
"carrier_code": "pdk",
"carrier_fields": {
"sort_code": "SM123D",
"availability_token": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
},
"tags": [
"tag1"
]
}