Search orders
curl --request GET \
--url https://api.tilta.io/v1/orders/search \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tilta.io/v1/orders/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/orders/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilta.io/v1/orders/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"limit": 100,
"offset": 0,
"total": 140,
"items": [
{
"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"
}Orders
Search orders
Search for orders using filters such as buyer_external_id or external_id. Returns matching orders without requiring full list pagination.
GET
/
v1
/
orders
/
search
Search orders
curl --request GET \
--url https://api.tilta.io/v1/orders/search \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tilta.io/v1/orders/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/orders/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilta.io/v1/orders/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"limit": 100,
"offset": 0,
"total": 140,
"items": [
{
"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"
}The search endpoint matches a single free-text
query against your orders. Use it to locate an order when you only know part of its identifier, or to build a search box in your platform dashboard.
For paging through every order rather than searching for a specific one, use List orders.
Authorizations
Your Tilta API key, sent as Bearer <key>.
Query Parameters
The number of records to be taken.
Required range:
x <= 100Example:
100
The number of records to be skipped.
Example:
0
Minimum string length:
1Order sub-entities to expand in the response object. Currently supported: buyer (more coming soon).
Available options:
buyer Example:
["buyer"]
Response
A list of orders.