Skip to main content
PATCH
/
salesOrders
/
{salesOrderId}
Update Sales Order
curl --request PATCH \
  --url https://api.jtl-cloud.com/erp/salesOrders/{salesOrderId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-appid: <x-appid>' \
  --header 'x-appversion: <x-appversion>' \
  --header 'x-tenant-id: <x-tenant-id>' \
  --data '
{
  "ExternalNumber": "<string>",
  "BillingNumber": "<string>",
  "CompanyId": 123,
  "DepartureCountry": {
    "CountryISO": "<string>",
    "State": "<string>",
    "CurrencyIso": "<string>",
    "CurrencyFactor": 123
  },
  "CustomerId": 123,
  "CustomerVatID": "<string>",
  "BillingAddress": {
    "Company": "<string>",
    "Company2": "<string>",
    "FormOfAddress": "<string>",
    "Title": "<string>",
    "FirstName": "<string>",
    "LastName": "<string>",
    "Street": "<string>",
    "Address2": "<string>",
    "PostalCode": "<string>",
    "City": "<string>",
    "State": "<string>",
    "CountryIso": "<string>",
    "VatID": "<string>",
    "PhoneNumber": "<string>",
    "MobilePhoneNumber": "<string>",
    "EmailAddress": "<string>",
    "Fax": "<string>"
  },
  "Shipmentaddress": {
    "Company": "<string>",
    "Company2": "<string>",
    "FormOfAddress": "<string>",
    "Title": "<string>",
    "FirstName": "<string>",
    "LastName": "<string>",
    "Street": "<string>",
    "Address2": "<string>",
    "PostalCode": "<string>",
    "City": "<string>",
    "State": "<string>",
    "CountryIso": "<string>",
    "VatID": "<string>",
    "PhoneNumber": "<string>",
    "MobilePhoneNumber": "<string>",
    "EmailAddress": "<string>",
    "Fax": "<string>"
  },
  "SalesOrderDate": "2023-11-07T05:31:56Z",
  "SalesOrderPaymentDetails": {
    "PaymentMethodId": 123,
    "CurrencyIso": "<string>",
    "CurrencyFactor": 123,
    "PaymentTarget": 123,
    "CashDiscount": 123,
    "CashDiscountDays": 123
  },
  "SalesOrderShippingDetail": {
    "ShippingMethodId": 123,
    "ShippingPriority": 123,
    "ShippingDate": "2023-11-07T05:31:56Z",
    "EstimatedDeliveryDate": "2023-11-07T05:31:56Z",
    "OnHoldReasonId": 123,
    "ExtraWeight": 123
  },
  "ColorcodeId": 123,
  "Comment": "<string>",
  "CustomerComment": "<string>",
  "LanguageIso": "<string>"
}
'
{
  "Id": 123,
  "Number": "<string>",
  "ExternalNumber": "<string>",
  "BillingNumber": "<string>",
  "CompanyId": 123,
  "DepartureCountry": {
    "CountryISO": "<string>",
    "State": "<string>",
    "CurrencyIso": "<string>",
    "CurrencyFactor": 123
  },
  "CustomerId": 123,
  "CustomerVatID": "<string>",
  "MerchantVatID": "<string>",
  "BillingAddress": {
    "Id": 123,
    "Company": "<string>",
    "Company2": "<string>",
    "FormOfAddress": "<string>",
    "Title": "<string>",
    "FirstName": "<string>",
    "LastName": "<string>",
    "Street": "<string>",
    "Address2": "<string>",
    "PostalCode": "<string>",
    "City": "<string>",
    "State": "<string>",
    "CountryIso": "<string>",
    "VatID": "<string>",
    "PhoneNumber": "<string>",
    "MobilePhoneNumber": "<string>",
    "EmailAddress": "<string>",
    "Fax": "<string>"
  },
  "Shipmentaddress": {
    "Id": 123,
    "Company": "<string>",
    "Company2": "<string>",
    "FormOfAddress": "<string>",
    "Title": "<string>",
    "FirstName": "<string>",
    "LastName": "<string>",
    "Street": "<string>",
    "Address2": "<string>",
    "PostalCode": "<string>",
    "City": "<string>",
    "State": "<string>",
    "CountryIso": "<string>",
    "VatID": "<string>",
    "PhoneNumber": "<string>",
    "MobilePhoneNumber": "<string>",
    "EmailAddress": "<string>",
    "Fax": "<string>"
  },
  "SalesOrderDate": "2023-11-07T05:31:56Z",
  "SalesOrderPaymentDetails": {
    "PaymentMethodId": 123,
    "PaymentStatus": 0,
    "TotalGrossAmount": 123,
    "CurrencyIso": "<string>",
    "CurrencyFactor": 123,
    "DateOfPayment": "2023-11-07T05:31:56Z",
    "StillToPay": 123,
    "PaymentTarget": 123,
    "CashDiscount": 123,
    "CashDiscountDays": 123
  },
  "SalesOrderShippingDetail": {
    "ShippingMethodId": 123,
    "DeliveryCompleteStatus": 0,
    "ShippingPriority": 123,
    "ShippingDate": "2023-11-07T05:31:56Z",
    "EstimatedDeliveryDate": "2023-11-07T05:31:56Z",
    "DeliveredDate": "2023-11-07T05:31:56Z",
    "OnHoldReasonId": 123,
    "ExtraWeight": 123
  },
  "ColorcodeId": 123,
  "IsExternalInvoice": true,
  "Comment": "<string>",
  "CustomerComment": "<string>",
  "IsCancelled": true,
  "LanguageIso": "<string>",
  "CancellationDetails": {
    "CancellationReasonId": 123,
    "CancellationComment": "<string>",
    "Date": "2023-11-07T05:31:56Z"
  },
  "SalesChannelId": "<string>",
  "UserCreatedId": 123,
  "UserId": 123,
  "TransactionStatusId": 123
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

x-api-key
string
header
required

Optional: If no token is present, the API Gateway injects it.

Headers

api-version
string

Specify the desired API version, e.g. '1.0'. If not provided, the last available version is set.

x-appid
string
required

This is the name of your application, e.g. "MyApp/1.0.0". It is used to identify your application.

x-appversion
string
required

This is where the version number of your application is entered, e.g. "1.0.0".

x-runas
string

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

X-SessionId
string<uuid>

The id of a session in which the call will be executed.

x-tenant-id
string<uuid>
required

The tenant ID for the target ERP instance.

Path Parameters

salesOrderId
integer<int32>
required

The id of the sales order to update.

Query Parameters

recalculateTax
enum<integer>

0 - Keine Neuberechnung, auch wenn steuerrelevante Felder geändert wurden. 1 - Nettopreise beibehalten (Änderungen des Mehrwertsteuersatzes werden vom Kunden getragen). 2 - Bruttopreise beibehalten (Änderungen des Mehrwertsteuersatzes werden vom Einzelhändler getragen). 0 = NoRecalculation, 1 = KeepNetPrices, 2 = KeepGrossPrices

Available options:
0,
1,
2
disableAutomaticWorkflows
boolean

If true, the workflows do not trigger automatic.

Body

application/json

The sales order to update.

Model Class: UpdateSalesOrder

ExternalNumber
string

The external number of the sales order.

BillingNumber
string

The number of the invoice.

CompanyId
integer<int32>

The company of the sales order.

DepartureCountry
object

The departure country information of the sales order. If none is indicated, it will be determined from the company's information.

CustomerId
integer<int32>

The customer ID.

CustomerVatID
string

The VAT ID of the customer.

BillingAddress
object

The billing address of the sales order.

Shipmentaddress
object

The shipping address of the sales order.

SalesOrderDate
string<date-time>

The date when the order was created.

SalesOrderPaymentDetails
object

Payment specific information of the sales order.

SalesOrderShippingDetail
object

Shipping specific information of the sales order.

ColorcodeId
integer<int32>

The colour code of the sales order.

Comment
string

A comment on the sales order.

CustomerComment
string

A customer comment on the sales order.

LanguageIso
string

The language of the order.

Response

The updated sales order.

Model Class: SalesOrder

Id
integer<int32>
required

Unique ID to identify a sales order file.

Number
string
required

The number of the sales order.

ExternalNumber
string
required

The external number of the sales order.

BillingNumber
string
required

The number of the invoice.

CompanyId
integer<int32>
required

The company of the sales order.

DepartureCountry
object
required

The departure country information of the sales order. If none is indicated, it will be determined from the company's information.

CustomerId
integer<int32>
required

The customer ID.

CustomerVatID
string
required

The VAT ID of the customer.

MerchantVatID
string
required

The VAT ID of the merchant.

BillingAddress
object
required

The billing address of the sales order.

Shipmentaddress
object
required

The shipping address of the sales order.

SalesOrderDate
string<date-time>
required

The date when the order was created.

SalesOrderPaymentDetails
object
required

Payment specific information of the sales order.

SalesOrderShippingDetail
object
required

Shipping specific information of the sales order.

ColorcodeId
integer<int32>
required

The colour code of the sales order.

IsExternalInvoice
boolean
required

Indicates if the invoice of the order was created in an external system, like Amazon VCS.

Comment
string
required

A comment on the sales order.

CustomerComment
string
required

A customer comment on the sales order.

IsCancelled
boolean
required

Indicates if the order has been cancelled. There is a special endpoint for cancelling sales orders.

LanguageIso
string
required

The language of the order.

CancellationDetails
object
required

The cancellation details in case the sales order has been cancelled.

SalesChannelId
string
required

The sales channel of the sales order.

UserCreatedId
integer<int32>
required

The user who created the sales order.

UserId
integer<int32>
required

The user who is responsible for the sales order.

TransactionStatusId
integer<int32>
required

Unique ID to identify a transaction's status.