curl --request PUT \
--url https://api.tilta.io/v1/orders/{external_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ordered_at": 123,
"payment_method": "TRANSFER",
"payment_term": "DEFER_30D",
"amount": {
"net": 2,
"gross": 2,
"tax": 1
},
"comment": "For Daniel without tomatoes",
"delivery_address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"custom_data": {},
"line_items": [
{
"name": "<string>",
"category": "<string>",
"price": 123,
"quantity": 2,
"description": "<string>"
}
],
"contact_email": "john.doe@example.com"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ordered_at: 123,
payment_method: 'TRANSFER',
payment_term: 'DEFER_30D',
amount: {net: 2, gross: 2, tax: 1},
comment: 'For Daniel without tomatoes',
delivery_address: {
postcode: '12345',
city: 'Berlin',
street: 'Example Street',
house: '42b',
additional: 'c/o Testimonial'
},
custom_data: {},
line_items: [
{
name: '<string>',
category: '<string>',
price: 123,
quantity: 2,
description: '<string>'
}
],
contact_email: 'john.doe@example.com'
})
};
fetch('https://api.tilta.io/v1/orders/{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/orders/{external_id}"
payload = {
"ordered_at": 123,
"payment_method": "TRANSFER",
"payment_term": "DEFER_30D",
"amount": {
"net": 2,
"gross": 2,
"tax": 1
},
"comment": "For Daniel without tomatoes",
"delivery_address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"custom_data": {},
"line_items": [
{
"name": "<string>",
"category": "<string>",
"price": 123,
"quantity": 2,
"description": "<string>"
}
],
"contact_email": "john.doe@example.com"
}
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/orders/{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([
'ordered_at' => 123,
'payment_method' => 'TRANSFER',
'payment_term' => 'DEFER_30D',
'amount' => [
'net' => 2,
'gross' => 2,
'tax' => 1
],
'comment' => 'For Daniel without tomatoes',
'delivery_address' => [
'postcode' => '12345',
'city' => 'Berlin',
'street' => 'Example Street',
'house' => '42b',
'additional' => 'c/o Testimonial'
],
'custom_data' => [
],
'line_items' => [
[
'name' => '<string>',
'category' => '<string>',
'price' => 123,
'quantity' => 2,
'description' => '<string>'
]
],
'contact_email' => 'john.doe@example.com'
]),
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>",
"status": "DRAFT",
"buyer_external_id": "<string>",
"created_at": 1582896122,
"updated_at": 1582896122,
"merchant_external_id": "<string>",
"ordered_at": 123,
"payment_method": "TRANSFER",
"payment_term": "DEFER_30D",
"amount": {
"net": 2,
"gross": 2,
"currency": "EUR",
"tax": 1
},
"buyer": {
"legal_name": "<string>"
},
"comment": "For Daniel without tomatoes",
"delivery_address": {
"postcode": "12345",
"city": "Berlin",
"country": "AF",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"custom_data": {},
"line_items": [
{
"name": "<string>",
"category": "<string>",
"price": 123,
"currency": "EUR",
"quantity": 2,
"description": "<string>"
}
],
"contact_email": "john.doe@example.com"
}{
"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 an order
Fully replace an existing order using PUT semantics. Only orders in PENDING_CONFIRMATION status can be updated. Line items are replaced wholesale.
curl --request PUT \
--url https://api.tilta.io/v1/orders/{external_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ordered_at": 123,
"payment_method": "TRANSFER",
"payment_term": "DEFER_30D",
"amount": {
"net": 2,
"gross": 2,
"tax": 1
},
"comment": "For Daniel without tomatoes",
"delivery_address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"custom_data": {},
"line_items": [
{
"name": "<string>",
"category": "<string>",
"price": 123,
"quantity": 2,
"description": "<string>"
}
],
"contact_email": "john.doe@example.com"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ordered_at: 123,
payment_method: 'TRANSFER',
payment_term: 'DEFER_30D',
amount: {net: 2, gross: 2, tax: 1},
comment: 'For Daniel without tomatoes',
delivery_address: {
postcode: '12345',
city: 'Berlin',
street: 'Example Street',
house: '42b',
additional: 'c/o Testimonial'
},
custom_data: {},
line_items: [
{
name: '<string>',
category: '<string>',
price: 123,
quantity: 2,
description: '<string>'
}
],
contact_email: 'john.doe@example.com'
})
};
fetch('https://api.tilta.io/v1/orders/{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/orders/{external_id}"
payload = {
"ordered_at": 123,
"payment_method": "TRANSFER",
"payment_term": "DEFER_30D",
"amount": {
"net": 2,
"gross": 2,
"tax": 1
},
"comment": "For Daniel without tomatoes",
"delivery_address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"custom_data": {},
"line_items": [
{
"name": "<string>",
"category": "<string>",
"price": 123,
"quantity": 2,
"description": "<string>"
}
],
"contact_email": "john.doe@example.com"
}
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/orders/{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([
'ordered_at' => 123,
'payment_method' => 'TRANSFER',
'payment_term' => 'DEFER_30D',
'amount' => [
'net' => 2,
'gross' => 2,
'tax' => 1
],
'comment' => 'For Daniel without tomatoes',
'delivery_address' => [
'postcode' => '12345',
'city' => 'Berlin',
'street' => 'Example Street',
'house' => '42b',
'additional' => 'c/o Testimonial'
],
'custom_data' => [
],
'line_items' => [
[
'name' => '<string>',
'category' => '<string>',
'price' => 123,
'quantity' => 2,
'description' => '<string>'
]
],
'contact_email' => 'john.doe@example.com'
]),
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>",
"status": "DRAFT",
"buyer_external_id": "<string>",
"created_at": 1582896122,
"updated_at": 1582896122,
"merchant_external_id": "<string>",
"ordered_at": 123,
"payment_method": "TRANSFER",
"payment_term": "DEFER_30D",
"amount": {
"net": 2,
"gross": 2,
"currency": "EUR",
"tax": 1
},
"buyer": {
"legal_name": "<string>"
},
"comment": "For Daniel without tomatoes",
"delivery_address": {
"postcode": "12345",
"city": "Berlin",
"country": "AF",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"custom_data": {},
"line_items": [
{
"name": "<string>",
"category": "<string>",
"price": 123,
"currency": "EUR",
"quantity": 2,
"description": "<string>"
}
],
"contact_email": "john.doe@example.com"
}{
"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"
}PENDING_CONFIRMATION status are eligible for replacement; attempting to update a Confirmed, Cancelled, or system-managed order returns an error.
line_items. If you omit line_items from the request body, all existing
line items are cleared. Always include the complete set of line items you want to retain.amount of an order may affect its authorization status. If the new amount exceeds the buyer’s available Credit
facility limit, the order may become NOT_AUTHORIZED.Authorizations
Your Tilta API key, sent as Bearer <key>.
Path Parameters
Unique identifier of an order.
100^[a-zA-Z0-9-_]+$Body
Order creation date (unix time in seconds). It cannot be in the future
The chosen payment method for a respective order. Available payment methods depend on a number of criteria. Check the paymentterms endpoint for available options. May be left empty if the payment method has not been chosen yet.
CASH, CARD, TRANSFER, DEBIT "TRANSFER"
The chosen payment term for a respective order. Available payment terms depend on a number of criteria. Check the payment_terms endpoint for available options
PREPAYMENT, DEFER_3D, DEFER_7D, DEFER_14D, DEFER_21D, DEFER_30D, DEFER_45D, DEFER_60D, DEFER_75D, DEFER_90D, DEFER_120D, SPLIT_3M, SPLIT_6M "DEFER_30D"
Show child attributes
Show child attributes
Additional order comment added below the order summary in related communication with the buyer.
"For Daniel without tomatoes"
Delivery or shipping address for orders of goods.
Show child attributes
Show child attributes
Free-form metadata for storing integration-specific data alongside this order.
Show child attributes
Show child attributes
Order line items. Please do not merge line items but provide them individually to allow for subsequent correlation with invoices.
Show child attributes
Show child attributes
Order-specific contact email address, used if different from the main buyer email. This allows merchants to specify which individual or entity should be contacted about this specific order.
"john.doe@example.com"
Response
Unique identifier of an order.
100^[a-zA-Z0-9-_]+$Order status.
DRAFT, CANCELLED, CLOSED, PENDING_CONFIRMATION, CONFIRMED, EXPIRED, DISBURSED Unique identifier of a related buyer.
100^[a-zA-Z0-9-_]+$Timestamp indicating when the order was created (unix time in seconds).
1582896122
Timestamp indicating the last time the order was updated (unix time in seconds).
1582896122
Unique identifier of a related merchant.
100^[a-zA-Z0-9-_]+$Order creation date (unix time in seconds). It cannot be in the future
The chosen payment method for a respective order. Available payment methods depend on a number of criteria. Check the paymentterms endpoint for available options. May be left empty if the payment method has not been chosen yet.
CASH, CARD, TRANSFER, DEBIT "TRANSFER"
The chosen payment term for a respective order. Available payment terms depend on a number of criteria. Check the payment_terms endpoint for available options
PREPAYMENT, DEFER_3D, DEFER_7D, DEFER_14D, DEFER_21D, DEFER_30D, DEFER_45D, DEFER_60D, DEFER_75D, DEFER_90D, DEFER_120D, SPLIT_3M, SPLIT_6M "DEFER_30D"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Additional order comment added below the order summary in related communication with the buyer.
"For Daniel without tomatoes"
Delivery or shipping address for orders of goods.
Show child attributes
Show child attributes
Free-form metadata for storing integration-specific data alongside this order.
Show child attributes
Show child attributes
Order line items. Please do not merge line items but provide them individually to allow for subsequent correlation with invoices.
Show child attributes
Show child attributes
Order-specific contact email address, used if different from the main buyer email. This allows merchants to specify which individual or entity should be contacted about this specific order.
"john.doe@example.com"