curl --request PATCH \
--url https://api.jtl-cloud.com/erp/v2/customers/{customerId} \
--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>",
"addresses": [
{
"customerAddressId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"street": "<string>",
"additionalAddressLine": "<string>",
"city": "<string>",
"postalCode": "<string>",
"state": "<string>",
"countryIso": "<string>",
"emailAddress": "<string>",
"phoneNumber": "<string>",
"mobilePhoneNumber": "<string>",
"faxNumber": "<string>",
"vatId": "<string>",
"gln": "<string>",
"salutation": "<string>",
"title": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"companyName": "<string>",
"additionalCompanyLine": "<string>",
"isDefaultAddress": true
}
],
"paymentSettings": {
"creditLimit": 123,
"paymentDueDateInDays": 123,
"discount": 123,
"isDunningBlocked": true
},
"createdDate": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.jtl-cloud.com/erp/v2/customers/{customerId}"
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>",
"addresses": [
{
"customerAddressId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"street": "<string>",
"additionalAddressLine": "<string>",
"city": "<string>",
"postalCode": "<string>",
"state": "<string>",
"countryIso": "<string>",
"emailAddress": "<string>",
"phoneNumber": "<string>",
"mobilePhoneNumber": "<string>",
"faxNumber": "<string>",
"vatId": "<string>",
"gln": "<string>",
"salutation": "<string>",
"title": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"companyName": "<string>",
"additionalCompanyLine": "<string>",
"isDefaultAddress": True
}
],
"paymentSettings": {
"creditLimit": 123,
"paymentDueDateInDays": 123,
"discount": 123,
"isDunningBlocked": True
},
"createdDate": "2023-11-07T05:31:56Z"
}
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({
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>',
addresses: [
{
customerAddressId: 'b45f6432-2462-4c6f-b00f-1d9d01000000',
street: '<string>',
additionalAddressLine: '<string>',
city: '<string>',
postalCode: '<string>',
state: '<string>',
countryIso: '<string>',
emailAddress: '<string>',
phoneNumber: '<string>',
mobilePhoneNumber: '<string>',
faxNumber: '<string>',
vatId: '<string>',
gln: '<string>',
salutation: '<string>',
title: '<string>',
firstName: '<string>',
lastName: '<string>',
companyName: '<string>',
additionalCompanyLine: '<string>',
isDefaultAddress: true
}
],
paymentSettings: {
creditLimit: 123,
paymentDueDateInDays: 123,
discount: 123,
isDunningBlocked: true
},
createdDate: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.jtl-cloud.com/erp/v2/customers/{customerId}', 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/{customerId}",
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([
'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>',
'addresses' => [
[
'customerAddressId' => 'b45f6432-2462-4c6f-b00f-1d9d01000000',
'street' => '<string>',
'additionalAddressLine' => '<string>',
'city' => '<string>',
'postalCode' => '<string>',
'state' => '<string>',
'countryIso' => '<string>',
'emailAddress' => '<string>',
'phoneNumber' => '<string>',
'mobilePhoneNumber' => '<string>',
'faxNumber' => '<string>',
'vatId' => '<string>',
'gln' => '<string>',
'salutation' => '<string>',
'title' => '<string>',
'firstName' => '<string>',
'lastName' => '<string>',
'companyName' => '<string>',
'additionalCompanyLine' => '<string>',
'isDefaultAddress' => true
]
],
'paymentSettings' => [
'creditLimit' => 123,
'paymentDueDateInDays' => 123,
'discount' => 123,
'isDunningBlocked' => true
],
'createdDate' => '2023-11-07T05:31:56Z'
]),
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/{customerId}"
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 \"addresses\": [\n {\n \"customerAddressId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"street\": \"<string>\",\n \"additionalAddressLine\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"state\": \"<string>\",\n \"countryIso\": \"<string>\",\n \"emailAddress\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"mobilePhoneNumber\": \"<string>\",\n \"faxNumber\": \"<string>\",\n \"vatId\": \"<string>\",\n \"gln\": \"<string>\",\n \"salutation\": \"<string>\",\n \"title\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"companyName\": \"<string>\",\n \"additionalCompanyLine\": \"<string>\",\n \"isDefaultAddress\": true\n }\n ],\n \"paymentSettings\": {\n \"creditLimit\": 123,\n \"paymentDueDateInDays\": 123,\n \"discount\": 123,\n \"isDunningBlocked\": true\n },\n \"createdDate\": \"2023-11-07T05:31:56Z\"\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/v2/customers/{customerId}")
.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 \"addresses\": [\n {\n \"customerAddressId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"street\": \"<string>\",\n \"additionalAddressLine\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"state\": \"<string>\",\n \"countryIso\": \"<string>\",\n \"emailAddress\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"mobilePhoneNumber\": \"<string>\",\n \"faxNumber\": \"<string>\",\n \"vatId\": \"<string>\",\n \"gln\": \"<string>\",\n \"salutation\": \"<string>\",\n \"title\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"companyName\": \"<string>\",\n \"additionalCompanyLine\": \"<string>\",\n \"isDefaultAddress\": true\n }\n ],\n \"paymentSettings\": {\n \"creditLimit\": 123,\n \"paymentDueDateInDays\": 123,\n \"discount\": 123,\n \"isDunningBlocked\": true\n },\n \"createdDate\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v2/customers/{customerId}")
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 \"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 \"addresses\": [\n {\n \"customerAddressId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"street\": \"<string>\",\n \"additionalAddressLine\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"state\": \"<string>\",\n \"countryIso\": \"<string>\",\n \"emailAddress\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"mobilePhoneNumber\": \"<string>\",\n \"faxNumber\": \"<string>\",\n \"vatId\": \"<string>\",\n \"gln\": \"<string>\",\n \"salutation\": \"<string>\",\n \"title\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"companyName\": \"<string>\",\n \"additionalCompanyLine\": \"<string>\",\n \"isDefaultAddress\": true\n }\n ],\n \"paymentSettings\": {\n \"creditLimit\": 123,\n \"paymentDueDateInDays\": 123,\n \"discount\": 123,\n \"isDunningBlocked\": true\n },\n \"createdDate\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"customerId": "b45f6432-2462-4c6f-b00f-1d9d01000000"
}Updates a customer.
Updates a customer.
curl --request PATCH \
--url https://api.jtl-cloud.com/erp/v2/customers/{customerId} \
--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>",
"addresses": [
{
"customerAddressId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"street": "<string>",
"additionalAddressLine": "<string>",
"city": "<string>",
"postalCode": "<string>",
"state": "<string>",
"countryIso": "<string>",
"emailAddress": "<string>",
"phoneNumber": "<string>",
"mobilePhoneNumber": "<string>",
"faxNumber": "<string>",
"vatId": "<string>",
"gln": "<string>",
"salutation": "<string>",
"title": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"companyName": "<string>",
"additionalCompanyLine": "<string>",
"isDefaultAddress": true
}
],
"paymentSettings": {
"creditLimit": 123,
"paymentDueDateInDays": 123,
"discount": 123,
"isDunningBlocked": true
},
"createdDate": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.jtl-cloud.com/erp/v2/customers/{customerId}"
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>",
"addresses": [
{
"customerAddressId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"street": "<string>",
"additionalAddressLine": "<string>",
"city": "<string>",
"postalCode": "<string>",
"state": "<string>",
"countryIso": "<string>",
"emailAddress": "<string>",
"phoneNumber": "<string>",
"mobilePhoneNumber": "<string>",
"faxNumber": "<string>",
"vatId": "<string>",
"gln": "<string>",
"salutation": "<string>",
"title": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"companyName": "<string>",
"additionalCompanyLine": "<string>",
"isDefaultAddress": True
}
],
"paymentSettings": {
"creditLimit": 123,
"paymentDueDateInDays": 123,
"discount": 123,
"isDunningBlocked": True
},
"createdDate": "2023-11-07T05:31:56Z"
}
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({
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>',
addresses: [
{
customerAddressId: 'b45f6432-2462-4c6f-b00f-1d9d01000000',
street: '<string>',
additionalAddressLine: '<string>',
city: '<string>',
postalCode: '<string>',
state: '<string>',
countryIso: '<string>',
emailAddress: '<string>',
phoneNumber: '<string>',
mobilePhoneNumber: '<string>',
faxNumber: '<string>',
vatId: '<string>',
gln: '<string>',
salutation: '<string>',
title: '<string>',
firstName: '<string>',
lastName: '<string>',
companyName: '<string>',
additionalCompanyLine: '<string>',
isDefaultAddress: true
}
],
paymentSettings: {
creditLimit: 123,
paymentDueDateInDays: 123,
discount: 123,
isDunningBlocked: true
},
createdDate: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.jtl-cloud.com/erp/v2/customers/{customerId}', 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/{customerId}",
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([
'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>',
'addresses' => [
[
'customerAddressId' => 'b45f6432-2462-4c6f-b00f-1d9d01000000',
'street' => '<string>',
'additionalAddressLine' => '<string>',
'city' => '<string>',
'postalCode' => '<string>',
'state' => '<string>',
'countryIso' => '<string>',
'emailAddress' => '<string>',
'phoneNumber' => '<string>',
'mobilePhoneNumber' => '<string>',
'faxNumber' => '<string>',
'vatId' => '<string>',
'gln' => '<string>',
'salutation' => '<string>',
'title' => '<string>',
'firstName' => '<string>',
'lastName' => '<string>',
'companyName' => '<string>',
'additionalCompanyLine' => '<string>',
'isDefaultAddress' => true
]
],
'paymentSettings' => [
'creditLimit' => 123,
'paymentDueDateInDays' => 123,
'discount' => 123,
'isDunningBlocked' => true
],
'createdDate' => '2023-11-07T05:31:56Z'
]),
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/{customerId}"
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 \"addresses\": [\n {\n \"customerAddressId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"street\": \"<string>\",\n \"additionalAddressLine\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"state\": \"<string>\",\n \"countryIso\": \"<string>\",\n \"emailAddress\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"mobilePhoneNumber\": \"<string>\",\n \"faxNumber\": \"<string>\",\n \"vatId\": \"<string>\",\n \"gln\": \"<string>\",\n \"salutation\": \"<string>\",\n \"title\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"companyName\": \"<string>\",\n \"additionalCompanyLine\": \"<string>\",\n \"isDefaultAddress\": true\n }\n ],\n \"paymentSettings\": {\n \"creditLimit\": 123,\n \"paymentDueDateInDays\": 123,\n \"discount\": 123,\n \"isDunningBlocked\": true\n },\n \"createdDate\": \"2023-11-07T05:31:56Z\"\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/v2/customers/{customerId}")
.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 \"addresses\": [\n {\n \"customerAddressId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"street\": \"<string>\",\n \"additionalAddressLine\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"state\": \"<string>\",\n \"countryIso\": \"<string>\",\n \"emailAddress\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"mobilePhoneNumber\": \"<string>\",\n \"faxNumber\": \"<string>\",\n \"vatId\": \"<string>\",\n \"gln\": \"<string>\",\n \"salutation\": \"<string>\",\n \"title\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"companyName\": \"<string>\",\n \"additionalCompanyLine\": \"<string>\",\n \"isDefaultAddress\": true\n }\n ],\n \"paymentSettings\": {\n \"creditLimit\": 123,\n \"paymentDueDateInDays\": 123,\n \"discount\": 123,\n \"isDunningBlocked\": true\n },\n \"createdDate\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v2/customers/{customerId}")
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 \"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 \"addresses\": [\n {\n \"customerAddressId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"street\": \"<string>\",\n \"additionalAddressLine\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"state\": \"<string>\",\n \"countryIso\": \"<string>\",\n \"emailAddress\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"mobilePhoneNumber\": \"<string>\",\n \"faxNumber\": \"<string>\",\n \"vatId\": \"<string>\",\n \"gln\": \"<string>\",\n \"salutation\": \"<string>\",\n \"title\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"companyName\": \"<string>\",\n \"additionalCompanyLine\": \"<string>\",\n \"isDefaultAddress\": true\n }\n ],\n \"paymentSettings\": {\n \"creditLimit\": 123,\n \"paymentDueDateInDays\": 123,\n \"discount\": 123,\n \"isDunningBlocked\": true\n },\n \"createdDate\": \"2023-11-07T05:31:56Z\"\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.
Path Parameters
Represents a unique key for identifying a customer in the JTL system.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
Body
Request parameters
Updates a customer. - Request
ID of the company the customer belongs to. Optional — if omitted, the existing company assignment is left unchanged.
"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 customer's ebay name.
The customer's 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.
Addresses of the customer.
Show child attributes
Show child attributes
Settings relevant to payment for the customer.
Show child attributes
Show child attributes
The date and time of the customer's creation.
Response
The customer has been updated successfully.
Updates a customer. - Response
ID of the updated customer
"b45f6432-2462-4c6f-b00f-1d9d01000000"
Was this page helpful?