curl --request PATCH \
--url https://api.jtl-cloud.com/erp/salesOrders/{salesOrderId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--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>"
}
'import requests
url = "https://api.jtl-cloud.com/erp/salesOrders/{salesOrderId}"
payload = {
"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>"
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
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>'
})
};
fetch('https://api.jtl-cloud.com/erp/salesOrders/{salesOrderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jtl-cloud.com/erp/salesOrders/{salesOrderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'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>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.jtl-cloud.com/erp/salesOrders/{salesOrderId}"
payload := strings.NewReader("{\n \"ExternalNumber\": \"<string>\",\n \"BillingNumber\": \"<string>\",\n \"CompanyId\": 123,\n \"DepartureCountry\": {\n \"CountryISO\": \"<string>\",\n \"State\": \"<string>\",\n \"CurrencyIso\": \"<string>\",\n \"CurrencyFactor\": 123\n },\n \"CustomerId\": 123,\n \"CustomerVatID\": \"<string>\",\n \"BillingAddress\": {\n \"Company\": \"<string>\",\n \"Company2\": \"<string>\",\n \"FormOfAddress\": \"<string>\",\n \"Title\": \"<string>\",\n \"FirstName\": \"<string>\",\n \"LastName\": \"<string>\",\n \"Street\": \"<string>\",\n \"Address2\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"CountryIso\": \"<string>\",\n \"VatID\": \"<string>\",\n \"PhoneNumber\": \"<string>\",\n \"MobilePhoneNumber\": \"<string>\",\n \"EmailAddress\": \"<string>\",\n \"Fax\": \"<string>\"\n },\n \"Shipmentaddress\": {\n \"Company\": \"<string>\",\n \"Company2\": \"<string>\",\n \"FormOfAddress\": \"<string>\",\n \"Title\": \"<string>\",\n \"FirstName\": \"<string>\",\n \"LastName\": \"<string>\",\n \"Street\": \"<string>\",\n \"Address2\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"CountryIso\": \"<string>\",\n \"VatID\": \"<string>\",\n \"PhoneNumber\": \"<string>\",\n \"MobilePhoneNumber\": \"<string>\",\n \"EmailAddress\": \"<string>\",\n \"Fax\": \"<string>\"\n },\n \"SalesOrderDate\": \"2023-11-07T05:31:56Z\",\n \"SalesOrderPaymentDetails\": {\n \"PaymentMethodId\": 123,\n \"CurrencyIso\": \"<string>\",\n \"CurrencyFactor\": 123,\n \"PaymentTarget\": 123,\n \"CashDiscount\": 123,\n \"CashDiscountDays\": 123\n },\n \"SalesOrderShippingDetail\": {\n \"ShippingMethodId\": 123,\n \"ShippingPriority\": 123,\n \"ShippingDate\": \"2023-11-07T05:31:56Z\",\n \"EstimatedDeliveryDate\": \"2023-11-07T05:31:56Z\",\n \"OnHoldReasonId\": 123,\n \"ExtraWeight\": 123\n },\n \"ColorcodeId\": 123,\n \"Comment\": \"<string>\",\n \"CustomerComment\": \"<string>\",\n \"LanguageIso\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.jtl-cloud.com/erp/salesOrders/{salesOrderId}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ExternalNumber\": \"<string>\",\n \"BillingNumber\": \"<string>\",\n \"CompanyId\": 123,\n \"DepartureCountry\": {\n \"CountryISO\": \"<string>\",\n \"State\": \"<string>\",\n \"CurrencyIso\": \"<string>\",\n \"CurrencyFactor\": 123\n },\n \"CustomerId\": 123,\n \"CustomerVatID\": \"<string>\",\n \"BillingAddress\": {\n \"Company\": \"<string>\",\n \"Company2\": \"<string>\",\n \"FormOfAddress\": \"<string>\",\n \"Title\": \"<string>\",\n \"FirstName\": \"<string>\",\n \"LastName\": \"<string>\",\n \"Street\": \"<string>\",\n \"Address2\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"CountryIso\": \"<string>\",\n \"VatID\": \"<string>\",\n \"PhoneNumber\": \"<string>\",\n \"MobilePhoneNumber\": \"<string>\",\n \"EmailAddress\": \"<string>\",\n \"Fax\": \"<string>\"\n },\n \"Shipmentaddress\": {\n \"Company\": \"<string>\",\n \"Company2\": \"<string>\",\n \"FormOfAddress\": \"<string>\",\n \"Title\": \"<string>\",\n \"FirstName\": \"<string>\",\n \"LastName\": \"<string>\",\n \"Street\": \"<string>\",\n \"Address2\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"CountryIso\": \"<string>\",\n \"VatID\": \"<string>\",\n \"PhoneNumber\": \"<string>\",\n \"MobilePhoneNumber\": \"<string>\",\n \"EmailAddress\": \"<string>\",\n \"Fax\": \"<string>\"\n },\n \"SalesOrderDate\": \"2023-11-07T05:31:56Z\",\n \"SalesOrderPaymentDetails\": {\n \"PaymentMethodId\": 123,\n \"CurrencyIso\": \"<string>\",\n \"CurrencyFactor\": 123,\n \"PaymentTarget\": 123,\n \"CashDiscount\": 123,\n \"CashDiscountDays\": 123\n },\n \"SalesOrderShippingDetail\": {\n \"ShippingMethodId\": 123,\n \"ShippingPriority\": 123,\n \"ShippingDate\": \"2023-11-07T05:31:56Z\",\n \"EstimatedDeliveryDate\": \"2023-11-07T05:31:56Z\",\n \"OnHoldReasonId\": 123,\n \"ExtraWeight\": 123\n },\n \"ColorcodeId\": 123,\n \"Comment\": \"<string>\",\n \"CustomerComment\": \"<string>\",\n \"LanguageIso\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/salesOrders/{salesOrderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ExternalNumber\": \"<string>\",\n \"BillingNumber\": \"<string>\",\n \"CompanyId\": 123,\n \"DepartureCountry\": {\n \"CountryISO\": \"<string>\",\n \"State\": \"<string>\",\n \"CurrencyIso\": \"<string>\",\n \"CurrencyFactor\": 123\n },\n \"CustomerId\": 123,\n \"CustomerVatID\": \"<string>\",\n \"BillingAddress\": {\n \"Company\": \"<string>\",\n \"Company2\": \"<string>\",\n \"FormOfAddress\": \"<string>\",\n \"Title\": \"<string>\",\n \"FirstName\": \"<string>\",\n \"LastName\": \"<string>\",\n \"Street\": \"<string>\",\n \"Address2\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"CountryIso\": \"<string>\",\n \"VatID\": \"<string>\",\n \"PhoneNumber\": \"<string>\",\n \"MobilePhoneNumber\": \"<string>\",\n \"EmailAddress\": \"<string>\",\n \"Fax\": \"<string>\"\n },\n \"Shipmentaddress\": {\n \"Company\": \"<string>\",\n \"Company2\": \"<string>\",\n \"FormOfAddress\": \"<string>\",\n \"Title\": \"<string>\",\n \"FirstName\": \"<string>\",\n \"LastName\": \"<string>\",\n \"Street\": \"<string>\",\n \"Address2\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"CountryIso\": \"<string>\",\n \"VatID\": \"<string>\",\n \"PhoneNumber\": \"<string>\",\n \"MobilePhoneNumber\": \"<string>\",\n \"EmailAddress\": \"<string>\",\n \"Fax\": \"<string>\"\n },\n \"SalesOrderDate\": \"2023-11-07T05:31:56Z\",\n \"SalesOrderPaymentDetails\": {\n \"PaymentMethodId\": 123,\n \"CurrencyIso\": \"<string>\",\n \"CurrencyFactor\": 123,\n \"PaymentTarget\": 123,\n \"CashDiscount\": 123,\n \"CashDiscountDays\": 123\n },\n \"SalesOrderShippingDetail\": {\n \"ShippingMethodId\": 123,\n \"ShippingPriority\": 123,\n \"ShippingDate\": \"2023-11-07T05:31:56Z\",\n \"EstimatedDeliveryDate\": \"2023-11-07T05:31:56Z\",\n \"OnHoldReasonId\": 123,\n \"ExtraWeight\": 123\n },\n \"ColorcodeId\": 123,\n \"Comment\": \"<string>\",\n \"CustomerComment\": \"<string>\",\n \"LanguageIso\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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,
"TotalGrossAmount": 123,
"CurrencyIso": "<string>",
"CurrencyFactor": 123,
"DateOfPayment": "2023-11-07T05:31:56Z",
"StillToPay": 123,
"PaymentTarget": 123,
"CashDiscount": 123,
"CashDiscountDays": 123
},
"SalesOrderShippingDetail": {
"ShippingMethodId": 123,
"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
}{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}Update Sales Order
Update a specific 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-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>"
}
'import requests
url = "https://api.jtl-cloud.com/erp/salesOrders/{salesOrderId}"
payload = {
"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>"
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
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>'
})
};
fetch('https://api.jtl-cloud.com/erp/salesOrders/{salesOrderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jtl-cloud.com/erp/salesOrders/{salesOrderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'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>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.jtl-cloud.com/erp/salesOrders/{salesOrderId}"
payload := strings.NewReader("{\n \"ExternalNumber\": \"<string>\",\n \"BillingNumber\": \"<string>\",\n \"CompanyId\": 123,\n \"DepartureCountry\": {\n \"CountryISO\": \"<string>\",\n \"State\": \"<string>\",\n \"CurrencyIso\": \"<string>\",\n \"CurrencyFactor\": 123\n },\n \"CustomerId\": 123,\n \"CustomerVatID\": \"<string>\",\n \"BillingAddress\": {\n \"Company\": \"<string>\",\n \"Company2\": \"<string>\",\n \"FormOfAddress\": \"<string>\",\n \"Title\": \"<string>\",\n \"FirstName\": \"<string>\",\n \"LastName\": \"<string>\",\n \"Street\": \"<string>\",\n \"Address2\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"CountryIso\": \"<string>\",\n \"VatID\": \"<string>\",\n \"PhoneNumber\": \"<string>\",\n \"MobilePhoneNumber\": \"<string>\",\n \"EmailAddress\": \"<string>\",\n \"Fax\": \"<string>\"\n },\n \"Shipmentaddress\": {\n \"Company\": \"<string>\",\n \"Company2\": \"<string>\",\n \"FormOfAddress\": \"<string>\",\n \"Title\": \"<string>\",\n \"FirstName\": \"<string>\",\n \"LastName\": \"<string>\",\n \"Street\": \"<string>\",\n \"Address2\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"CountryIso\": \"<string>\",\n \"VatID\": \"<string>\",\n \"PhoneNumber\": \"<string>\",\n \"MobilePhoneNumber\": \"<string>\",\n \"EmailAddress\": \"<string>\",\n \"Fax\": \"<string>\"\n },\n \"SalesOrderDate\": \"2023-11-07T05:31:56Z\",\n \"SalesOrderPaymentDetails\": {\n \"PaymentMethodId\": 123,\n \"CurrencyIso\": \"<string>\",\n \"CurrencyFactor\": 123,\n \"PaymentTarget\": 123,\n \"CashDiscount\": 123,\n \"CashDiscountDays\": 123\n },\n \"SalesOrderShippingDetail\": {\n \"ShippingMethodId\": 123,\n \"ShippingPriority\": 123,\n \"ShippingDate\": \"2023-11-07T05:31:56Z\",\n \"EstimatedDeliveryDate\": \"2023-11-07T05:31:56Z\",\n \"OnHoldReasonId\": 123,\n \"ExtraWeight\": 123\n },\n \"ColorcodeId\": 123,\n \"Comment\": \"<string>\",\n \"CustomerComment\": \"<string>\",\n \"LanguageIso\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.jtl-cloud.com/erp/salesOrders/{salesOrderId}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ExternalNumber\": \"<string>\",\n \"BillingNumber\": \"<string>\",\n \"CompanyId\": 123,\n \"DepartureCountry\": {\n \"CountryISO\": \"<string>\",\n \"State\": \"<string>\",\n \"CurrencyIso\": \"<string>\",\n \"CurrencyFactor\": 123\n },\n \"CustomerId\": 123,\n \"CustomerVatID\": \"<string>\",\n \"BillingAddress\": {\n \"Company\": \"<string>\",\n \"Company2\": \"<string>\",\n \"FormOfAddress\": \"<string>\",\n \"Title\": \"<string>\",\n \"FirstName\": \"<string>\",\n \"LastName\": \"<string>\",\n \"Street\": \"<string>\",\n \"Address2\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"CountryIso\": \"<string>\",\n \"VatID\": \"<string>\",\n \"PhoneNumber\": \"<string>\",\n \"MobilePhoneNumber\": \"<string>\",\n \"EmailAddress\": \"<string>\",\n \"Fax\": \"<string>\"\n },\n \"Shipmentaddress\": {\n \"Company\": \"<string>\",\n \"Company2\": \"<string>\",\n \"FormOfAddress\": \"<string>\",\n \"Title\": \"<string>\",\n \"FirstName\": \"<string>\",\n \"LastName\": \"<string>\",\n \"Street\": \"<string>\",\n \"Address2\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"CountryIso\": \"<string>\",\n \"VatID\": \"<string>\",\n \"PhoneNumber\": \"<string>\",\n \"MobilePhoneNumber\": \"<string>\",\n \"EmailAddress\": \"<string>\",\n \"Fax\": \"<string>\"\n },\n \"SalesOrderDate\": \"2023-11-07T05:31:56Z\",\n \"SalesOrderPaymentDetails\": {\n \"PaymentMethodId\": 123,\n \"CurrencyIso\": \"<string>\",\n \"CurrencyFactor\": 123,\n \"PaymentTarget\": 123,\n \"CashDiscount\": 123,\n \"CashDiscountDays\": 123\n },\n \"SalesOrderShippingDetail\": {\n \"ShippingMethodId\": 123,\n \"ShippingPriority\": 123,\n \"ShippingDate\": \"2023-11-07T05:31:56Z\",\n \"EstimatedDeliveryDate\": \"2023-11-07T05:31:56Z\",\n \"OnHoldReasonId\": 123,\n \"ExtraWeight\": 123\n },\n \"ColorcodeId\": 123,\n \"Comment\": \"<string>\",\n \"CustomerComment\": \"<string>\",\n \"LanguageIso\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/salesOrders/{salesOrderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ExternalNumber\": \"<string>\",\n \"BillingNumber\": \"<string>\",\n \"CompanyId\": 123,\n \"DepartureCountry\": {\n \"CountryISO\": \"<string>\",\n \"State\": \"<string>\",\n \"CurrencyIso\": \"<string>\",\n \"CurrencyFactor\": 123\n },\n \"CustomerId\": 123,\n \"CustomerVatID\": \"<string>\",\n \"BillingAddress\": {\n \"Company\": \"<string>\",\n \"Company2\": \"<string>\",\n \"FormOfAddress\": \"<string>\",\n \"Title\": \"<string>\",\n \"FirstName\": \"<string>\",\n \"LastName\": \"<string>\",\n \"Street\": \"<string>\",\n \"Address2\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"CountryIso\": \"<string>\",\n \"VatID\": \"<string>\",\n \"PhoneNumber\": \"<string>\",\n \"MobilePhoneNumber\": \"<string>\",\n \"EmailAddress\": \"<string>\",\n \"Fax\": \"<string>\"\n },\n \"Shipmentaddress\": {\n \"Company\": \"<string>\",\n \"Company2\": \"<string>\",\n \"FormOfAddress\": \"<string>\",\n \"Title\": \"<string>\",\n \"FirstName\": \"<string>\",\n \"LastName\": \"<string>\",\n \"Street\": \"<string>\",\n \"Address2\": \"<string>\",\n \"PostalCode\": \"<string>\",\n \"City\": \"<string>\",\n \"State\": \"<string>\",\n \"CountryIso\": \"<string>\",\n \"VatID\": \"<string>\",\n \"PhoneNumber\": \"<string>\",\n \"MobilePhoneNumber\": \"<string>\",\n \"EmailAddress\": \"<string>\",\n \"Fax\": \"<string>\"\n },\n \"SalesOrderDate\": \"2023-11-07T05:31:56Z\",\n \"SalesOrderPaymentDetails\": {\n \"PaymentMethodId\": 123,\n \"CurrencyIso\": \"<string>\",\n \"CurrencyFactor\": 123,\n \"PaymentTarget\": 123,\n \"CashDiscount\": 123,\n \"CashDiscountDays\": 123\n },\n \"SalesOrderShippingDetail\": {\n \"ShippingMethodId\": 123,\n \"ShippingPriority\": 123,\n \"ShippingDate\": \"2023-11-07T05:31:56Z\",\n \"EstimatedDeliveryDate\": \"2023-11-07T05:31:56Z\",\n \"OnHoldReasonId\": 123,\n \"ExtraWeight\": 123\n },\n \"ColorcodeId\": 123,\n \"Comment\": \"<string>\",\n \"CustomerComment\": \"<string>\",\n \"LanguageIso\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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,
"TotalGrossAmount": 123,
"CurrencyIso": "<string>",
"CurrencyFactor": 123,
"DateOfPayment": "2023-11-07T05:31:56Z",
"StillToPay": 123,
"PaymentTarget": 123,
"CashDiscount": 123,
"CashDiscountDays": 123
},
"SalesOrderShippingDetail": {
"ShippingMethodId": 123,
"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
}{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
The Company-Id (int or uuid) of the company on whose behalf the request is executed.
The tenant ID for the target ERP instance.
Path Parameters
The id of the sales order to update.
Query Parameters
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
0, 1, 2 If true, the workflows do not trigger automatic.
Body
The sales order to update.
Model Class: UpdateSalesOrder
The external number of the sales order.
The number of the invoice.
The company of the sales order.
The departure country information of the sales order. If none is indicated, it will be determined from the company's information.
Show child attributes
Show child attributes
The customer ID.
The VAT ID of the customer.
The billing address of the sales order.
Show child attributes
Show child attributes
The shipping address of the sales order.
Show child attributes
Show child attributes
The date when the order was created.
Payment specific information of the sales order.
Show child attributes
Show child attributes
Shipping specific information of the sales order.
Show child attributes
Show child attributes
The colour code of the sales order.
A comment on the sales order.
A customer comment on the sales order.
The language of the order.
Response
The updated sales order.
Model Class: SalesOrder
Unique ID to identify a sales order file.
The number of the sales order.
The external number of the sales order.
The number of the invoice.
The company of the sales order.
The departure country information of the sales order. If none is indicated, it will be determined from the company's information.
Show child attributes
Show child attributes
The customer ID.
The VAT ID of the customer.
The VAT ID of the merchant.
The billing address of the sales order.
Show child attributes
Show child attributes
The shipping address of the sales order.
Show child attributes
Show child attributes
The date when the order was created.
Payment specific information of the sales order.
Show child attributes
Show child attributes
Shipping specific information of the sales order.
Show child attributes
Show child attributes
The colour code of the sales order.
Indicates if the invoice of the order was created in an external system, like Amazon VCS.
A comment on the sales order.
A customer comment on the sales order.
Indicates if the order has been cancelled. There is a special endpoint for cancelling sales orders.
The language of the order.
The cancellation details in case the sales order has been cancelled.
Show child attributes
Show child attributes
The sales channel of the sales order.
The user who created the sales order.
The user who is responsible for the sales order.
Unique ID to identify a transaction's status.
Was this page helpful?