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.
Authorizations
Your Tilta API key, sent as Bearer <key>.
Path Parameters
Unique identifier of a buyer.
100^[a-zA-Z0-9-_]+$Body
Buyer's trading name. Send null to clear and fall back to the legal_name.
"ACME"
Buyer's full legal name incl. the legal form if applicable.
"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 Buyer's registration date (unix time in seconds). Send null to clear.
1582896122
Buyer's date of incorporation (unix time in seconds). Send null to clear.
1582896122
List of business identifiers. Replaces the existing set entirely. Send [] to clear all identifiers.
Show child attributes
Show child attributes
Buyer's billing address.
Show child attributes
Show child attributes
Free-form metadata for storing integration-specific data alongside this buyer. Replaces the existing object entirely. Send null to clear.
Show child attributes
Show child attributes
Buyer's default delivery address. Send null to clear.
Show child attributes
Show child attributes
Response
The buyer has been successfully updated.
Unique identifier of a buyer.
100^[a-zA-Z0-9-_]+$Timestamp indicating when the buyer was created (unix time in seconds).
1582896122
Timestamp indicating the last time the buyer was updated (unix time in seconds).
1582896122
Maximum days past due among DUE invoices.
Buyer's full legal name incl. the legal form if applicable.
"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 Buyer's billing address.
Show child attributes
Show child attributes
Buyer's trading name. If it's not provided, Tilta will use the legal_name.
"ACME"
Buyer' registration date (unix time in seconds), when they signed up on your platform.
1582896122
Buyer's date of incorporation (unix time in seconds), meaning the date when the business of registered or started.
1582896122
A list of business identifiers
Show child attributes
Show child attributes
Buyer's default delivery address.
Show child attributes
Show child attributes
Free-form metadata for storing integration-specific data alongside this buyer. Replaces the existing object entirely on update.
Show child attributes
Show child attributes
Buyer contacts. Returned when expand includes contacts.
Show child attributes
Show child attributes