---
title: "Update a sales order"
method: PUT
path: "/sales_orders/{id}"
tags: ["Sales orders"]
---

# Update a sales order

`PUT /sales_orders/{id}`

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.

## Path parameters

- `id` integer, required

## Request body

- UpdateSalesOrderRequest
  - `shipment_template_id` integer — ID of the provided shipment template. Specifies the product and services for the order.
  - `return_shipment_template_id` integer — ID of the provided return shipment template. Specifies the return product and services for the sales order.
  - `sales_order_packaging_id` integer — ID of the provided sales order packaging. The packaging specifies the dimensions for the sales order.
  - `order_status` string — The status of the order in Shipmondo. Possible values: open, cancelled, on-hold
  - `enable_customs` boolean — Defines if order should use customs information from the associated item when creating shipments.
  - `use_item_weight` boolean — Defines if item weight should be used when creating shipments.
  - `assigned_staff_account_id` integer — ID of staff account assigned to order
  - `ship_to` SalesOrderShipToRequest — Shipping address for the sales order. Used as address when creating shipments.
    - `name` string, required — Name of the receiver. Can be either a company name or the name of a private person.
    - `attention` string — Attention of the receiver. If the receiver is a company, it is the contact person.
    - `address1` string, required — Address of the receiver, including address number.
    - `address2` string — Second address line of the receiver. Can be used for, e.g.,apartment number.
    - `zipcode` string, required — Zip code of the address.
    - `city` string, required — Name of the city that the zip code refers to.
    - `country_code` string, required — ISO 3166-1 alpha-2 country code of the receiver address.
    - `email` string — Email address of the receiver
    - `mobile` string — Mobile number of the receiver
    - `telephone` string — Landline phone number of the receiver
    - `vat_no` string, nullable — VAT ID of the receiver
    - `instruction` string — Delivery instruction to the carrier. Only applicable for products which support receiver instructions.
  - `bill_to` SalesOrderBillToRequest — Billing address for the sales order. Used when creating invoices for associated bookkeeping integration.
    - `name` string, required — Name of the receiver. Can be either a company name or the name of a private person.
    - `attention` string — Attention of the receiver. If the receiver is a company, it is the contact person.
    - `address1` string, required — Address of the receiver, including address number.
    - `address2` string — Second address line of the receiver. Can be used for, e.g.,apartment number.
    - `zipcode` string, required — Zip code of the address.
    - `city` string, required — Name of the city that the zip code refers to.
    - `country_code` string, required — ISO 3166-1 alpha-2 country code of the receiver address.
    - `email` string — Email address of the receiver
    - `mobile` string — Mobile number of the receiver
    - `telephone` string — Landline phone number of the receiver
    - `vat_no` string, nullable — VAT ID of the receiver
  - `sender` Sender — Sender address for the object
    - `name` string — Name of the sender. Can be either a company name or the name of a private person.
    - `attention` string — Attention of the sender. If the sender is a company, it is the contact person.
    - `address1` string — Address of the sender, including address number.
    - `address2` string — Second address line of the sender. Can be used for floor/room number, building name etc.
    - `zipcode` string — Zip code of the address.
    - `city` string — Name of the city that the zip code refers to.
    - `country_code` string — ISO 3166-1 alpha-2 country code of the sender.
    - `email` string — Email address of the sender
    - `mobile` string — Mobile number of the sender
    - `telephone` string — Landline phone number of the sender
  - `service_point` ServicePointSimple — Service point address. Used for shop delivery carrier products.
    - `id` string — Identifier of the service point.
    - `name` string — Name of the service point.
    - `address1` string — Address of the service point.
    - `address2` string — Second address line can be used for floor/room number, building name etc.
    - `zipcode` string — Zip code of the service point.
    - `city` string — City of the provided zipcode.
    - `country_code` string — ISO 3166-1 alpha-2 country code of the service point.
  - `order_lines` OrderLineUpdate[] — Order lines for the order. If an order line ID is provided, it will update the existing line, otherwise a new line will be created. To remove an existing line, set the quantity to 0 when updating. Below are only updatable properties, see POST /sales_orders for create new order_line properties.
    - `id` integer — Unique identifier of the object. Used for identifying the specific line when updating order lines.
    - `quantity` number — The quantity of the item in the order
    - `unit_price_excluding_vat` string — Price excluding taxes of a single item in the order line
    - `vat_percent` string — Tax percentage for the order line
    - `unit_weight` integer — The weight of a single item in the order line.
    - `custom_product_data` string[] — Custom product data for the order line.
  - `carrier_fields` CarrierFields
    - `sort_code` string — The sort code for Instabox.
    - `availability_token` string — The availability token for Instabox.
  - `tags` string[] — Custom tags for the order. Tags can be used to filter and search for orders.

## Response `200`

Successful.

- SalesOrder
  - `id` integer — Unique identifier of the object.
  - `order_id` string — The order ID of the sales order.
  - `reference` string — The reference for the order.
  - `ordered_at` string, date-time — ISO 8601 datetime the sales order was placed.
  - `order_status` 'open' | 'processing' | 'packed' | 'cancelled' | 'on_hold' | 'sent' | 'picked_up' | 'archived' | 'ready_for_pickup' | 'released' — Status of the sales order in Shipmondo.
  - `fulfillment_status` 'unfulfilled' | 'partially_fulfilled' | 'fulfilled' — Status of how fulfilled the sales order is.
  - `payment_status` 'authorized' | 'partially_paid' | 'paid' | 'voided' | 'authorize_pending' | 'authorize_error' | 'refunded' | 'marked_as_paid' | 'partially_refunded' | 'authorize_expired' — Status of the payment associated with the sales order. Is null if no payment gateway/transaction ID is associated with the order.
  - `shipped_percent` integer — The percentage items of the order that are shipped.
  - `fulfilled_percent` integer — The percentage items of the order that are fulfilled.
  - `archived` boolean — Defines whether or not the sales order is archived.
  - `source_name` string — Name of the source for the sales order.
  - `order_note` string — A note for the sales order.
  - `shipment_template_id` integer — ID of the provided shipment template. Specifies the product and services when creating shipments for the sales order.
  - `return_shipment_template_id` integer — ID of the provided return shipment template. Specifies the return product and services for the sales order.
  - `sales_order_packaging_id` integer — ID of the provided sales order packaging. The packaging specifies the dimensions that will be used when packaging the order.
  - `bookkeeping_integration_id` integer — ID of the provided bookkeeping integration. Allows the user to create invoices from the sales order.
  - `created_at` string, date-time — ISO 8601 datetime the object was created.
  - `updated_at` string, date-time — ISO 8601 datetime when the object was updated.
  - `enable_customs` boolean — Defines if order should use customs information from the associated item when creating shipments.
  - `ship_to` SalesOrderShipTo — Shipping address for the sales order. Used as address when creating shipments.
    - `name` string — Name of the receiver. Can be either a company name or the name of a private person.
    - `attention` string — Attention of the receiver. If the receiver is a company, it is the contact person.
    - `address1` string — Address of the receiver, including address number.
    - `address2` string — Second address line of the receiver. Can be used for, e.g.,apartment number.
    - `zipcode` string — Zip code of the address.
    - `city` string — Name of the city that the zip code refers to.
    - `country_code` string — ISO 3166-1 alpha-2 country code of the receiver address.
    - `email` string — Email address of the receiver
    - `mobile` string — Mobile number of the receiver
    - `telephone` string — Landline phone number of the receiver
    - `vat_no` string, nullable — VAT ID of the receiver
    - `instruction` string — Delivery instruction to the carrier. Only applicable for products which support receiver instructions.
    - `address_validation` object
      - `state` string — State refers to the likelihood of an error in the address
      - `suggestion` object
        - `city` string — Suggested city of the receiver
        - `address` string — Suggested address of the receiver
        - `zipcode` string — Suggested ZIP Code of the receiver
        - `country_code` string — Suggedes country code of the receiver in alpha 2
  - `bill_to` SalesOrderBillTo — Billing address for the sales order. Used when creating invoices for associated bookkeeping integration.
    - `name` string — Name of the receiver. Can be either a company name or the name of a private person.
    - `attention` string — Attention of the receiver. If the receiver is a company, it is the contact person.
    - `address1` string — Address of the receiver, including address number.
    - `address2` string — Second address line of the receiver. Can be used for, e.g.,apartment number.
    - `zipcode` string — Zip code of the address.
    - `city` string — Name of the city that the zip code refers to.
    - `country_code` string — ISO 3166-1 alpha-2 country code of the receiver address.
    - `email` string — Email address of the receiver
    - `mobile` string — Mobile number of the receiver
    - `telephone` string — Landline phone number of the receiver
    - `vat_no` string, nullable — VAT ID of the receiver
  - `sender` Sender — Sender address for the object
    - `name` string — Name of the sender. Can be either a company name or the name of a private person.
    - `attention` string — Attention of the sender. If the sender is a company, it is the contact person.
    - `address1` string — Address of the sender, including address number.
    - `address2` string — Second address line of the sender. Can be used for floor/room number, building name etc.
    - `zipcode` string — Zip code of the address.
    - `city` string — Name of the city that the zip code refers to.
    - `country_code` string — ISO 3166-1 alpha-2 country code of the sender.
    - `email` string — Email address of the sender
    - `mobile` string — Mobile number of the sender
    - `telephone` string — Landline phone number of the sender
  - `payment_details` PaymentDetails
    - `amount_excluding_vat` string — Total price excluding taxes of the sales order.
    - `amount_including_vat` string — Total price including taxes of the sales order.
    - `authorized_amount` string — The amount authorized by the payment gateway.
    - `captured_amount` string — The amount captured by the payment gateway.
    - `refunded_amount` string — The amount refunded by the payment gateway.
    - `currency_code` string — ISO 4217 currency code of the order total.
    - `vat_amount` string — Total amount of taxes for the order.
    - `vat_percent` string — Average tax percentage.
    - `payment_method` string — The method by which the order was paid.
    - `transaction_id` string — Transaction ID of the payment as specified by the associated payment gateway.
    - `payment_gateway_id` string — ID of the provided payment gateway. Used to capture and void payments from Shipmondo.
  - `service_point` ServicePointSimple — Service point address. Used for shop delivery carrier products.
    - `id` string — Identifier of the service point.
    - `name` string — Name of the service point.
    - `address1` string — Address of the service point.
    - `address2` string — Second address line can be used for floor/room number, building name etc.
    - `zipcode` string — Zip code of the service point.
    - `city` string — City of the provided zipcode.
    - `country_code` string — ISO 3166-1 alpha-2 country code of the service point.
  - `order_lines` OrderLine[] — The order lines describe all the lines for the sales order, including items, shipping, and more.
    - `id` integer — Unique identifier of the object.
    - `line_type` 'item' | 'shipping' | 'discount' | 'gift_card' | 'payment_fee' — Specifies the type of line.
    - `item_sku` string — Stock keeping unit (SKU) of the item
    - `item_variant_code` string — Variant code of the item
    - `item_name` string — Name of the item
    - `quantity` string — The quantity of the item in the sales order
    - `unit_price_excluding_vat` string — Price excluding taxes of a single item in the order line
    - `discount_amount_excluding_vat` string — Total discount of the items in the order line
    - `amount_excluding_vat` string — Total price excluding taxes for the order line
    - `amount_including_vat` string — Total price including taxes for the order line
    - `vat_amount` string — Total tax amount for the order line
    - `vat_percent` string — Tax percentage for the order line
    - `currency_code` string — ISO 4217 currency code
    - `item_barcode` string — Barcode of the item. Used when scanning item for pick.
    - `item_bin` string — The bin/location where the item is located in the warehouse.
    - `shipped_quantity` string — The quantity of the item that has been shipped/fulfilled.
    - `unit_weight` integer — The weight of a single item in the order line.
    - `image_url` string — Image URL of the item that appears on the order or when picking. Will only be displayed if the URL is HTTPS.
    - `cost_price` string — Unit cost price of the item as used for customs.
    - `country_code_of_origin` string — ISO 3166-1 alpha-2 country code of origin.
    - `customs_commodity_code` string — Tariff code for the item. Used when creating shipments that require customs declaration.
    - `customs_description` string — Customs description for the item. Used when creating shipments that require customs declaration.
    - `custom_product_data` string[] — Custom product data for the order line.
    - `item_id` integer — Unique identifier of the related item.
  - `order_fulfillments` Fulfillment[] — Order fulfillments contains fulfilled shipments that are ready to be, or have been, shipped.
    - `id` integer — The generated id for the fulfillment.
    - `code` string — The generated code for the fulfillment. Generated from the provided order ID
    - `type` 'outbound' | 'return' — The type of the fulfillment.
    - `shipment_id` integer — Unique identifier of the created shipment.
    - `fulfilled_by_third_party` boolean — Defines if fulfillment is fulfilled by a third party.
    - `order_packaging_id` integer — Specifies which order packaging that has been used.
    - `cancelled` boolean — Defines if fulfillment is cancelled.
    - `created_at` string, date-time — ISO 8601 datetime the object was created.
    - `updated_at` string, date-time — ISO 8601 datetime when the object was updated.
    - `fulfillment_lines` object[] — Fulfilled lines for the sales_order.
      - `id` integer — Unique identifier of the object.
      - `order_line_id` integer — The id of the fulfilled order_line.
      - `shipped_quantity` string — The quantity of items fulfilled.
  - `assigned_staff_account_id` integer — ID of staff account assigned to order
  - `carrier_code` string — Code for the carrier assigned to the order.
  - `carrier_fields` CarrierFields
    - `sort_code` string — The sort code for Instabox.
    - `availability_token` string — The availability token for Instabox.
  - `tags` string[] — Custom tags for the order. Tags can be used to filter and search for orders.

## Other responses

- `401` — Unauthorized.
- `404` — Resource not found.
- `422` — Invalid or not found parameter(s)

---

[API](https://skmtc.net/shipmondo/apis/shipmondo-api.md) · [All operations](https://skmtc.net/shipmondo/apis/shipmondo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/shipmondo/shipmondo-api/versions/dbe9a4ea0826/schema)
