---
title: "Update sales order"
method: PATCH
path: "/api/v1/salesOrders/{id}"
tags: ["Sales Order"]
---

# Update sales order

`PATCH /api/v1/salesOrders/{id}`

<strong>CAUTION: Positions not specified in the payload will be DELETED. Please pass the ids along if you need them to be preserved.</strong><br><br>The sales order edit endpoint allows for updating an existing sales order. When updating, any positions not included in the positions payload will be implicitly deleted from the order. This ensures that the positions list in the payload accurately reflects the desired state of the sales order after the update.

## Path parameters

- `id` string, required — Resource identifier.

## Request body

- object
  - `date` string, date
  - `earliestFulfillmentDate` string, date, nullable
  - `desiredDeliveryDate` string, date, nullable — The desired delivery date for the sales order. Format: Y-m-d
  - `reservationDate` string, date, nullable — The reservation date for the sales order. Format: Y-m-d
  - `desiredDeliveryDateAsCalendarWeek` boolean — Flag indicating whether a calendar week should be printed on documents
  - `editor` string — Creator of the Sales Order
  - `salesRepresentative` object — Reference to the sales representative resource.
    - `id` string, required — The string Id
  - `externalOrderNumber` string — Customer-facing sales order number in the originating shop system / platform (e.g. Shopify, Amazon, etc)
  - `externalOrderId` string — technical sales order ID in the originating shop system / platform (e.g. Shopify, Amazon, etc). This ID is used to sync status updates & tracking info back to the originating shop / platform
  - `transactionNumber` string — transaction number typically used to identify payment transactions in the originating shop system / platforms (e.g. Shopify, Amazon, etc). This ID is typically used for financial reconciliation of payment transactions with sales orders / invoices in Xentral.
  - `customerOrderNumber` string — Purchase Order number from the customer’s purchase order system, typically used in B2B context.
  - `autoCreateDocuments` 'deliveryNote+invoice' | 'deliveryNote' | 'invoice' — Sets documents created by autoshippment.
  - `bodyIntroduction` string — Text displayed on the PDF print-out above the positions table. Rich-Text capable.
  - `bodyOutroduction` string — Text displayed on the PDF print-out below the positions table. Rich-Text capable.
  - `internalDesignation` string — Internal designation which is also displayed as grey text in the sales order list in the application. Unformatted string only.
  - `comment` string — Internal comment. Rich-Text capable.
  - `tags` object[]
    - `id` string — Resource identifier.
  - `customer` object — Reference to another resource
    - `id` string, required — Resource identifier.
  - `project` object — Reference to another resource
    - `id` string, required — Resource identifier.
  - `salesChannel` object — Reference to another resource
    - `id` string, required — Resource identifier.
  - `language` object — Language information for a Sales Order
    - `iso2` string, nullable, required — ISO 639-1 Code
  - `financials` object — Financial information for a Sales Order to update
    - `paymentMethod` object — Reference to another resource
      - `id` string, required — Resource identifier.
    - `currency` string
    - `costCenter` object, nullable
      - `id` string, required — Resource identifier.
      - `number` string, nullable, required
    - `billingAddress` object
      - `type` 'mr' | 'mrs' | 'company' | 'other'
      - `name` string
      - `contactPerson` string
      - `department` string
      - `subDepartment` string
      - `street` string
      - `zipCode` string
      - `city` string
      - `state` string
      - `country` string
      - `addressSupplement` string
      - `gln` string
      - `salutation` string
      - `email` string, email
    - `tax` object
      - `taxation` 'domestic' | 'eu' | 'export' | 'taxfreedomestic'
      - `vatId` string
      - `taxDisplay` 'gross' | 'net' | 'auto'
      - `noTaxInfoText` boolean
      - `normalTaxRate` number, float
      - `reducedTaxRate` number, float
    - `paymentTerms` object
      - `paymentTargetDiscount` number, float
      - `paymentTargetDays` integer
      - `paymentTargetDiscountDays` integer
      - `directDebitDate` string, date, nullable
  - `delivery` object
    - `autoShipping` boolean
    - `fastLane` boolean
    - `shippingCosts` union[]
      - union — <b>CAUTION: shipping cost positions not included in the payload will be DELETED.<br>If you want to retain specific shipping cost positions, please provide their ids.</b><br><br>Any parameters or retained shipping cost position <b>objects</b> that are not provided in the payload remain unchanged.<br><br>If you don't include the <code>shippingCosts</code> parameter at all, all existing shipping cost positions will remain unchanged.
        - object
          - `quantity` number, double, required
          - `comment` string
          - `shippingCostProduct` object, required
            - `id` string, required — Resource identifier.
            - `name` string
            - `description` string
            - `freeFields` object[], nullable
              - …
            - `number` string, nullable
          - `tax` object
            - `vatCategory` 'reduced' | 'normal' | 'exempt', nullable — VAT category. When importing a position only one of `rate` or `vatCategory` must be used.
            - `rate` number, float, nullable — VAT rate. When importing a position only one of `rate` or `vatCategory` must be used.
            - `taxText` string, nullable, required — Tax Text
          - `price` object — Money object with amount and currency
            - `amount` string, float — A string representing the amount
            - `currency` 'EUR' | 'USD' | 'JPY' | 'BGN' | 'CZK' | 'DKK' | 'GBP' | 'HUF' | 'PLN' | 'RON' | 'SEK' | 'CHF' | 'ISK' | 'NOK' | 'HRK' | 'RUB' | 'TRY' | 'AUD' | 'BRL' | 'CAD' | 'CNY' | 'HKD' | 'IDR' | 'ILS' | 'INR' | 'KRW' | 'MXN' | 'MYR' | 'NZD' | 'PHP' | 'SGD' | 'THB' | 'ZAR' | 'ARS' | 'CLP' | 'SAR' | 'AED' | 'QAR' — Currency matches one of currency values as specified in ISO-4217.
          - `discount` number, float — percentage discount to be applied to the position, expressed as a decimal value (<code>0.15</code> = 15% discount)
          - `webId` string — technical position ID in the originating shop system / platform (e.g. Shopify, Amazon, etc). This ID is used to sync info back to the originating shop / platform
        - object
          - `id` string — Resource identifier.
          - `quantity` number, double
          - `comment` string
          - `shippingCostProduct` object — Whenever a Sales Order Position is being updated, the product used in it <strong>cannot be updated</strong>. If a different product wants to be used, the position will need to be removed and a new one using the new product will need to be created.
            - `name` string
            - `description` string
            - `freeFields` object[], nullable
              - …
            - `number` string, nullable
          - `tax` object
            - `vatCategory` 'reduced' | 'normal' | 'exempt', nullable — VAT category. When importing a position only one of `rate` or `vatCategory` must be used.
            - `rate` number, float, nullable — VAT rate. When importing a position only one of `rate` or `vatCategory` must be used.
            - `taxText` string, nullable, required — Tax Text
          - `price` object — Money object with amount and currency
            - `amount` string, float — A string representing the amount
            - `currency` 'EUR' | 'USD' | 'JPY' | 'BGN' | 'CZK' | 'DKK' | 'GBP' | 'HUF' | 'PLN' | 'RON' | 'SEK' | 'CHF' | 'ISK' | 'NOK' | 'HRK' | 'RUB' | 'TRY' | 'AUD' | 'BRL' | 'CAD' | 'CNY' | 'HKD' | 'IDR' | 'ILS' | 'INR' | 'KRW' | 'MXN' | 'MYR' | 'NZD' | 'PHP' | 'SGD' | 'THB' | 'ZAR' | 'ARS' | 'CLP' | 'SAR' | 'AED' | 'QAR' — Currency matches one of currency values as specified in ISO-4217.
          - `discount` number, float — percentage discount to be applied to the position, expressed as a decimal value (<code>0.15</code> = 15% discount)
          - `webId` string — technical position ID in the originating shop system / platform (e.g. Shopify, Amazon, etc). This ID is used to sync info back to the originating shop / platform
    - `storageCountry` string, nullable — Use storageCountry for external fulfillment without delivery notes to set the country of fulfillment. If using delivery notes, do not use storageCountry.
    - `preferredWarehouse` object, nullable — Use preferredWarehouse for fulfillment with delivery notes to define which warehouse should be used.
      - `id` string
    - `shippingAddress` object
      - `type` 'mr' | 'mrs' | 'company' | 'other'
      - `name` string
      - `department` string
      - `contactPerson` string
      - `subDepartment` string
      - `street` string
      - `zipCode` string
      - `city` string
      - `state` string
      - `country` string
      - `addressSupplement` string
      - `gln` string
      - `title` string
      - `email` string, email
    - `shippingMethod` object — Reference to another resource
      - `id` string, required — Resource identifier.
    - `deliveryTerms` object, nullable — Nullable reference to another resource
      - `id` string, required — Resource identifier.
  - `positions` union[] — <b>CAUTION: Positions not included in the payload will be DELETED.<br>If you want to retain specific positions, please provide their ids.</b><br><br>Any parameters of retained position <b>objects</b> that are not provided in the payload remain unchanged.<br><br>If you don't include the <code>positions</code> parameter at all, all existing positions will remain unchanged.
    - union
      - object
        - `quantity` number, double, required
        - `comment` string
        - `product` object, required
          - `id` string, required — Resource identifier.
          - `name` string
          - `description` string
          - `freeFields` object[], nullable
            - `id` string, required — Resource identifier.
            - `value` string, required
          - `number` string, nullable
        - `tax` object
          - `vatCategory` 'reduced' | 'normal' | 'exempt', nullable — VAT category. When editing/creating a position only one of `rate` or `vatCategory` must be used.
          - `rate` number, float, nullable — VAT rate. When editing/creating a position only one of `rate` or `vatCategory` must be used.
          - `taxText` string, nullable, required — Tax Text
        - `price` object — Money object with amount and currency
          - `amount` string, float — A string representing the amount
          - `currency` 'EUR' | 'USD' | 'JPY' | 'BGN' | 'CZK' | 'DKK' | 'GBP' | 'HUF' | 'PLN' | 'RON' | 'SEK' | 'CHF' | 'ISK' | 'NOK' | 'HRK' | 'RUB' | 'TRY' | 'AUD' | 'BRL' | 'CAD' | 'CNY' | 'HKD' | 'IDR' | 'ILS' | 'INR' | 'KRW' | 'MXN' | 'MYR' | 'NZD' | 'PHP' | 'SGD' | 'THB' | 'ZAR' | 'ARS' | 'CLP' | 'SAR' | 'AED' | 'QAR' — Currency matches one of currency values as specified in ISO-4217.
        - `discount` number, float — percentage discount to be applied to the position, expressed as a decimal value (<code>0.15</code> = 15% discount)
        - `webId` string — technical position ID in the originating shop system / platform (e.g. Shopify, Amazon, etc). This ID is used to sync info back to the originating shop / platform
        - `desiredDeliveryDate` string, date, nullable — Date of creation desired delivery date
        - `desiredDeliveryDateAsCalendarWeek` boolean — Indicating whether a calendar week should be printed on documents or the actual date) is readable and editable via API
        - `desiredQualityControlAttributes` object, nullable
          - `batch` string, nullable
          - `bestBeforeDate` string, date, nullable
      - object
        - `id` string, required — Resource identifier.
        - `quantity` number, double
        - `comment` string
        - `product` object — Whenever a Sales Order Position is being updated, the product used in it <strong>cannot be updated</strong>. If a different product wants to be used, the position will need to be removed and a new one using the new product will need to be created.
          - `name` string
          - `description` string
          - `freeFields` object[], nullable
            - `id` string, required — Resource identifier.
            - `value` string, required
          - `number` string, nullable
        - `tax` object
          - `vatCategory` 'reduced' | 'normal' | 'exempt', nullable — VAT category. When editing/creating a position only one of `rate` or `vatCategory` must be used.
          - `rate` number, float, nullable — VAT rate. When editing/creating a position only one of `rate` or `vatCategory` must be used.
          - `taxText` string, nullable — Tax Text
        - `price` object — Money object with amount and currency
          - `amount` string, float — A string representing the amount
          - `currency` 'EUR' | 'USD' | 'JPY' | 'BGN' | 'CZK' | 'DKK' | 'GBP' | 'HUF' | 'PLN' | 'RON' | 'SEK' | 'CHF' | 'ISK' | 'NOK' | 'HRK' | 'RUB' | 'TRY' | 'AUD' | 'BRL' | 'CAD' | 'CNY' | 'HKD' | 'IDR' | 'ILS' | 'INR' | 'KRW' | 'MXN' | 'MYR' | 'NZD' | 'PHP' | 'SGD' | 'THB' | 'ZAR' | 'ARS' | 'CLP' | 'SAR' | 'AED' | 'QAR' — Currency matches one of currency values as specified in ISO-4217.
        - `discount` number, float — percentage discount to be applied to the position, expressed as a decimal value (<code>0.15</code> = 15% discount)
        - `webId` string — technical position ID in the originating shop system / platform (e.g. Shopify, Amazon, etc). This ID is used to sync info back to the originating shop / platform
        - `desiredDeliveryDate` string, date, nullable — Date of creation desired delivery date
        - `desiredDeliveryDateAsCalendarWeek` boolean — Indicating whether a calendar week should be printed on documents or the actual date) is readable and editable via API
        - `desiredQualityControlAttributes` object, nullable
          - `batch` string, nullable
          - `bestBeforeDate` string, date, nullable
  - `discountPositions` union[] — <b>CAUTION: Discount positions not included in the payload will be DELETED.<br>If you want to retain specific discount positions, please provide their ids.</b><br><br>Any parameters or retained discount position <b>objects</b> that are not provided in the payload remain unchanged.<br><br>If you don't include the <code>discountPositions</code> parameter at all, all existing discount positions will remain unchanged.
    - union
      - object
        - `quantity` number, double, required
        - `discountProduct` object, required
          - `id` string, required — Resource identifier.
          - `name` string
          - `description` string
          - `freeFields` object[], nullable
            - `id` string, required — Resource identifier.
            - `value` string, required
          - `number` string, nullable
        - `tax` object
          - `vatCategory` 'reduced' | 'normal' | 'exempt', nullable — VAT category. When editing/creating a position only one of `rate` or `vatCategory` must be used.
          - `rate` number, float, nullable — VAT rate. When editing/creating a position only one of `rate` or `vatCategory` must be used.
          - `taxText` string, nullable, required — Tax Text
        - `value` object — Money object with amount and currency
          - `amount` string, float — A string representing the amount
          - `currency` 'EUR' | 'USD' | 'JPY' | 'BGN' | 'CZK' | 'DKK' | 'GBP' | 'HUF' | 'PLN' | 'RON' | 'SEK' | 'CHF' | 'ISK' | 'NOK' | 'HRK' | 'RUB' | 'TRY' | 'AUD' | 'BRL' | 'CAD' | 'CNY' | 'HKD' | 'IDR' | 'ILS' | 'INR' | 'KRW' | 'MXN' | 'MYR' | 'NZD' | 'PHP' | 'SGD' | 'THB' | 'ZAR' | 'ARS' | 'CLP' | 'SAR' | 'AED' | 'QAR' — Currency matches one of currency values as specified in ISO-4217.
        - `webId` string — technical position ID in the originating shop system / platform (e.g. Shopify, Amazon, etc). This ID is used to sync info back to the originating shop / platform
      - object
        - `id` string, required — Resource identifier.
        - `quantity` number, double
        - `discountProduct` object — Whenever a Sales Order Position is being updated, the product used in it <strong>cannot be updated</strong>. If a different product wants to be used, the position will need to be removed and a new one using the new product will need to be created.
          - `name` string
          - `description` string
          - `freeFields` object[], nullable
            - `id` string, required — Resource identifier.
            - `value` string, required
          - `number` string, nullable
        - `tax` object
          - `vatCategory` 'reduced' | 'normal' | 'exempt', nullable — VAT category. When editing/creating a position only one of `rate` or `vatCategory` must be used.
          - `rate` number, float, nullable — VAT rate. When editing/creating a position only one of `rate` or `vatCategory` must be used.
          - `taxText` string, nullable — Tax Text
        - `value` object — Money object with amount and currency
          - `amount` string, float — A string representing the amount
          - `currency` 'EUR' | 'USD' | 'JPY' | 'BGN' | 'CZK' | 'DKK' | 'GBP' | 'HUF' | 'PLN' | 'RON' | 'SEK' | 'CHF' | 'ISK' | 'NOK' | 'HRK' | 'RUB' | 'TRY' | 'AUD' | 'BRL' | 'CAD' | 'CNY' | 'HKD' | 'IDR' | 'ILS' | 'INR' | 'KRW' | 'MXN' | 'MYR' | 'NZD' | 'PHP' | 'SGD' | 'THB' | 'ZAR' | 'ARS' | 'CLP' | 'SAR' | 'AED' | 'QAR' — Currency matches one of currency values as specified in ISO-4217.
        - `webId` string — technical position ID in the originating shop system / platform (e.g. Shopify, Amazon, etc). This ID is used to sync info back to the originating shop / platform
  - `vatCheck` boolean — Text displayed on the PDF.

## Response `204`

Operation completed successfully, no response body

## Other responses

- `400` — IETF RFC 9457 Problem API compliant response
- `403` — Unable to authorize the client
- `404` — Resource was not found or not enough access privileges
- `406` — Requested resource representation does not exist.

---

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