v1

latestOpenAPI 3.0.22026-07-223907721.1 MB
SalesOrderDomainCommand

[Deprecated] Use salesorder/calculate instead. Calculate prices, discounts, and taxes for a sales order without persisting it.

post/v2/salesorder/calculatesalesorder

Headers

x-tenant-idstring uuid required

The tenant ID for the target ERP instance.

x-runasstring

The User-Id (int or uuid) on whose behalf the request is executed. Requires scope 'Application.RunAs'.

x-companyidstring

The Company-Id (int or uuid) of the company on whose behalf the request is executed.

Request body

recalculateTaxMode0 | 1 | 2

0 = NoRecalculation, 1 = KeepNetPrices, 2 = KeepGrossPrices

Example request

{
  "calculateSalesOrderRequest": {
    "companyId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
    "customerId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
    "shippingMethodId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
    "shopId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
    "lineItems": [
      {
        "itemId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
        "taxClassId": "b45f6432-2462-4c6f-b00f-1d9d01000000"
      }
    ]
  },
  "changes": [
    {
      "companyId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
      "customerId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
      "shippingMethodId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
      "lineItemChanges": {
        "create": [
          {
            "itemId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
            "taxClassId": "b45f6432-2462-4c6f-b00f-1d9d01000000"
          }
        ],
        "update": [
          {
            "taxClassId": "b45f6432-2462-4c6f-b00f-1d9d01000000"
          }
        ]
      }
    }
  ]
}

Response

Sales order calculated successfully.