curl --request GET \
--url https://api.jtl-cloud.com/erp/v2/sales-orders/new \
--header 'Authorization: Bearer <token>' \
--header 'x-tenant-id: <x-tenant-id>'import requests
url = "https://api.jtl-cloud.com/erp/v2/sales-orders/new"
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-tenant-id': '<x-tenant-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.jtl-cloud.com/erp/v2/sales-orders/new', 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/v2/sales-orders/new",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.jtl-cloud.com/erp/v2/sales-orders/new"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jtl-cloud.com/erp/v2/sales-orders/new")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v2/sales-orders/new")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"itemDescriptionType": 0,
"readOnlyType": 0,
"companyId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"languageId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"additionalWeight": 123,
"specialTaxTreatment": 0,
"taxSetting": 0,
"departureCountry": {
"countryIso": "<string>",
"currencyIso": "<string>",
"currencyFactor": 123
},
"paymentDetails": {
"currencyIso": "<string>",
"currencyFactor": 123,
"paymentDueDateInDays": 123,
"cashDiscount": 123,
"cashDiscountDays": 123
},
"billingAddress": {
"salutation": "<string>",
"title": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"company": "<string>",
"additionalCompanyLine": "<string>",
"street": "<string>",
"additionalAddressLine": "<string>",
"postalCode": "<string>",
"city": "<string>",
"state": "<string>",
"countryIso": "<string>",
"countryName": "<string>",
"emailAddress": "<string>",
"phoneNumber": "<string>",
"mobilePhoneNumber": "<string>",
"fax": "<string>"
},
"shipmentAddress": {
"salutation": "<string>",
"title": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"company": "<string>",
"additionalCompanyLine": "<string>",
"street": "<string>",
"additionalAddressLine": "<string>",
"postalCode": "<string>",
"city": "<string>",
"state": "<string>",
"countryIso": "<string>",
"countryName": "<string>",
"emailAddress": "<string>",
"phoneNumber": "<string>",
"mobilePhoneNumber": "<string>",
"fax": "<string>"
},
"salesOrderDate": "2023-11-07T05:31:56Z",
"vatId": "<string>"
}Get Empty Sales Order
Returns an empty sales order with default values without persisting it. This is equivalent to opening a new sales order dialog in the UI.
curl --request GET \
--url https://api.jtl-cloud.com/erp/v2/sales-orders/new \
--header 'Authorization: Bearer <token>' \
--header 'x-tenant-id: <x-tenant-id>'import requests
url = "https://api.jtl-cloud.com/erp/v2/sales-orders/new"
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-tenant-id': '<x-tenant-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.jtl-cloud.com/erp/v2/sales-orders/new', 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/v2/sales-orders/new",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.jtl-cloud.com/erp/v2/sales-orders/new"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jtl-cloud.com/erp/v2/sales-orders/new")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v2/sales-orders/new")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"itemDescriptionType": 0,
"readOnlyType": 0,
"companyId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"languageId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"additionalWeight": 123,
"specialTaxTreatment": 0,
"taxSetting": 0,
"departureCountry": {
"countryIso": "<string>",
"currencyIso": "<string>",
"currencyFactor": 123
},
"paymentDetails": {
"currencyIso": "<string>",
"currencyFactor": 123,
"paymentDueDateInDays": 123,
"cashDiscount": 123,
"cashDiscountDays": 123
},
"billingAddress": {
"salutation": "<string>",
"title": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"company": "<string>",
"additionalCompanyLine": "<string>",
"street": "<string>",
"additionalAddressLine": "<string>",
"postalCode": "<string>",
"city": "<string>",
"state": "<string>",
"countryIso": "<string>",
"countryName": "<string>",
"emailAddress": "<string>",
"phoneNumber": "<string>",
"mobilePhoneNumber": "<string>",
"fax": "<string>"
},
"shipmentAddress": {
"salutation": "<string>",
"title": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"company": "<string>",
"additionalCompanyLine": "<string>",
"street": "<string>",
"additionalAddressLine": "<string>",
"postalCode": "<string>",
"city": "<string>",
"state": "<string>",
"countryIso": "<string>",
"countryName": "<string>",
"emailAddress": "<string>",
"phoneNumber": "<string>",
"mobilePhoneNumber": "<string>",
"fax": "<string>"
},
"salesOrderDate": "2023-11-07T05:31:56Z",
"vatId": "<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.
Response
An empty sales order with default values.
The default item description type from global settings.
0, 1, 2 The default read-only type.
0, 1, 2 The company ID the sales order is initialized for.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
The default language ID.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
The default additional weight from global settings.
The special tax treatment setting.
0, 1, 2, 3 The tax setting.
0, 10, 15, 20 The departure country information.
Show child attributes
Show child attributes
The payment details.
Show child attributes
Show child attributes
The initialized empty billing address.
Show child attributes
Show child attributes
The initialized empty shipment address.
Show child attributes
Show child attributes
The default sales order date (current date/time).
The VAT ID of the company.
Was this page helpful?