curl --request PATCH \
--url http://localhost:3000/v2/customers/{id} \
--header 'Content-Type: application/json' \
--header 'x-API-Key: <api-key>' \
--data '
{
"number": 1001,
"name": "ABC Cleaning Services GmbH",
"_id": "<string>",
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
},
"chatId": "<string>",
"contactPerson": "John Doe",
"address": {
"street": "<string>",
"zip": "<string>",
"city": "<string>",
"country": "<string>",
"co": "<string>",
"state": "<string>"
},
"contact": {
"telephone": "+1-555-123-4567",
"mobile": "+1-555-987-6543",
"email": "contact@company.com",
"sms": "+1-555-111-2222",
"smsCount": 5,
"smsChatCount": 12,
"smsSendDate": "2024-01-15T10:30:00Z",
"smsSendBy": "user123",
"website": "https://www.company.com",
"lastSMSStatus": "delivered",
"secondSmsSendDate": "2024-01-16T14:45:00Z"
},
"contract": {},
"invoiceRecipientId": "<string>",
"invoiceCCRecipientIds": [
"<string>"
],
"hideRecipientOnDocuments": false,
"buyerReference": "04011000-1234512345-12",
"orderReferenceId": "SUP-12345",
"vatNumber": "DE123456789",
"debitorNumber": "DEB-001",
"paymentTermId": "<string>"
}
'import requests
url = "http://localhost:3000/v2/customers/{id}"
payload = {
"number": 1001,
"name": "ABC Cleaning Services GmbH",
"_id": "<string>",
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
},
"chatId": "<string>",
"contactPerson": "John Doe",
"address": {
"street": "<string>",
"zip": "<string>",
"city": "<string>",
"country": "<string>",
"co": "<string>",
"state": "<string>"
},
"contact": {
"telephone": "+1-555-123-4567",
"mobile": "+1-555-987-6543",
"email": "contact@company.com",
"sms": "+1-555-111-2222",
"smsCount": 5,
"smsChatCount": 12,
"smsSendDate": "2024-01-15T10:30:00Z",
"smsSendBy": "user123",
"website": "https://www.company.com",
"lastSMSStatus": "delivered",
"secondSmsSendDate": "2024-01-16T14:45:00Z"
},
"contract": {},
"invoiceRecipientId": "<string>",
"invoiceCCRecipientIds": ["<string>"],
"hideRecipientOnDocuments": False,
"buyerReference": "04011000-1234512345-12",
"orderReferenceId": "SUP-12345",
"vatNumber": "DE123456789",
"debitorNumber": "DEB-001",
"paymentTermId": "<string>"
}
headers = {
"x-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
number: 1001,
name: 'ABC Cleaning Services GmbH',
_id: '<string>',
companyId: '<string>',
status: {
status: 123,
createdAt: '2023-11-07T05:31:56Z',
createdBy: '<string>',
lastModifiedAt: '2023-11-07T05:31:56Z',
lastModifiedBy: '<string>'
},
chatId: '<string>',
contactPerson: 'John Doe',
address: {
street: '<string>',
zip: '<string>',
city: '<string>',
country: '<string>',
co: '<string>',
state: '<string>'
},
contact: {
telephone: '+1-555-123-4567',
mobile: '+1-555-987-6543',
email: 'contact@company.com',
sms: '+1-555-111-2222',
smsCount: 5,
smsChatCount: 12,
smsSendDate: '2024-01-15T10:30:00Z',
smsSendBy: 'user123',
website: 'https://www.company.com',
lastSMSStatus: 'delivered',
secondSmsSendDate: '2024-01-16T14:45:00Z'
},
contract: {},
invoiceRecipientId: '<string>',
invoiceCCRecipientIds: ['<string>'],
hideRecipientOnDocuments: false,
buyerReference: '04011000-1234512345-12',
orderReferenceId: 'SUP-12345',
vatNumber: 'DE123456789',
debitorNumber: 'DEB-001',
paymentTermId: '<string>'
})
};
fetch('http://localhost:3000/v2/customers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/customers/{id}",
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' => 1001,
'name' => 'ABC Cleaning Services GmbH',
'_id' => '<string>',
'companyId' => '<string>',
'status' => [
'status' => 123,
'createdAt' => '2023-11-07T05:31:56Z',
'createdBy' => '<string>',
'lastModifiedAt' => '2023-11-07T05:31:56Z',
'lastModifiedBy' => '<string>'
],
'chatId' => '<string>',
'contactPerson' => 'John Doe',
'address' => [
'street' => '<string>',
'zip' => '<string>',
'city' => '<string>',
'country' => '<string>',
'co' => '<string>',
'state' => '<string>'
],
'contact' => [
'telephone' => '+1-555-123-4567',
'mobile' => '+1-555-987-6543',
'email' => 'contact@company.com',
'sms' => '+1-555-111-2222',
'smsCount' => 5,
'smsChatCount' => 12,
'smsSendDate' => '2024-01-15T10:30:00Z',
'smsSendBy' => 'user123',
'website' => 'https://www.company.com',
'lastSMSStatus' => 'delivered',
'secondSmsSendDate' => '2024-01-16T14:45:00Z'
],
'contract' => [
],
'invoiceRecipientId' => '<string>',
'invoiceCCRecipientIds' => [
'<string>'
],
'hideRecipientOnDocuments' => false,
'buyerReference' => '04011000-1234512345-12',
'orderReferenceId' => 'SUP-12345',
'vatNumber' => 'DE123456789',
'debitorNumber' => 'DEB-001',
'paymentTermId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-API-Key: <api-key>"
],
]);
$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 := "http://localhost:3000/v2/customers/{id}"
payload := strings.NewReader("{\n \"number\": 1001,\n \"name\": \"ABC Cleaning Services GmbH\",\n \"_id\": \"<string>\",\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"contactPerson\": \"John Doe\",\n \"address\": {\n \"street\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"co\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"contact\": {\n \"telephone\": \"+1-555-123-4567\",\n \"mobile\": \"+1-555-987-6543\",\n \"email\": \"contact@company.com\",\n \"sms\": \"+1-555-111-2222\",\n \"smsCount\": 5,\n \"smsChatCount\": 12,\n \"smsSendDate\": \"2024-01-15T10:30:00Z\",\n \"smsSendBy\": \"user123\",\n \"website\": \"https://www.company.com\",\n \"lastSMSStatus\": \"delivered\",\n \"secondSmsSendDate\": \"2024-01-16T14:45:00Z\"\n },\n \"contract\": {},\n \"invoiceRecipientId\": \"<string>\",\n \"invoiceCCRecipientIds\": [\n \"<string>\"\n ],\n \"hideRecipientOnDocuments\": false,\n \"buyerReference\": \"04011000-1234512345-12\",\n \"orderReferenceId\": \"SUP-12345\",\n \"vatNumber\": \"DE123456789\",\n \"debitorNumber\": \"DEB-001\",\n \"paymentTermId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-API-Key", "<api-key>")
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("http://localhost:3000/v2/customers/{id}")
.header("x-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"number\": 1001,\n \"name\": \"ABC Cleaning Services GmbH\",\n \"_id\": \"<string>\",\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"contactPerson\": \"John Doe\",\n \"address\": {\n \"street\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"co\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"contact\": {\n \"telephone\": \"+1-555-123-4567\",\n \"mobile\": \"+1-555-987-6543\",\n \"email\": \"contact@company.com\",\n \"sms\": \"+1-555-111-2222\",\n \"smsCount\": 5,\n \"smsChatCount\": 12,\n \"smsSendDate\": \"2024-01-15T10:30:00Z\",\n \"smsSendBy\": \"user123\",\n \"website\": \"https://www.company.com\",\n \"lastSMSStatus\": \"delivered\",\n \"secondSmsSendDate\": \"2024-01-16T14:45:00Z\"\n },\n \"contract\": {},\n \"invoiceRecipientId\": \"<string>\",\n \"invoiceCCRecipientIds\": [\n \"<string>\"\n ],\n \"hideRecipientOnDocuments\": false,\n \"buyerReference\": \"04011000-1234512345-12\",\n \"orderReferenceId\": \"SUP-12345\",\n \"vatNumber\": \"DE123456789\",\n \"debitorNumber\": \"DEB-001\",\n \"paymentTermId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["x-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": 1001,\n \"name\": \"ABC Cleaning Services GmbH\",\n \"_id\": \"<string>\",\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"contactPerson\": \"John Doe\",\n \"address\": {\n \"street\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"co\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"contact\": {\n \"telephone\": \"+1-555-123-4567\",\n \"mobile\": \"+1-555-987-6543\",\n \"email\": \"contact@company.com\",\n \"sms\": \"+1-555-111-2222\",\n \"smsCount\": 5,\n \"smsChatCount\": 12,\n \"smsSendDate\": \"2024-01-15T10:30:00Z\",\n \"smsSendBy\": \"user123\",\n \"website\": \"https://www.company.com\",\n \"lastSMSStatus\": \"delivered\",\n \"secondSmsSendDate\": \"2024-01-16T14:45:00Z\"\n },\n \"contract\": {},\n \"invoiceRecipientId\": \"<string>\",\n \"invoiceCCRecipientIds\": [\n \"<string>\"\n ],\n \"hideRecipientOnDocuments\": false,\n \"buyerReference\": \"04011000-1234512345-12\",\n \"orderReferenceId\": \"SUP-12345\",\n \"vatNumber\": \"DE123456789\",\n \"debitorNumber\": \"DEB-001\",\n \"paymentTermId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"number": 1001,
"name": "ABC Cleaning Services GmbH",
"_id": "<string>",
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
},
"chatId": "<string>",
"contactPerson": "John Doe",
"address": {
"street": "<string>",
"zip": "<string>",
"city": "<string>",
"country": "<string>",
"co": "<string>",
"state": "<string>"
},
"contact": {
"telephone": "+1-555-123-4567",
"mobile": "+1-555-987-6543",
"email": "contact@company.com",
"sms": "+1-555-111-2222",
"smsCount": 5,
"smsChatCount": 12,
"smsSendDate": "2024-01-15T10:30:00Z",
"smsSendBy": "user123",
"website": "https://www.company.com",
"lastSMSStatus": "delivered",
"secondSmsSendDate": "2024-01-16T14:45:00Z"
},
"contract": {},
"invoiceRecipientId": "<string>",
"invoiceCCRecipientIds": [
"<string>"
],
"hideRecipientOnDocuments": false,
"buyerReference": "04011000-1234512345-12",
"orderReferenceId": "SUP-12345",
"vatNumber": "DE123456789",
"debitorNumber": "DEB-001",
"paymentTermId": "<string>"
}Update Customer
Update an existing customer. All fields are optional and only provided fields will be updated.
curl --request PATCH \
--url http://localhost:3000/v2/customers/{id} \
--header 'Content-Type: application/json' \
--header 'x-API-Key: <api-key>' \
--data '
{
"number": 1001,
"name": "ABC Cleaning Services GmbH",
"_id": "<string>",
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
},
"chatId": "<string>",
"contactPerson": "John Doe",
"address": {
"street": "<string>",
"zip": "<string>",
"city": "<string>",
"country": "<string>",
"co": "<string>",
"state": "<string>"
},
"contact": {
"telephone": "+1-555-123-4567",
"mobile": "+1-555-987-6543",
"email": "contact@company.com",
"sms": "+1-555-111-2222",
"smsCount": 5,
"smsChatCount": 12,
"smsSendDate": "2024-01-15T10:30:00Z",
"smsSendBy": "user123",
"website": "https://www.company.com",
"lastSMSStatus": "delivered",
"secondSmsSendDate": "2024-01-16T14:45:00Z"
},
"contract": {},
"invoiceRecipientId": "<string>",
"invoiceCCRecipientIds": [
"<string>"
],
"hideRecipientOnDocuments": false,
"buyerReference": "04011000-1234512345-12",
"orderReferenceId": "SUP-12345",
"vatNumber": "DE123456789",
"debitorNumber": "DEB-001",
"paymentTermId": "<string>"
}
'import requests
url = "http://localhost:3000/v2/customers/{id}"
payload = {
"number": 1001,
"name": "ABC Cleaning Services GmbH",
"_id": "<string>",
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
},
"chatId": "<string>",
"contactPerson": "John Doe",
"address": {
"street": "<string>",
"zip": "<string>",
"city": "<string>",
"country": "<string>",
"co": "<string>",
"state": "<string>"
},
"contact": {
"telephone": "+1-555-123-4567",
"mobile": "+1-555-987-6543",
"email": "contact@company.com",
"sms": "+1-555-111-2222",
"smsCount": 5,
"smsChatCount": 12,
"smsSendDate": "2024-01-15T10:30:00Z",
"smsSendBy": "user123",
"website": "https://www.company.com",
"lastSMSStatus": "delivered",
"secondSmsSendDate": "2024-01-16T14:45:00Z"
},
"contract": {},
"invoiceRecipientId": "<string>",
"invoiceCCRecipientIds": ["<string>"],
"hideRecipientOnDocuments": False,
"buyerReference": "04011000-1234512345-12",
"orderReferenceId": "SUP-12345",
"vatNumber": "DE123456789",
"debitorNumber": "DEB-001",
"paymentTermId": "<string>"
}
headers = {
"x-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
number: 1001,
name: 'ABC Cleaning Services GmbH',
_id: '<string>',
companyId: '<string>',
status: {
status: 123,
createdAt: '2023-11-07T05:31:56Z',
createdBy: '<string>',
lastModifiedAt: '2023-11-07T05:31:56Z',
lastModifiedBy: '<string>'
},
chatId: '<string>',
contactPerson: 'John Doe',
address: {
street: '<string>',
zip: '<string>',
city: '<string>',
country: '<string>',
co: '<string>',
state: '<string>'
},
contact: {
telephone: '+1-555-123-4567',
mobile: '+1-555-987-6543',
email: 'contact@company.com',
sms: '+1-555-111-2222',
smsCount: 5,
smsChatCount: 12,
smsSendDate: '2024-01-15T10:30:00Z',
smsSendBy: 'user123',
website: 'https://www.company.com',
lastSMSStatus: 'delivered',
secondSmsSendDate: '2024-01-16T14:45:00Z'
},
contract: {},
invoiceRecipientId: '<string>',
invoiceCCRecipientIds: ['<string>'],
hideRecipientOnDocuments: false,
buyerReference: '04011000-1234512345-12',
orderReferenceId: 'SUP-12345',
vatNumber: 'DE123456789',
debitorNumber: 'DEB-001',
paymentTermId: '<string>'
})
};
fetch('http://localhost:3000/v2/customers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/customers/{id}",
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' => 1001,
'name' => 'ABC Cleaning Services GmbH',
'_id' => '<string>',
'companyId' => '<string>',
'status' => [
'status' => 123,
'createdAt' => '2023-11-07T05:31:56Z',
'createdBy' => '<string>',
'lastModifiedAt' => '2023-11-07T05:31:56Z',
'lastModifiedBy' => '<string>'
],
'chatId' => '<string>',
'contactPerson' => 'John Doe',
'address' => [
'street' => '<string>',
'zip' => '<string>',
'city' => '<string>',
'country' => '<string>',
'co' => '<string>',
'state' => '<string>'
],
'contact' => [
'telephone' => '+1-555-123-4567',
'mobile' => '+1-555-987-6543',
'email' => 'contact@company.com',
'sms' => '+1-555-111-2222',
'smsCount' => 5,
'smsChatCount' => 12,
'smsSendDate' => '2024-01-15T10:30:00Z',
'smsSendBy' => 'user123',
'website' => 'https://www.company.com',
'lastSMSStatus' => 'delivered',
'secondSmsSendDate' => '2024-01-16T14:45:00Z'
],
'contract' => [
],
'invoiceRecipientId' => '<string>',
'invoiceCCRecipientIds' => [
'<string>'
],
'hideRecipientOnDocuments' => false,
'buyerReference' => '04011000-1234512345-12',
'orderReferenceId' => 'SUP-12345',
'vatNumber' => 'DE123456789',
'debitorNumber' => 'DEB-001',
'paymentTermId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-API-Key: <api-key>"
],
]);
$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 := "http://localhost:3000/v2/customers/{id}"
payload := strings.NewReader("{\n \"number\": 1001,\n \"name\": \"ABC Cleaning Services GmbH\",\n \"_id\": \"<string>\",\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"contactPerson\": \"John Doe\",\n \"address\": {\n \"street\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"co\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"contact\": {\n \"telephone\": \"+1-555-123-4567\",\n \"mobile\": \"+1-555-987-6543\",\n \"email\": \"contact@company.com\",\n \"sms\": \"+1-555-111-2222\",\n \"smsCount\": 5,\n \"smsChatCount\": 12,\n \"smsSendDate\": \"2024-01-15T10:30:00Z\",\n \"smsSendBy\": \"user123\",\n \"website\": \"https://www.company.com\",\n \"lastSMSStatus\": \"delivered\",\n \"secondSmsSendDate\": \"2024-01-16T14:45:00Z\"\n },\n \"contract\": {},\n \"invoiceRecipientId\": \"<string>\",\n \"invoiceCCRecipientIds\": [\n \"<string>\"\n ],\n \"hideRecipientOnDocuments\": false,\n \"buyerReference\": \"04011000-1234512345-12\",\n \"orderReferenceId\": \"SUP-12345\",\n \"vatNumber\": \"DE123456789\",\n \"debitorNumber\": \"DEB-001\",\n \"paymentTermId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-API-Key", "<api-key>")
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("http://localhost:3000/v2/customers/{id}")
.header("x-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"number\": 1001,\n \"name\": \"ABC Cleaning Services GmbH\",\n \"_id\": \"<string>\",\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"contactPerson\": \"John Doe\",\n \"address\": {\n \"street\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"co\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"contact\": {\n \"telephone\": \"+1-555-123-4567\",\n \"mobile\": \"+1-555-987-6543\",\n \"email\": \"contact@company.com\",\n \"sms\": \"+1-555-111-2222\",\n \"smsCount\": 5,\n \"smsChatCount\": 12,\n \"smsSendDate\": \"2024-01-15T10:30:00Z\",\n \"smsSendBy\": \"user123\",\n \"website\": \"https://www.company.com\",\n \"lastSMSStatus\": \"delivered\",\n \"secondSmsSendDate\": \"2024-01-16T14:45:00Z\"\n },\n \"contract\": {},\n \"invoiceRecipientId\": \"<string>\",\n \"invoiceCCRecipientIds\": [\n \"<string>\"\n ],\n \"hideRecipientOnDocuments\": false,\n \"buyerReference\": \"04011000-1234512345-12\",\n \"orderReferenceId\": \"SUP-12345\",\n \"vatNumber\": \"DE123456789\",\n \"debitorNumber\": \"DEB-001\",\n \"paymentTermId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["x-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": 1001,\n \"name\": \"ABC Cleaning Services GmbH\",\n \"_id\": \"<string>\",\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"contactPerson\": \"John Doe\",\n \"address\": {\n \"street\": \"<string>\",\n \"zip\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"co\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"contact\": {\n \"telephone\": \"+1-555-123-4567\",\n \"mobile\": \"+1-555-987-6543\",\n \"email\": \"contact@company.com\",\n \"sms\": \"+1-555-111-2222\",\n \"smsCount\": 5,\n \"smsChatCount\": 12,\n \"smsSendDate\": \"2024-01-15T10:30:00Z\",\n \"smsSendBy\": \"user123\",\n \"website\": \"https://www.company.com\",\n \"lastSMSStatus\": \"delivered\",\n \"secondSmsSendDate\": \"2024-01-16T14:45:00Z\"\n },\n \"contract\": {},\n \"invoiceRecipientId\": \"<string>\",\n \"invoiceCCRecipientIds\": [\n \"<string>\"\n ],\n \"hideRecipientOnDocuments\": false,\n \"buyerReference\": \"04011000-1234512345-12\",\n \"orderReferenceId\": \"SUP-12345\",\n \"vatNumber\": \"DE123456789\",\n \"debitorNumber\": \"DEB-001\",\n \"paymentTermId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"number": 1001,
"name": "ABC Cleaning Services GmbH",
"_id": "<string>",
"companyId": "<string>",
"status": {
"status": 123,
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"lastModifiedBy": "<string>"
},
"chatId": "<string>",
"contactPerson": "John Doe",
"address": {
"street": "<string>",
"zip": "<string>",
"city": "<string>",
"country": "<string>",
"co": "<string>",
"state": "<string>"
},
"contact": {
"telephone": "+1-555-123-4567",
"mobile": "+1-555-987-6543",
"email": "contact@company.com",
"sms": "+1-555-111-2222",
"smsCount": 5,
"smsChatCount": 12,
"smsSendDate": "2024-01-15T10:30:00Z",
"smsSendBy": "user123",
"website": "https://www.company.com",
"lastSMSStatus": "delivered",
"secondSmsSendDate": "2024-01-16T14:45:00Z"
},
"contract": {},
"invoiceRecipientId": "<string>",
"invoiceCCRecipientIds": [
"<string>"
],
"hideRecipientOnDocuments": false,
"buyerReference": "04011000-1234512345-12",
"orderReferenceId": "SUP-12345",
"vatNumber": "DE123456789",
"debitorNumber": "DEB-001",
"paymentTermId": "<string>"
}Authorizations
Path Parameters
Customer ID
Body
Customer data to update
Customer entity representing a client company or individual who receives services
Customer number (auto-generated if not provided)
1001
Customer name or company name
"ABC Cleaning Services GmbH"
Unique identifier for the customer
The ID of the company this entity belongs to
Entity Status information
Show child attributes
Show child attributes
Chat session ID for customer communications
Main contact person name
"John Doe"
Address
Show child attributes
Show child attributes
Contact information structure containing phone numbers, email, SMS details, and website
Show child attributes
Show child attributes
Contract information and terms
User ID who should receive invoices
User IDs who should receive invoice copies
Whether to hide recipient information on documents
XRechnung Leitweg-ID for electronic invoicing
"04011000-1234512345-12"
XRechnung supplier number (Lieferantennummer)
"SUP-12345"
Customer VAT number
"DE123456789"
Custom debitor number (overwrites customer number for accounting)
"DEB-001"
Payment term ID that overwrites company default for invoices
Response
Customer updated successfully
Customer entity representing a client company or individual who receives services
Customer number (auto-generated if not provided)
1001
Customer name or company name
"ABC Cleaning Services GmbH"
Unique identifier for the customer
The ID of the company this entity belongs to
Entity Status information
Show child attributes
Show child attributes
Chat session ID for customer communications
Main contact person name
"John Doe"
Address
Show child attributes
Show child attributes
Contact information structure containing phone numbers, email, SMS details, and website
Show child attributes
Show child attributes
Contract information and terms
User ID who should receive invoices
User IDs who should receive invoice copies
Whether to hide recipient information on documents
XRechnung Leitweg-ID for electronic invoicing
"04011000-1234512345-12"
XRechnung supplier number (Lieferantennummer)
"SUP-12345"
Customer VAT number
"DE123456789"
Custom debitor number (overwrites customer number for accounting)
"DEB-001"
Payment term ID that overwrites company default for invoices
Was this page helpful?

