curl --request PATCH \
--url https://api.jtl-cloud.com/erp/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"Number": "C1005486",
"CustomerGroupId": 123,
"BillingAddress": {
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"Shipmentaddress": {
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"CustomAddress": {
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"OtherAddresses": {
"OtherBillingAddresses": [
{
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
],
"OtherShippingAddresses": [
{
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
],
"OtherCustomerAddresses": [
{
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
]
},
"PaymentSettings": {
"PaymentMethodId": 123,
"Discount": 5,
"PaymentTarget": 3,
"CreditLimit": 100,
"StopPaymentRequest": false
},
"CustomerSince": "2023-02-01T13:30:00.0000000+00:00",
"LastChange": "2023-02-01T13:30:00.0000000+00:00",
"LanguageIso": "DE",
"InternalCompanyId": 123,
"CustomerCategoryId": 123,
"TaxIdentificationNumber": "123/123/12345",
"AccountsReceivableNumber": 10000,
"CommercialRegisterNumber": "HRB 1234",
"Website": "https://mywebsite.com",
"InitialContact": "Amazon",
"EbayUsername": "eBaybuyer123",
"Birthday": "1985-01-01T",
"IsLocked": false,
"IsCashRegisterBased": false
}
'import requests
url = "https://api.jtl-cloud.com/erp/customers/{customerId}"
payload = {
"Number": "C1005486",
"CustomerGroupId": 123,
"BillingAddress": {
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"Shipmentaddress": {
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"CustomAddress": {
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"OtherAddresses": {
"OtherBillingAddresses": [
{
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
],
"OtherShippingAddresses": [
{
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
],
"OtherCustomerAddresses": [
{
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
]
},
"PaymentSettings": {
"PaymentMethodId": 123,
"Discount": 5,
"PaymentTarget": 3,
"CreditLimit": 100,
"StopPaymentRequest": False
},
"CustomerSince": "2023-02-01T13:30:00.0000000+00:00",
"LastChange": "2023-02-01T13:30:00.0000000+00:00",
"LanguageIso": "DE",
"InternalCompanyId": 123,
"CustomerCategoryId": 123,
"TaxIdentificationNumber": "123/123/12345",
"AccountsReceivableNumber": 10000,
"CommercialRegisterNumber": "HRB 1234",
"Website": "https://mywebsite.com",
"InitialContact": "Amazon",
"EbayUsername": "eBaybuyer123",
"Birthday": "1985-01-01T",
"IsLocked": False,
"IsCashRegisterBased": False
}
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({
Number: 'C1005486',
CustomerGroupId: 123,
BillingAddress: {
Company: 'Sportbedarf Sommer',
Company2: 'Innovation Division',
FormOfAddress: 'Mr.',
Title: 'Dr.',
FirstName: 'John',
LastName: 'Doe',
Street: 'Main St. 123',
Address2: 'Floor 5, Apt 302',
PostalCode: '12345',
City: 'Example City',
State: 'Example State',
CountryIso: 'DE',
VatID: 'DE123456789',
PhoneNumber: '+49 1234 445556661',
MobilePhoneNumber: '+49 160 123 4567',
EmailAddress: 'example@email.com',
Fax: '+49 1234 4455566615'
},
Shipmentaddress: {
Company: 'Sportbedarf Sommer',
Company2: 'Innovation Division',
FormOfAddress: 'Mr.',
Title: 'Dr.',
FirstName: 'John',
LastName: 'Doe',
Street: 'Main St. 123',
Address2: 'Floor 5, Apt 302',
PostalCode: '12345',
City: 'Example City',
State: 'Example State',
CountryIso: 'DE',
VatID: 'DE123456789',
PhoneNumber: '+49 1234 445556661',
MobilePhoneNumber: '+49 160 123 4567',
EmailAddress: 'example@email.com',
Fax: '+49 1234 4455566615'
},
CustomAddress: {
Company: 'Sportbedarf Sommer',
Company2: 'Innovation Division',
FormOfAddress: 'Mr.',
Title: 'Dr.',
FirstName: 'John',
LastName: 'Doe',
Street: 'Main St. 123',
Address2: 'Floor 5, Apt 302',
PostalCode: '12345',
City: 'Example City',
State: 'Example State',
CountryIso: 'DE',
VatID: 'DE123456789',
PhoneNumber: '+49 1234 445556661',
MobilePhoneNumber: '+49 160 123 4567',
EmailAddress: 'example@email.com',
Fax: '+49 1234 4455566615'
},
OtherAddresses: {
OtherBillingAddresses: [
{
Company: 'Sportbedarf Sommer',
Company2: 'Innovation Division',
FormOfAddress: 'Mr.',
Title: 'Dr.',
FirstName: 'John',
LastName: 'Doe',
Street: 'Main St. 123',
Address2: 'Floor 5, Apt 302',
PostalCode: '12345',
City: 'Example City',
State: 'Example State',
CountryIso: 'DE',
VatID: 'DE123456789',
PhoneNumber: '+49 1234 445556661',
MobilePhoneNumber: '+49 160 123 4567',
EmailAddress: 'example@email.com',
Fax: '+49 1234 4455566615'
}
],
OtherShippingAddresses: [
{
Company: 'Sportbedarf Sommer',
Company2: 'Innovation Division',
FormOfAddress: 'Mr.',
Title: 'Dr.',
FirstName: 'John',
LastName: 'Doe',
Street: 'Main St. 123',
Address2: 'Floor 5, Apt 302',
PostalCode: '12345',
City: 'Example City',
State: 'Example State',
CountryIso: 'DE',
VatID: 'DE123456789',
PhoneNumber: '+49 1234 445556661',
MobilePhoneNumber: '+49 160 123 4567',
EmailAddress: 'example@email.com',
Fax: '+49 1234 4455566615'
}
],
OtherCustomerAddresses: [
{
Company: 'Sportbedarf Sommer',
Company2: 'Innovation Division',
FormOfAddress: 'Mr.',
Title: 'Dr.',
FirstName: 'John',
LastName: 'Doe',
Street: 'Main St. 123',
Address2: 'Floor 5, Apt 302',
PostalCode: '12345',
City: 'Example City',
State: 'Example State',
CountryIso: 'DE',
VatID: 'DE123456789',
PhoneNumber: '+49 1234 445556661',
MobilePhoneNumber: '+49 160 123 4567',
EmailAddress: 'example@email.com',
Fax: '+49 1234 4455566615'
}
]
},
PaymentSettings: {
PaymentMethodId: 123,
Discount: 5,
PaymentTarget: 3,
CreditLimit: 100,
StopPaymentRequest: false
},
CustomerSince: '2023-02-01T13:30:00.0000000+00:00',
LastChange: '2023-02-01T13:30:00.0000000+00:00',
LanguageIso: 'DE',
InternalCompanyId: 123,
CustomerCategoryId: 123,
TaxIdentificationNumber: '123/123/12345',
AccountsReceivableNumber: 10000,
CommercialRegisterNumber: 'HRB 1234',
Website: 'https://mywebsite.com',
InitialContact: 'Amazon',
EbayUsername: 'eBaybuyer123',
Birthday: '1985-01-01T',
IsLocked: false,
IsCashRegisterBased: false
})
};
fetch('https://api.jtl-cloud.com/erp/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/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([
'Number' => 'C1005486',
'CustomerGroupId' => 123,
'BillingAddress' => [
'Company' => 'Sportbedarf Sommer',
'Company2' => 'Innovation Division',
'FormOfAddress' => 'Mr.',
'Title' => 'Dr.',
'FirstName' => 'John',
'LastName' => 'Doe',
'Street' => 'Main St. 123',
'Address2' => 'Floor 5, Apt 302',
'PostalCode' => '12345',
'City' => 'Example City',
'State' => 'Example State',
'CountryIso' => 'DE',
'VatID' => 'DE123456789',
'PhoneNumber' => '+49 1234 445556661',
'MobilePhoneNumber' => '+49 160 123 4567',
'EmailAddress' => 'example@email.com',
'Fax' => '+49 1234 4455566615'
],
'Shipmentaddress' => [
'Company' => 'Sportbedarf Sommer',
'Company2' => 'Innovation Division',
'FormOfAddress' => 'Mr.',
'Title' => 'Dr.',
'FirstName' => 'John',
'LastName' => 'Doe',
'Street' => 'Main St. 123',
'Address2' => 'Floor 5, Apt 302',
'PostalCode' => '12345',
'City' => 'Example City',
'State' => 'Example State',
'CountryIso' => 'DE',
'VatID' => 'DE123456789',
'PhoneNumber' => '+49 1234 445556661',
'MobilePhoneNumber' => '+49 160 123 4567',
'EmailAddress' => 'example@email.com',
'Fax' => '+49 1234 4455566615'
],
'CustomAddress' => [
'Company' => 'Sportbedarf Sommer',
'Company2' => 'Innovation Division',
'FormOfAddress' => 'Mr.',
'Title' => 'Dr.',
'FirstName' => 'John',
'LastName' => 'Doe',
'Street' => 'Main St. 123',
'Address2' => 'Floor 5, Apt 302',
'PostalCode' => '12345',
'City' => 'Example City',
'State' => 'Example State',
'CountryIso' => 'DE',
'VatID' => 'DE123456789',
'PhoneNumber' => '+49 1234 445556661',
'MobilePhoneNumber' => '+49 160 123 4567',
'EmailAddress' => 'example@email.com',
'Fax' => '+49 1234 4455566615'
],
'OtherAddresses' => [
'OtherBillingAddresses' => [
[
'Company' => 'Sportbedarf Sommer',
'Company2' => 'Innovation Division',
'FormOfAddress' => 'Mr.',
'Title' => 'Dr.',
'FirstName' => 'John',
'LastName' => 'Doe',
'Street' => 'Main St. 123',
'Address2' => 'Floor 5, Apt 302',
'PostalCode' => '12345',
'City' => 'Example City',
'State' => 'Example State',
'CountryIso' => 'DE',
'VatID' => 'DE123456789',
'PhoneNumber' => '+49 1234 445556661',
'MobilePhoneNumber' => '+49 160 123 4567',
'EmailAddress' => 'example@email.com',
'Fax' => '+49 1234 4455566615'
]
],
'OtherShippingAddresses' => [
[
'Company' => 'Sportbedarf Sommer',
'Company2' => 'Innovation Division',
'FormOfAddress' => 'Mr.',
'Title' => 'Dr.',
'FirstName' => 'John',
'LastName' => 'Doe',
'Street' => 'Main St. 123',
'Address2' => 'Floor 5, Apt 302',
'PostalCode' => '12345',
'City' => 'Example City',
'State' => 'Example State',
'CountryIso' => 'DE',
'VatID' => 'DE123456789',
'PhoneNumber' => '+49 1234 445556661',
'MobilePhoneNumber' => '+49 160 123 4567',
'EmailAddress' => 'example@email.com',
'Fax' => '+49 1234 4455566615'
]
],
'OtherCustomerAddresses' => [
[
'Company' => 'Sportbedarf Sommer',
'Company2' => 'Innovation Division',
'FormOfAddress' => 'Mr.',
'Title' => 'Dr.',
'FirstName' => 'John',
'LastName' => 'Doe',
'Street' => 'Main St. 123',
'Address2' => 'Floor 5, Apt 302',
'PostalCode' => '12345',
'City' => 'Example City',
'State' => 'Example State',
'CountryIso' => 'DE',
'VatID' => 'DE123456789',
'PhoneNumber' => '+49 1234 445556661',
'MobilePhoneNumber' => '+49 160 123 4567',
'EmailAddress' => 'example@email.com',
'Fax' => '+49 1234 4455566615'
]
]
],
'PaymentSettings' => [
'PaymentMethodId' => 123,
'Discount' => 5,
'PaymentTarget' => 3,
'CreditLimit' => 100,
'StopPaymentRequest' => false
],
'CustomerSince' => '2023-02-01T13:30:00.0000000+00:00',
'LastChange' => '2023-02-01T13:30:00.0000000+00:00',
'LanguageIso' => 'DE',
'InternalCompanyId' => 123,
'CustomerCategoryId' => 123,
'TaxIdentificationNumber' => '123/123/12345',
'AccountsReceivableNumber' => 10000,
'CommercialRegisterNumber' => 'HRB 1234',
'Website' => 'https://mywebsite.com',
'InitialContact' => 'Amazon',
'EbayUsername' => 'eBaybuyer123',
'Birthday' => '1985-01-01T',
'IsLocked' => false,
'IsCashRegisterBased' => false
]),
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/customers/{customerId}"
payload := strings.NewReader("{\n \"Number\": \"C1005486\",\n \"CustomerGroupId\": 123,\n \"BillingAddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"Shipmentaddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"CustomAddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"OtherAddresses\": {\n \"OtherBillingAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ],\n \"OtherShippingAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ],\n \"OtherCustomerAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ]\n },\n \"PaymentSettings\": {\n \"PaymentMethodId\": 123,\n \"Discount\": 5,\n \"PaymentTarget\": 3,\n \"CreditLimit\": 100,\n \"StopPaymentRequest\": false\n },\n \"CustomerSince\": \"2023-02-01T13:30:00.0000000+00:00\",\n \"LastChange\": \"2023-02-01T13:30:00.0000000+00:00\",\n \"LanguageIso\": \"DE\",\n \"InternalCompanyId\": 123,\n \"CustomerCategoryId\": 123,\n \"TaxIdentificationNumber\": \"123/123/12345\",\n \"AccountsReceivableNumber\": 10000,\n \"CommercialRegisterNumber\": \"HRB 1234\",\n \"Website\": \"https://mywebsite.com\",\n \"InitialContact\": \"Amazon\",\n \"EbayUsername\": \"eBaybuyer123\",\n \"Birthday\": \"1985-01-01T\",\n \"IsLocked\": false,\n \"IsCashRegisterBased\": false\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/customers/{customerId}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"Number\": \"C1005486\",\n \"CustomerGroupId\": 123,\n \"BillingAddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"Shipmentaddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"CustomAddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"OtherAddresses\": {\n \"OtherBillingAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ],\n \"OtherShippingAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ],\n \"OtherCustomerAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ]\n },\n \"PaymentSettings\": {\n \"PaymentMethodId\": 123,\n \"Discount\": 5,\n \"PaymentTarget\": 3,\n \"CreditLimit\": 100,\n \"StopPaymentRequest\": false\n },\n \"CustomerSince\": \"2023-02-01T13:30:00.0000000+00:00\",\n \"LastChange\": \"2023-02-01T13:30:00.0000000+00:00\",\n \"LanguageIso\": \"DE\",\n \"InternalCompanyId\": 123,\n \"CustomerCategoryId\": 123,\n \"TaxIdentificationNumber\": \"123/123/12345\",\n \"AccountsReceivableNumber\": 10000,\n \"CommercialRegisterNumber\": \"HRB 1234\",\n \"Website\": \"https://mywebsite.com\",\n \"InitialContact\": \"Amazon\",\n \"EbayUsername\": \"eBaybuyer123\",\n \"Birthday\": \"1985-01-01T\",\n \"IsLocked\": false,\n \"IsCashRegisterBased\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/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 \"Number\": \"C1005486\",\n \"CustomerGroupId\": 123,\n \"BillingAddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"Shipmentaddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"CustomAddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"OtherAddresses\": {\n \"OtherBillingAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ],\n \"OtherShippingAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ],\n \"OtherCustomerAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ]\n },\n \"PaymentSettings\": {\n \"PaymentMethodId\": 123,\n \"Discount\": 5,\n \"PaymentTarget\": 3,\n \"CreditLimit\": 100,\n \"StopPaymentRequest\": false\n },\n \"CustomerSince\": \"2023-02-01T13:30:00.0000000+00:00\",\n \"LastChange\": \"2023-02-01T13:30:00.0000000+00:00\",\n \"LanguageIso\": \"DE\",\n \"InternalCompanyId\": 123,\n \"CustomerCategoryId\": 123,\n \"TaxIdentificationNumber\": \"123/123/12345\",\n \"AccountsReceivableNumber\": 10000,\n \"CommercialRegisterNumber\": \"HRB 1234\",\n \"Website\": \"https://mywebsite.com\",\n \"InitialContact\": \"Amazon\",\n \"EbayUsername\": \"eBaybuyer123\",\n \"Birthday\": \"1985-01-01T\",\n \"IsLocked\": false,\n \"IsCashRegisterBased\": false\n}"
response = http.request(request)
puts response.read_body{
"Id": 123,
"Number": "C1005486",
"CustomerGroupId": 123,
"BillingAddress": {
"Id": 123,
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"Shipmentaddress": {
"Id": 123,
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"CustomAddress": {
"Id": 123,
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"OtherAddresses": {
"OtherBillingAddresses": [
{
"Id": 123,
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
],
"OtherShippingAddresses": [
{
"Id": 123,
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
],
"OtherCustomerAddresses": [
{
"Id": 123,
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
]
},
"PaymentSettings": {
"PaymentMethodId": 123,
"Discount": 5,
"PaymentTarget": 3,
"CreditLimit": 100,
"StopPaymentRequest": false
},
"CustomerSince": "2023-02-01T13:30:00.0000000+00:00",
"LastChange": "2023-02-01T13:30:00.0000000+00:00",
"LanguageIso": "DE",
"InternalCompanyId": 123,
"CustomerCategoryId": 123,
"TaxIdentificationNumber": "123/123/12345",
"AccountsReceivableNumber": 10000,
"CommercialRegisterNumber": "HRB 1234",
"Website": "https://mywebsite.com",
"InitialContact": "Amazon",
"EbayUsername": "eBaybuyer123",
"Birthday": "1985-01-01T",
"IsLocked": false,
"IsCashRegisterBased": false
}{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}Update Customer
Update a specific customer
curl --request PATCH \
--url https://api.jtl-cloud.com/erp/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"Number": "C1005486",
"CustomerGroupId": 123,
"BillingAddress": {
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"Shipmentaddress": {
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"CustomAddress": {
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"OtherAddresses": {
"OtherBillingAddresses": [
{
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
],
"OtherShippingAddresses": [
{
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
],
"OtherCustomerAddresses": [
{
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
]
},
"PaymentSettings": {
"PaymentMethodId": 123,
"Discount": 5,
"PaymentTarget": 3,
"CreditLimit": 100,
"StopPaymentRequest": false
},
"CustomerSince": "2023-02-01T13:30:00.0000000+00:00",
"LastChange": "2023-02-01T13:30:00.0000000+00:00",
"LanguageIso": "DE",
"InternalCompanyId": 123,
"CustomerCategoryId": 123,
"TaxIdentificationNumber": "123/123/12345",
"AccountsReceivableNumber": 10000,
"CommercialRegisterNumber": "HRB 1234",
"Website": "https://mywebsite.com",
"InitialContact": "Amazon",
"EbayUsername": "eBaybuyer123",
"Birthday": "1985-01-01T",
"IsLocked": false,
"IsCashRegisterBased": false
}
'import requests
url = "https://api.jtl-cloud.com/erp/customers/{customerId}"
payload = {
"Number": "C1005486",
"CustomerGroupId": 123,
"BillingAddress": {
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"Shipmentaddress": {
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"CustomAddress": {
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"OtherAddresses": {
"OtherBillingAddresses": [
{
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
],
"OtherShippingAddresses": [
{
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
],
"OtherCustomerAddresses": [
{
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
]
},
"PaymentSettings": {
"PaymentMethodId": 123,
"Discount": 5,
"PaymentTarget": 3,
"CreditLimit": 100,
"StopPaymentRequest": False
},
"CustomerSince": "2023-02-01T13:30:00.0000000+00:00",
"LastChange": "2023-02-01T13:30:00.0000000+00:00",
"LanguageIso": "DE",
"InternalCompanyId": 123,
"CustomerCategoryId": 123,
"TaxIdentificationNumber": "123/123/12345",
"AccountsReceivableNumber": 10000,
"CommercialRegisterNumber": "HRB 1234",
"Website": "https://mywebsite.com",
"InitialContact": "Amazon",
"EbayUsername": "eBaybuyer123",
"Birthday": "1985-01-01T",
"IsLocked": False,
"IsCashRegisterBased": False
}
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({
Number: 'C1005486',
CustomerGroupId: 123,
BillingAddress: {
Company: 'Sportbedarf Sommer',
Company2: 'Innovation Division',
FormOfAddress: 'Mr.',
Title: 'Dr.',
FirstName: 'John',
LastName: 'Doe',
Street: 'Main St. 123',
Address2: 'Floor 5, Apt 302',
PostalCode: '12345',
City: 'Example City',
State: 'Example State',
CountryIso: 'DE',
VatID: 'DE123456789',
PhoneNumber: '+49 1234 445556661',
MobilePhoneNumber: '+49 160 123 4567',
EmailAddress: 'example@email.com',
Fax: '+49 1234 4455566615'
},
Shipmentaddress: {
Company: 'Sportbedarf Sommer',
Company2: 'Innovation Division',
FormOfAddress: 'Mr.',
Title: 'Dr.',
FirstName: 'John',
LastName: 'Doe',
Street: 'Main St. 123',
Address2: 'Floor 5, Apt 302',
PostalCode: '12345',
City: 'Example City',
State: 'Example State',
CountryIso: 'DE',
VatID: 'DE123456789',
PhoneNumber: '+49 1234 445556661',
MobilePhoneNumber: '+49 160 123 4567',
EmailAddress: 'example@email.com',
Fax: '+49 1234 4455566615'
},
CustomAddress: {
Company: 'Sportbedarf Sommer',
Company2: 'Innovation Division',
FormOfAddress: 'Mr.',
Title: 'Dr.',
FirstName: 'John',
LastName: 'Doe',
Street: 'Main St. 123',
Address2: 'Floor 5, Apt 302',
PostalCode: '12345',
City: 'Example City',
State: 'Example State',
CountryIso: 'DE',
VatID: 'DE123456789',
PhoneNumber: '+49 1234 445556661',
MobilePhoneNumber: '+49 160 123 4567',
EmailAddress: 'example@email.com',
Fax: '+49 1234 4455566615'
},
OtherAddresses: {
OtherBillingAddresses: [
{
Company: 'Sportbedarf Sommer',
Company2: 'Innovation Division',
FormOfAddress: 'Mr.',
Title: 'Dr.',
FirstName: 'John',
LastName: 'Doe',
Street: 'Main St. 123',
Address2: 'Floor 5, Apt 302',
PostalCode: '12345',
City: 'Example City',
State: 'Example State',
CountryIso: 'DE',
VatID: 'DE123456789',
PhoneNumber: '+49 1234 445556661',
MobilePhoneNumber: '+49 160 123 4567',
EmailAddress: 'example@email.com',
Fax: '+49 1234 4455566615'
}
],
OtherShippingAddresses: [
{
Company: 'Sportbedarf Sommer',
Company2: 'Innovation Division',
FormOfAddress: 'Mr.',
Title: 'Dr.',
FirstName: 'John',
LastName: 'Doe',
Street: 'Main St. 123',
Address2: 'Floor 5, Apt 302',
PostalCode: '12345',
City: 'Example City',
State: 'Example State',
CountryIso: 'DE',
VatID: 'DE123456789',
PhoneNumber: '+49 1234 445556661',
MobilePhoneNumber: '+49 160 123 4567',
EmailAddress: 'example@email.com',
Fax: '+49 1234 4455566615'
}
],
OtherCustomerAddresses: [
{
Company: 'Sportbedarf Sommer',
Company2: 'Innovation Division',
FormOfAddress: 'Mr.',
Title: 'Dr.',
FirstName: 'John',
LastName: 'Doe',
Street: 'Main St. 123',
Address2: 'Floor 5, Apt 302',
PostalCode: '12345',
City: 'Example City',
State: 'Example State',
CountryIso: 'DE',
VatID: 'DE123456789',
PhoneNumber: '+49 1234 445556661',
MobilePhoneNumber: '+49 160 123 4567',
EmailAddress: 'example@email.com',
Fax: '+49 1234 4455566615'
}
]
},
PaymentSettings: {
PaymentMethodId: 123,
Discount: 5,
PaymentTarget: 3,
CreditLimit: 100,
StopPaymentRequest: false
},
CustomerSince: '2023-02-01T13:30:00.0000000+00:00',
LastChange: '2023-02-01T13:30:00.0000000+00:00',
LanguageIso: 'DE',
InternalCompanyId: 123,
CustomerCategoryId: 123,
TaxIdentificationNumber: '123/123/12345',
AccountsReceivableNumber: 10000,
CommercialRegisterNumber: 'HRB 1234',
Website: 'https://mywebsite.com',
InitialContact: 'Amazon',
EbayUsername: 'eBaybuyer123',
Birthday: '1985-01-01T',
IsLocked: false,
IsCashRegisterBased: false
})
};
fetch('https://api.jtl-cloud.com/erp/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/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([
'Number' => 'C1005486',
'CustomerGroupId' => 123,
'BillingAddress' => [
'Company' => 'Sportbedarf Sommer',
'Company2' => 'Innovation Division',
'FormOfAddress' => 'Mr.',
'Title' => 'Dr.',
'FirstName' => 'John',
'LastName' => 'Doe',
'Street' => 'Main St. 123',
'Address2' => 'Floor 5, Apt 302',
'PostalCode' => '12345',
'City' => 'Example City',
'State' => 'Example State',
'CountryIso' => 'DE',
'VatID' => 'DE123456789',
'PhoneNumber' => '+49 1234 445556661',
'MobilePhoneNumber' => '+49 160 123 4567',
'EmailAddress' => 'example@email.com',
'Fax' => '+49 1234 4455566615'
],
'Shipmentaddress' => [
'Company' => 'Sportbedarf Sommer',
'Company2' => 'Innovation Division',
'FormOfAddress' => 'Mr.',
'Title' => 'Dr.',
'FirstName' => 'John',
'LastName' => 'Doe',
'Street' => 'Main St. 123',
'Address2' => 'Floor 5, Apt 302',
'PostalCode' => '12345',
'City' => 'Example City',
'State' => 'Example State',
'CountryIso' => 'DE',
'VatID' => 'DE123456789',
'PhoneNumber' => '+49 1234 445556661',
'MobilePhoneNumber' => '+49 160 123 4567',
'EmailAddress' => 'example@email.com',
'Fax' => '+49 1234 4455566615'
],
'CustomAddress' => [
'Company' => 'Sportbedarf Sommer',
'Company2' => 'Innovation Division',
'FormOfAddress' => 'Mr.',
'Title' => 'Dr.',
'FirstName' => 'John',
'LastName' => 'Doe',
'Street' => 'Main St. 123',
'Address2' => 'Floor 5, Apt 302',
'PostalCode' => '12345',
'City' => 'Example City',
'State' => 'Example State',
'CountryIso' => 'DE',
'VatID' => 'DE123456789',
'PhoneNumber' => '+49 1234 445556661',
'MobilePhoneNumber' => '+49 160 123 4567',
'EmailAddress' => 'example@email.com',
'Fax' => '+49 1234 4455566615'
],
'OtherAddresses' => [
'OtherBillingAddresses' => [
[
'Company' => 'Sportbedarf Sommer',
'Company2' => 'Innovation Division',
'FormOfAddress' => 'Mr.',
'Title' => 'Dr.',
'FirstName' => 'John',
'LastName' => 'Doe',
'Street' => 'Main St. 123',
'Address2' => 'Floor 5, Apt 302',
'PostalCode' => '12345',
'City' => 'Example City',
'State' => 'Example State',
'CountryIso' => 'DE',
'VatID' => 'DE123456789',
'PhoneNumber' => '+49 1234 445556661',
'MobilePhoneNumber' => '+49 160 123 4567',
'EmailAddress' => 'example@email.com',
'Fax' => '+49 1234 4455566615'
]
],
'OtherShippingAddresses' => [
[
'Company' => 'Sportbedarf Sommer',
'Company2' => 'Innovation Division',
'FormOfAddress' => 'Mr.',
'Title' => 'Dr.',
'FirstName' => 'John',
'LastName' => 'Doe',
'Street' => 'Main St. 123',
'Address2' => 'Floor 5, Apt 302',
'PostalCode' => '12345',
'City' => 'Example City',
'State' => 'Example State',
'CountryIso' => 'DE',
'VatID' => 'DE123456789',
'PhoneNumber' => '+49 1234 445556661',
'MobilePhoneNumber' => '+49 160 123 4567',
'EmailAddress' => 'example@email.com',
'Fax' => '+49 1234 4455566615'
]
],
'OtherCustomerAddresses' => [
[
'Company' => 'Sportbedarf Sommer',
'Company2' => 'Innovation Division',
'FormOfAddress' => 'Mr.',
'Title' => 'Dr.',
'FirstName' => 'John',
'LastName' => 'Doe',
'Street' => 'Main St. 123',
'Address2' => 'Floor 5, Apt 302',
'PostalCode' => '12345',
'City' => 'Example City',
'State' => 'Example State',
'CountryIso' => 'DE',
'VatID' => 'DE123456789',
'PhoneNumber' => '+49 1234 445556661',
'MobilePhoneNumber' => '+49 160 123 4567',
'EmailAddress' => 'example@email.com',
'Fax' => '+49 1234 4455566615'
]
]
],
'PaymentSettings' => [
'PaymentMethodId' => 123,
'Discount' => 5,
'PaymentTarget' => 3,
'CreditLimit' => 100,
'StopPaymentRequest' => false
],
'CustomerSince' => '2023-02-01T13:30:00.0000000+00:00',
'LastChange' => '2023-02-01T13:30:00.0000000+00:00',
'LanguageIso' => 'DE',
'InternalCompanyId' => 123,
'CustomerCategoryId' => 123,
'TaxIdentificationNumber' => '123/123/12345',
'AccountsReceivableNumber' => 10000,
'CommercialRegisterNumber' => 'HRB 1234',
'Website' => 'https://mywebsite.com',
'InitialContact' => 'Amazon',
'EbayUsername' => 'eBaybuyer123',
'Birthday' => '1985-01-01T',
'IsLocked' => false,
'IsCashRegisterBased' => false
]),
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/customers/{customerId}"
payload := strings.NewReader("{\n \"Number\": \"C1005486\",\n \"CustomerGroupId\": 123,\n \"BillingAddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"Shipmentaddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"CustomAddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"OtherAddresses\": {\n \"OtherBillingAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ],\n \"OtherShippingAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ],\n \"OtherCustomerAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ]\n },\n \"PaymentSettings\": {\n \"PaymentMethodId\": 123,\n \"Discount\": 5,\n \"PaymentTarget\": 3,\n \"CreditLimit\": 100,\n \"StopPaymentRequest\": false\n },\n \"CustomerSince\": \"2023-02-01T13:30:00.0000000+00:00\",\n \"LastChange\": \"2023-02-01T13:30:00.0000000+00:00\",\n \"LanguageIso\": \"DE\",\n \"InternalCompanyId\": 123,\n \"CustomerCategoryId\": 123,\n \"TaxIdentificationNumber\": \"123/123/12345\",\n \"AccountsReceivableNumber\": 10000,\n \"CommercialRegisterNumber\": \"HRB 1234\",\n \"Website\": \"https://mywebsite.com\",\n \"InitialContact\": \"Amazon\",\n \"EbayUsername\": \"eBaybuyer123\",\n \"Birthday\": \"1985-01-01T\",\n \"IsLocked\": false,\n \"IsCashRegisterBased\": false\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/customers/{customerId}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"Number\": \"C1005486\",\n \"CustomerGroupId\": 123,\n \"BillingAddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"Shipmentaddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"CustomAddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"OtherAddresses\": {\n \"OtherBillingAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ],\n \"OtherShippingAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ],\n \"OtherCustomerAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ]\n },\n \"PaymentSettings\": {\n \"PaymentMethodId\": 123,\n \"Discount\": 5,\n \"PaymentTarget\": 3,\n \"CreditLimit\": 100,\n \"StopPaymentRequest\": false\n },\n \"CustomerSince\": \"2023-02-01T13:30:00.0000000+00:00\",\n \"LastChange\": \"2023-02-01T13:30:00.0000000+00:00\",\n \"LanguageIso\": \"DE\",\n \"InternalCompanyId\": 123,\n \"CustomerCategoryId\": 123,\n \"TaxIdentificationNumber\": \"123/123/12345\",\n \"AccountsReceivableNumber\": 10000,\n \"CommercialRegisterNumber\": \"HRB 1234\",\n \"Website\": \"https://mywebsite.com\",\n \"InitialContact\": \"Amazon\",\n \"EbayUsername\": \"eBaybuyer123\",\n \"Birthday\": \"1985-01-01T\",\n \"IsLocked\": false,\n \"IsCashRegisterBased\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/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 \"Number\": \"C1005486\",\n \"CustomerGroupId\": 123,\n \"BillingAddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"Shipmentaddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"CustomAddress\": {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n },\n \"OtherAddresses\": {\n \"OtherBillingAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ],\n \"OtherShippingAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ],\n \"OtherCustomerAddresses\": [\n {\n \"Company\": \"Sportbedarf Sommer\",\n \"Company2\": \"Innovation Division\",\n \"FormOfAddress\": \"Mr.\",\n \"Title\": \"Dr.\",\n \"FirstName\": \"John\",\n \"LastName\": \"Doe\",\n \"Street\": \"Main St. 123\",\n \"Address2\": \"Floor 5, Apt 302\",\n \"PostalCode\": \"12345\",\n \"City\": \"Example City\",\n \"State\": \"Example State\",\n \"CountryIso\": \"DE\",\n \"VatID\": \"DE123456789\",\n \"PhoneNumber\": \"+49 1234 445556661\",\n \"MobilePhoneNumber\": \"+49 160 123 4567\",\n \"EmailAddress\": \"example@email.com\",\n \"Fax\": \"+49 1234 4455566615\"\n }\n ]\n },\n \"PaymentSettings\": {\n \"PaymentMethodId\": 123,\n \"Discount\": 5,\n \"PaymentTarget\": 3,\n \"CreditLimit\": 100,\n \"StopPaymentRequest\": false\n },\n \"CustomerSince\": \"2023-02-01T13:30:00.0000000+00:00\",\n \"LastChange\": \"2023-02-01T13:30:00.0000000+00:00\",\n \"LanguageIso\": \"DE\",\n \"InternalCompanyId\": 123,\n \"CustomerCategoryId\": 123,\n \"TaxIdentificationNumber\": \"123/123/12345\",\n \"AccountsReceivableNumber\": 10000,\n \"CommercialRegisterNumber\": \"HRB 1234\",\n \"Website\": \"https://mywebsite.com\",\n \"InitialContact\": \"Amazon\",\n \"EbayUsername\": \"eBaybuyer123\",\n \"Birthday\": \"1985-01-01T\",\n \"IsLocked\": false,\n \"IsCashRegisterBased\": false\n}"
response = http.request(request)
puts response.read_body{
"Id": 123,
"Number": "C1005486",
"CustomerGroupId": 123,
"BillingAddress": {
"Id": 123,
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"Shipmentaddress": {
"Id": 123,
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"CustomAddress": {
"Id": 123,
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
},
"OtherAddresses": {
"OtherBillingAddresses": [
{
"Id": 123,
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
],
"OtherShippingAddresses": [
{
"Id": 123,
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
],
"OtherCustomerAddresses": [
{
"Id": 123,
"Company": "Sportbedarf Sommer",
"Company2": "Innovation Division",
"FormOfAddress": "Mr.",
"Title": "Dr.",
"FirstName": "John",
"LastName": "Doe",
"Street": "Main St. 123",
"Address2": "Floor 5, Apt 302",
"PostalCode": "12345",
"City": "Example City",
"State": "Example State",
"CountryIso": "DE",
"VatID": "DE123456789",
"PhoneNumber": "+49 1234 445556661",
"MobilePhoneNumber": "+49 160 123 4567",
"EmailAddress": "example@email.com",
"Fax": "+49 1234 4455566615"
}
]
},
"PaymentSettings": {
"PaymentMethodId": 123,
"Discount": 5,
"PaymentTarget": 3,
"CreditLimit": 100,
"StopPaymentRequest": false
},
"CustomerSince": "2023-02-01T13:30:00.0000000+00:00",
"LastChange": "2023-02-01T13:30:00.0000000+00:00",
"LanguageIso": "DE",
"InternalCompanyId": 123,
"CustomerCategoryId": 123,
"TaxIdentificationNumber": "123/123/12345",
"AccountsReceivableNumber": 10000,
"CommercialRegisterNumber": "HRB 1234",
"Website": "https://mywebsite.com",
"InitialContact": "Amazon",
"EbayUsername": "eBaybuyer123",
"Birthday": "1985-01-01T",
"IsLocked": false,
"IsCashRegisterBased": false
}{
"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 User-Id (int or uuid) on whose behalf the request is executed. Requires scope 'Application.RunAs'.
The tenant ID for the target ERP instance.
Path Parameters
Query Parameters
If true, the workflows do not trigger automatic.
Body
The customer to update.
Model Class: UpdateCustomer
"C1005486"
Model Class: UpdateAddress
Show child attributes
Show child attributes
Model Class: UpdateAddress
Show child attributes
Show child attributes
Model Class: UpdateAddress
Show child attributes
Show child attributes
Model Class: UpdateOtherAddresses
Show child attributes
Show child attributes
Model Class: UpdatePaymentSettings
Show child attributes
Show child attributes
"2023-02-01T13:30:00.0000000+00:00"
"2023-02-01T13:30:00.0000000+00:00"
"DE"
"123/123/12345"
10000
"HRB 1234"
"https://mywebsite.com"
"Amazon"
"eBaybuyer123"
"1985-01-01T"
false
false
Response
The updated customer.
Model Class: Customer
The customer's number.
"C1005486"
Model Class: Address
Show child attributes
Show child attributes
Model Class: Address
Show child attributes
Show child attributes
Model Class: Address
Show child attributes
Show child attributes
Model Class: OtherAddresses
Show child attributes
Show child attributes
Model Class: PaymentSettings
Show child attributes
Show child attributes
Date since they have been a customer.
"2023-02-01T13:30:00.0000000+00:00"
Date of the last customer's data change.
"2023-02-01T13:30:00.0000000+00:00"
The customer's language.
"DE"
The customer's tax identification number.
"123/123/12345"
The customer's accounts receivable number.
10000
The customer's commercial register number.
"HRB 1234"
The customer's website.
"https://mywebsite.com"
The source of initial contact. This could be for example a specific sales channel, a convention or a marketing campaign.
"Amazon"
The customer's eBay username.
"eBaybuyer123"
The customer's date of birth.
"1985-01-01T"
The customer's locked status for online shop sales channels.
false
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.
false
Was this page helpful?