curl --request POST \
--url https://api.jtl-cloud.com/erp/v2/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"companyId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"customerGroupId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"customerCategoryId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"paymentMethodId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"accountsReceivableNumber": 123,
"birthday": "2023-11-07T05:31:56Z",
"commercialRegisterNumber": "<string>",
"customerNumber": "<string>",
"ebayName": "<string>",
"homepage": "<string>",
"initialContact": "<string>",
"isCashRegisterBased": true,
"isLocked": true,
"languageIso": "<string>",
"taxIdentificationNumber": "<string>",
"paymentSettings": {
"creditLimit": 123,
"paymentDueDateInDays": 123,
"discount": 123,
"isDunningBlocked": true
}
}
'import requests
url = "https://api.jtl-cloud.com/erp/v2/customers"
payload = {
"companyId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"customerGroupId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"customerCategoryId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"paymentMethodId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"accountsReceivableNumber": 123,
"birthday": "2023-11-07T05:31:56Z",
"commercialRegisterNumber": "<string>",
"customerNumber": "<string>",
"ebayName": "<string>",
"homepage": "<string>",
"initialContact": "<string>",
"isCashRegisterBased": True,
"isLocked": True,
"languageIso": "<string>",
"taxIdentificationNumber": "<string>",
"paymentSettings": {
"creditLimit": 123,
"paymentDueDateInDays": 123,
"discount": 123,
"isDunningBlocked": True
}
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
companyId: 'b45f6432-2462-4c6f-b00f-1d9d01000000',
customerGroupId: 'b45f6432-2462-4c6f-b00f-1d9d01000000',
customerCategoryId: 'b45f6432-2462-4c6f-b00f-1d9d01000000',
paymentMethodId: 'b45f6432-2462-4c6f-b00f-1d9d01000000',
accountsReceivableNumber: 123,
birthday: '2023-11-07T05:31:56Z',
commercialRegisterNumber: '<string>',
customerNumber: '<string>',
ebayName: '<string>',
homepage: '<string>',
initialContact: '<string>',
isCashRegisterBased: true,
isLocked: true,
languageIso: '<string>',
taxIdentificationNumber: '<string>',
paymentSettings: {
creditLimit: 123,
paymentDueDateInDays: 123,
discount: 123,
isDunningBlocked: true
}
})
};
fetch('https://api.jtl-cloud.com/erp/v2/customers', 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/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'companyId' => 'b45f6432-2462-4c6f-b00f-1d9d01000000',
'customerGroupId' => 'b45f6432-2462-4c6f-b00f-1d9d01000000',
'customerCategoryId' => 'b45f6432-2462-4c6f-b00f-1d9d01000000',
'paymentMethodId' => 'b45f6432-2462-4c6f-b00f-1d9d01000000',
'accountsReceivableNumber' => 123,
'birthday' => '2023-11-07T05:31:56Z',
'commercialRegisterNumber' => '<string>',
'customerNumber' => '<string>',
'ebayName' => '<string>',
'homepage' => '<string>',
'initialContact' => '<string>',
'isCashRegisterBased' => true,
'isLocked' => true,
'languageIso' => '<string>',
'taxIdentificationNumber' => '<string>',
'paymentSettings' => [
'creditLimit' => 123,
'paymentDueDateInDays' => 123,
'discount' => 123,
'isDunningBlocked' => true
]
]),
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/v2/customers"
payload := strings.NewReader("{\n \"companyId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"customerGroupId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"customerCategoryId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"paymentMethodId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"accountsReceivableNumber\": 123,\n \"birthday\": \"2023-11-07T05:31:56Z\",\n \"commercialRegisterNumber\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"ebayName\": \"<string>\",\n \"homepage\": \"<string>\",\n \"initialContact\": \"<string>\",\n \"isCashRegisterBased\": true,\n \"isLocked\": true,\n \"languageIso\": \"<string>\",\n \"taxIdentificationNumber\": \"<string>\",\n \"paymentSettings\": {\n \"creditLimit\": 123,\n \"paymentDueDateInDays\": 123,\n \"discount\": 123,\n \"isDunningBlocked\": true\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.jtl-cloud.com/erp/v2/customers")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"companyId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"customerGroupId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"customerCategoryId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"paymentMethodId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"accountsReceivableNumber\": 123,\n \"birthday\": \"2023-11-07T05:31:56Z\",\n \"commercialRegisterNumber\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"ebayName\": \"<string>\",\n \"homepage\": \"<string>\",\n \"initialContact\": \"<string>\",\n \"isCashRegisterBased\": true,\n \"isLocked\": true,\n \"languageIso\": \"<string>\",\n \"taxIdentificationNumber\": \"<string>\",\n \"paymentSettings\": {\n \"creditLimit\": 123,\n \"paymentDueDateInDays\": 123,\n \"discount\": 123,\n \"isDunningBlocked\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v2/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"customerGroupId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"customerCategoryId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"paymentMethodId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"accountsReceivableNumber\": 123,\n \"birthday\": \"2023-11-07T05:31:56Z\",\n \"commercialRegisterNumber\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"ebayName\": \"<string>\",\n \"homepage\": \"<string>\",\n \"initialContact\": \"<string>\",\n \"isCashRegisterBased\": true,\n \"isLocked\": true,\n \"languageIso\": \"<string>\",\n \"taxIdentificationNumber\": \"<string>\",\n \"paymentSettings\": {\n \"creditLimit\": 123,\n \"paymentDueDateInDays\": 123,\n \"discount\": 123,\n \"isDunningBlocked\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"customerId": "b45f6432-2462-4c6f-b00f-1d9d01000000"
}Creates a new customer.
Creates a new customer.
curl --request POST \
--url https://api.jtl-cloud.com/erp/v2/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"companyId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"customerGroupId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"customerCategoryId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"paymentMethodId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"accountsReceivableNumber": 123,
"birthday": "2023-11-07T05:31:56Z",
"commercialRegisterNumber": "<string>",
"customerNumber": "<string>",
"ebayName": "<string>",
"homepage": "<string>",
"initialContact": "<string>",
"isCashRegisterBased": true,
"isLocked": true,
"languageIso": "<string>",
"taxIdentificationNumber": "<string>",
"paymentSettings": {
"creditLimit": 123,
"paymentDueDateInDays": 123,
"discount": 123,
"isDunningBlocked": true
}
}
'import requests
url = "https://api.jtl-cloud.com/erp/v2/customers"
payload = {
"companyId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"customerGroupId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"customerCategoryId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"paymentMethodId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"accountsReceivableNumber": 123,
"birthday": "2023-11-07T05:31:56Z",
"commercialRegisterNumber": "<string>",
"customerNumber": "<string>",
"ebayName": "<string>",
"homepage": "<string>",
"initialContact": "<string>",
"isCashRegisterBased": True,
"isLocked": True,
"languageIso": "<string>",
"taxIdentificationNumber": "<string>",
"paymentSettings": {
"creditLimit": 123,
"paymentDueDateInDays": 123,
"discount": 123,
"isDunningBlocked": True
}
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
companyId: 'b45f6432-2462-4c6f-b00f-1d9d01000000',
customerGroupId: 'b45f6432-2462-4c6f-b00f-1d9d01000000',
customerCategoryId: 'b45f6432-2462-4c6f-b00f-1d9d01000000',
paymentMethodId: 'b45f6432-2462-4c6f-b00f-1d9d01000000',
accountsReceivableNumber: 123,
birthday: '2023-11-07T05:31:56Z',
commercialRegisterNumber: '<string>',
customerNumber: '<string>',
ebayName: '<string>',
homepage: '<string>',
initialContact: '<string>',
isCashRegisterBased: true,
isLocked: true,
languageIso: '<string>',
taxIdentificationNumber: '<string>',
paymentSettings: {
creditLimit: 123,
paymentDueDateInDays: 123,
discount: 123,
isDunningBlocked: true
}
})
};
fetch('https://api.jtl-cloud.com/erp/v2/customers', 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/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'companyId' => 'b45f6432-2462-4c6f-b00f-1d9d01000000',
'customerGroupId' => 'b45f6432-2462-4c6f-b00f-1d9d01000000',
'customerCategoryId' => 'b45f6432-2462-4c6f-b00f-1d9d01000000',
'paymentMethodId' => 'b45f6432-2462-4c6f-b00f-1d9d01000000',
'accountsReceivableNumber' => 123,
'birthday' => '2023-11-07T05:31:56Z',
'commercialRegisterNumber' => '<string>',
'customerNumber' => '<string>',
'ebayName' => '<string>',
'homepage' => '<string>',
'initialContact' => '<string>',
'isCashRegisterBased' => true,
'isLocked' => true,
'languageIso' => '<string>',
'taxIdentificationNumber' => '<string>',
'paymentSettings' => [
'creditLimit' => 123,
'paymentDueDateInDays' => 123,
'discount' => 123,
'isDunningBlocked' => true
]
]),
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/v2/customers"
payload := strings.NewReader("{\n \"companyId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"customerGroupId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"customerCategoryId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"paymentMethodId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"accountsReceivableNumber\": 123,\n \"birthday\": \"2023-11-07T05:31:56Z\",\n \"commercialRegisterNumber\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"ebayName\": \"<string>\",\n \"homepage\": \"<string>\",\n \"initialContact\": \"<string>\",\n \"isCashRegisterBased\": true,\n \"isLocked\": true,\n \"languageIso\": \"<string>\",\n \"taxIdentificationNumber\": \"<string>\",\n \"paymentSettings\": {\n \"creditLimit\": 123,\n \"paymentDueDateInDays\": 123,\n \"discount\": 123,\n \"isDunningBlocked\": true\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.jtl-cloud.com/erp/v2/customers")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"companyId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"customerGroupId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"customerCategoryId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"paymentMethodId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"accountsReceivableNumber\": 123,\n \"birthday\": \"2023-11-07T05:31:56Z\",\n \"commercialRegisterNumber\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"ebayName\": \"<string>\",\n \"homepage\": \"<string>\",\n \"initialContact\": \"<string>\",\n \"isCashRegisterBased\": true,\n \"isLocked\": true,\n \"languageIso\": \"<string>\",\n \"taxIdentificationNumber\": \"<string>\",\n \"paymentSettings\": {\n \"creditLimit\": 123,\n \"paymentDueDateInDays\": 123,\n \"discount\": 123,\n \"isDunningBlocked\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v2/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"customerGroupId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"customerCategoryId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"paymentMethodId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"accountsReceivableNumber\": 123,\n \"birthday\": \"2023-11-07T05:31:56Z\",\n \"commercialRegisterNumber\": \"<string>\",\n \"customerNumber\": \"<string>\",\n \"ebayName\": \"<string>\",\n \"homepage\": \"<string>\",\n \"initialContact\": \"<string>\",\n \"isCashRegisterBased\": true,\n \"isLocked\": true,\n \"languageIso\": \"<string>\",\n \"taxIdentificationNumber\": \"<string>\",\n \"paymentSettings\": {\n \"creditLimit\": 123,\n \"paymentDueDateInDays\": 123,\n \"discount\": 123,\n \"isDunningBlocked\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"customerId": "b45f6432-2462-4c6f-b00f-1d9d01000000"
}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.
Body
Request parameters
Creates a new customer. - Request
ID of the company the customer belongs to. Optional — defaults to 0 (no company) when omitted.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
Customer group for the customer to be in.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
The customer's category ID.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
The customer's preferred payment method ID.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
The accounts receivable number of the customer.
The customer's date of birth.
The customer's commercial register number.
Number of the customer. If no number is given when posting a customer, the number will be generated automatically.
The customers ebay name.
The customers homepage URL.
The source of initial contact. This could be for example a specific sales channel, a convention or a marketing campaign.
States if a customer is from a cash-register or point of sale and if their data should be synchronized with JTL-POS, for example.
The customer's locked status.
The customer's preferred language in ISO format (e.g. "de", "en").
The customer's tax identification number.
Default billing address of the customer.
Show child attributes
Show child attributes
Default shipping address of the customer.
Show child attributes
Show child attributes
Settings relevant to payment for the customer.
Show child attributes
Show child attributes
Response
The customer has been created successfully.
Creates a new customer. - Response
Unique ID of the newly created customer.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
Was this page helpful?