v1

latestOpenAPI 3.0.02026-07-2455104.8 MB
Sales Order

Update sales order

<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.

patch/api/v1/salesOrders/{id}

Path parameters

idstring required

Resource identifier.

Example:17

The resource's identifier.

Request body

datestring date
earliestFulfillmentDatestring date nullable
desiredDeliveryDatestring date nullable

The desired delivery date for the sales order. Format: Y-m-d

reservationDatestring date nullable

The reservation date for the sales order. Format: Y-m-d

desiredDeliveryDateAsCalendarWeekboolean

Flag indicating whether a calendar week should be printed on documents

editorstring

Creator of the Sales Order

externalOrderNumberstring

Customer-facing sales order number in the originating shop system / platform (e.g. Shopify, Amazon, etc)

externalOrderIdstring

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

transactionNumberstring

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.

customerOrderNumberstring

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.

bodyIntroductionstring

Text displayed on the PDF print-out above the positions table. Rich-Text capable.

bodyOutroductionstring

Text displayed on the PDF print-out below the positions table. Rich-Text capable.

internalDesignationstring

Internal designation which is also displayed as grey text in the sales order list in the application. Unformatted string only.

commentstring

Internal comment. Rich-Text capable.

vatCheckboolean

Text displayed on the PDF.

Example request

{
  "desiredDeliveryDate": "2022-12-05",
  "reservationDate": "2022-12-05",
  "salesRepresentative": {
    "id": "123"
  },
  "tags": [
    {
      "id": "17"
    }
  ],
  "customer": {
    "id": "1337"
  },
  "project": {
    "id": "1337"
  },
  "salesChannel": {
    "id": "1337"
  },
  "language": {
    "iso2": "DE"
  },
  "financials": {
    "paymentMethod": {
      "id": "3"
    },
    "currency": "EUR"
  },
  "delivery": {
    "shippingCosts": [
      {
        "shippingCostProduct": {
          "id": "17",
          "freeFields": [
            {
              "id": "17"
            }
          ]
        },
        "tax": {
          "vatCategory": "reduced",
          "rate": 0.5,
          "taxText": "Tax Text"
        },
        "price": {
          "amount": "13.37",
          "currency": "EUR"
        }
      }
    ],
    "shippingMethod": {
      "id": "1337"
    },
    "deliveryTerms": {
      "id": "1337"
    }
  },
  "positions": [
    {
      "product": {
        "id": "17",
        "freeFields": [
          {
            "id": "17"
          }
        ]
      },
      "tax": {
        "vatCategory": "reduced",
        "rate": 0.5,
        "taxText": "Tax Text"
      },
      "price": {
        "amount": "13.37",
        "currency": "EUR"
      },
      "desiredDeliveryDate": "2025-01-01"
    }
  ],
  "discountPositions": [
    {
      "discountProduct": {
        "id": "17",
        "freeFields": [
          {
            "id": "17"
          }
        ]
      },
      "tax": {
        "vatCategory": "reduced",
        "rate": 0.5,
        "taxText": "Tax Text"
      },
      "value": {
        "amount": "13.37",
        "currency": "EUR"
      }
    }
  ]
}

Response

Operation completed successfully, no response body