curl --request PUT \
--url https://api.tilta.io/v1/buyers/{external_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"trading_name": "ACME",
"legal_name": "ACME GmbH",
"registered_at": 1582896122,
"incorporated_at": 1582896122,
"business_identifiers": [
{
"value": "<string>"
}
],
"business_address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"custom_data": {},
"delivery_address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
}
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
trading_name: 'ACME',
legal_name: 'ACME GmbH',
registered_at: 1582896122,
incorporated_at: 1582896122,
business_identifiers: [{value: '<string>'}],
business_address: {
postcode: '12345',
city: 'Berlin',
street: 'Example Street',
house: '42b',
additional: 'c/o Testimonial'
},
custom_data: {},
delivery_address: {
postcode: '12345',
city: 'Berlin',
street: 'Example Street',
house: '42b',
additional: 'c/o Testimonial'
}
})
};
fetch('https://api.tilta.io/v1/buyers/{external_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/buyers/{external_id}"
payload = {
"trading_name": "ACME",
"legal_name": "ACME GmbH",
"registered_at": 1582896122,
"incorporated_at": 1582896122,
"business_identifiers": [{ "value": "<string>" }],
"business_address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"custom_data": {},
"delivery_address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilta.io/v1/buyers/{external_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'trading_name' => 'ACME',
'legal_name' => 'ACME GmbH',
'registered_at' => 1582896122,
'incorporated_at' => 1582896122,
'business_identifiers' => [
[
'value' => '<string>'
]
],
'business_address' => [
'postcode' => '12345',
'city' => 'Berlin',
'street' => 'Example Street',
'house' => '42b',
'additional' => 'c/o Testimonial'
],
'custom_data' => [
],
'delivery_address' => [
'postcode' => '12345',
'city' => 'Berlin',
'street' => 'Example Street',
'house' => '42b',
'additional' => 'c/o Testimonial'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"external_id": "<string>",
"created_at": 1582896122,
"updated_at": 1582896122,
"max_days_past_due": 123,
"legal_name": "ACME GmbH",
"legal_form": "LIMITED_COMPANY",
"business_address": {
"postcode": "12345",
"city": "Berlin",
"country": "AF",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"trading_name": "ACME",
"registered_at": 1582896122,
"incorporated_at": 1582896122,
"business_identifiers": [
{
"type": "VAT_ID",
"value": "<string>",
"country": "AF"
}
],
"delivery_address": {
"postcode": "12345",
"city": "Berlin",
"country": "AF",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"custom_data": {},
"contacts": [
{
"external_id": "<string>",
"buyer_external_id": "<string>",
"assign_to_all_invoices": true,
"created_at": 1582896122,
"updated_at": 1582896122,
"salutation": "MR",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"phone": "+491711010101",
"address": {
"postcode": "12345",
"city": "Berlin",
"country": "AF",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
}
}
]
}{
"code": "BAD_REQUEST",
"error": "Request validation failed. 1 issue found.",
"issues": [
{
"code": "INVALID_TYPE",
"path": "body.registered_at",
"message": "Invalid type"
}
]
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}Replace a buyer
Fully replace a buyer stored record using PUT semantics. All fields must be provided – omitted fields are cleared. Retrieve first for partial updates.
curl --request PUT \
--url https://api.tilta.io/v1/buyers/{external_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"trading_name": "ACME",
"legal_name": "ACME GmbH",
"registered_at": 1582896122,
"incorporated_at": 1582896122,
"business_identifiers": [
{
"value": "<string>"
}
],
"business_address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"custom_data": {},
"delivery_address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
}
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
trading_name: 'ACME',
legal_name: 'ACME GmbH',
registered_at: 1582896122,
incorporated_at: 1582896122,
business_identifiers: [{value: '<string>'}],
business_address: {
postcode: '12345',
city: 'Berlin',
street: 'Example Street',
house: '42b',
additional: 'c/o Testimonial'
},
custom_data: {},
delivery_address: {
postcode: '12345',
city: 'Berlin',
street: 'Example Street',
house: '42b',
additional: 'c/o Testimonial'
}
})
};
fetch('https://api.tilta.io/v1/buyers/{external_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/buyers/{external_id}"
payload = {
"trading_name": "ACME",
"legal_name": "ACME GmbH",
"registered_at": 1582896122,
"incorporated_at": 1582896122,
"business_identifiers": [{ "value": "<string>" }],
"business_address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"custom_data": {},
"delivery_address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilta.io/v1/buyers/{external_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'trading_name' => 'ACME',
'legal_name' => 'ACME GmbH',
'registered_at' => 1582896122,
'incorporated_at' => 1582896122,
'business_identifiers' => [
[
'value' => '<string>'
]
],
'business_address' => [
'postcode' => '12345',
'city' => 'Berlin',
'street' => 'Example Street',
'house' => '42b',
'additional' => 'c/o Testimonial'
],
'custom_data' => [
],
'delivery_address' => [
'postcode' => '12345',
'city' => 'Berlin',
'street' => 'Example Street',
'house' => '42b',
'additional' => 'c/o Testimonial'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"external_id": "<string>",
"created_at": 1582896122,
"updated_at": 1582896122,
"max_days_past_due": 123,
"legal_name": "ACME GmbH",
"legal_form": "LIMITED_COMPANY",
"business_address": {
"postcode": "12345",
"city": "Berlin",
"country": "AF",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"trading_name": "ACME",
"registered_at": 1582896122,
"incorporated_at": 1582896122,
"business_identifiers": [
{
"type": "VAT_ID",
"value": "<string>",
"country": "AF"
}
],
"delivery_address": {
"postcode": "12345",
"city": "Berlin",
"country": "AF",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"custom_data": {},
"contacts": [
{
"external_id": "<string>",
"buyer_external_id": "<string>",
"assign_to_all_invoices": true,
"created_at": 1582896122,
"updated_at": 1582896122,
"salutation": "MR",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"phone": "+491711010101",
"address": {
"postcode": "12345",
"city": "Berlin",
"country": "AF",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
}
}
]
}{
"code": "BAD_REQUEST",
"error": "Request validation failed. 1 issue found.",
"issues": [
{
"code": "INVALID_TYPE",
"path": "body.registered_at",
"message": "Invalid type"
}
]
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}GET /v1/buyers/{external_id}, merge your changes into the retrieved object, and submit the complete merged payload. Objects like business_identifiers and custom_data are replaced entirely, not merged.
trading_name is normalized to null and clears the field. Changed names are validated rather than silently stripped, transliterated or truncated; preserve the business’s identity when correcting a name.Path Parameters
Body
Buyer's trading name. An unchanged stored name is accepted. Changed names must contain at most 2048 characters and use only Unicode letters, combining marks, numbers, spaces, punctuation, + or |, without emoji, control characters or invisible formatting characters. Send null, an empty string or a whitespace-only string to clear and fall back to the legal_name.
"ACME"
Buyer's full legal name incl. the legal form if applicable. An unchanged stored name is accepted. Changed names must contain at most 2048 characters, include at least one Unicode letter or number and use only letters, combining marks, numbers, spaces, punctuation, + or |, without emoji, control characters or invisible formatting characters.
"ACME GmbH"
Buyer's legal form which depends on the buyer's registered country. Available legal forms cover Tilta's operating countries.
LIMITED_COMPANY, SOLE_TRADER, PARTNERSHIP, PUBLIC_COMPANY, COOPERATIVE, GOVERNMENT, OTHER Response
The buyer has been successfully updated.
Buyer's legal form which depends on the buyer's registered country. Available legal forms cover Tilta's operating countries.
LIMITED_COMPANY, SOLE_TRADER, PARTNERSHIP, PUBLIC_COMPANY, COOPERATIVE, GOVERNMENT, OTHER