Orders
Create a customer order
Push a customer order captured on your own online channel (e.g. a Shopify /
WooCommerce store) into TLDP. The order starts as pending_fulfilment; fulfil
it later with a shipment. Pass items[] to record the cart line items (TLDP is a
standalone order store — items are auditable and visible across the platform).
Requires a secret (sk_) key. Emits an order.created webhook.
Pass an Idempotency-Key header to make retries safe: repeating the same key
returns the original order instead of creating a duplicate.
POST
/
v1
/
orders
Create a customer order
curl --request POST \
--url https://api.tybritelabs.com/logistics/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipient": {
"name": "<string>",
"phone": "<string>",
"address": "<string>",
"city": "<string>",
"email": "<string>",
"lat": 123,
"lng": 123
},
"reference": "<string>",
"item": {
"description": "<string>",
"weight_kg": 123,
"declared_value": 123
},
"items": [
{
"name": "<string>",
"sku": "<string>",
"quantity": 1,
"unit_price": 123,
"metadata": {}
}
],
"origin": {
"city": "<string>",
"lat": 123,
"lng": 123
}
}
'import requests
url = "https://api.tybritelabs.com/logistics/v1/orders"
payload = {
"recipient": {
"name": "<string>",
"phone": "<string>",
"address": "<string>",
"city": "<string>",
"email": "<string>",
"lat": 123,
"lng": 123
},
"reference": "<string>",
"item": {
"description": "<string>",
"weight_kg": 123,
"declared_value": 123
},
"items": [
{
"name": "<string>",
"sku": "<string>",
"quantity": 1,
"unit_price": 123,
"metadata": {}
}
],
"origin": {
"city": "<string>",
"lat": 123,
"lng": 123
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recipient: {
name: '<string>',
phone: '<string>',
address: '<string>',
city: '<string>',
email: '<string>',
lat: 123,
lng: 123
},
reference: '<string>',
item: {description: '<string>', weight_kg: 123, declared_value: 123},
items: [
{name: '<string>', sku: '<string>', quantity: 1, unit_price: 123, metadata: {}}
],
origin: {city: '<string>', lat: 123, lng: 123}
})
};
fetch('https://api.tybritelabs.com/logistics/v1/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tybritelabs.com/logistics/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'recipient' => [
'name' => '<string>',
'phone' => '<string>',
'address' => '<string>',
'city' => '<string>',
'email' => '<string>',
'lat' => 123,
'lng' => 123
],
'reference' => '<string>',
'item' => [
'description' => '<string>',
'weight_kg' => 123,
'declared_value' => 123
],
'items' => [
[
'name' => '<string>',
'sku' => '<string>',
'quantity' => 1,
'unit_price' => 123,
'metadata' => [
]
]
],
'origin' => [
'city' => '<string>',
'lat' => 123,
'lng' => 123
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tybritelabs.com/logistics/v1/orders"
payload := strings.NewReader("{\n \"recipient\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"email\": \"<string>\",\n \"lat\": 123,\n \"lng\": 123\n },\n \"reference\": \"<string>\",\n \"item\": {\n \"description\": \"<string>\",\n \"weight_kg\": 123,\n \"declared_value\": 123\n },\n \"items\": [\n {\n \"name\": \"<string>\",\n \"sku\": \"<string>\",\n \"quantity\": 1,\n \"unit_price\": 123,\n \"metadata\": {}\n }\n ],\n \"origin\": {\n \"city\": \"<string>\",\n \"lat\": 123,\n \"lng\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.tybritelabs.com/logistics/v1/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recipient\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"email\": \"<string>\",\n \"lat\": 123,\n \"lng\": 123\n },\n \"reference\": \"<string>\",\n \"item\": {\n \"description\": \"<string>\",\n \"weight_kg\": 123,\n \"declared_value\": 123\n },\n \"items\": [\n {\n \"name\": \"<string>\",\n \"sku\": \"<string>\",\n \"quantity\": 1,\n \"unit_price\": 123,\n \"metadata\": {}\n }\n ],\n \"origin\": {\n \"city\": \"<string>\",\n \"lat\": 123,\n \"lng\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tybritelabs.com/logistics/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipient\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"email\": \"<string>\",\n \"lat\": 123,\n \"lng\": 123\n },\n \"reference\": \"<string>\",\n \"item\": {\n \"description\": \"<string>\",\n \"weight_kg\": 123,\n \"declared_value\": 123\n },\n \"items\": [\n {\n \"name\": \"<string>\",\n \"sku\": \"<string>\",\n \"quantity\": 1,\n \"unit_price\": 123,\n \"metadata\": {}\n }\n ],\n \"origin\": {\n \"city\": \"<string>\",\n \"lat\": 123,\n \"lng\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"order": {
"id": "ord_7f3a91",
"status": "pending_fulfilment",
"source": "storefront",
"reference": "ORD-1042",
"delivery_method": "last_mile",
"recipient_name": "John Doe",
"recipient_city": "Nakuru",
"created_at": "2026-06-07T10:15:00Z"
}
}Authorizations
Body
application/json
⌘I
Create a customer order
curl --request POST \
--url https://api.tybritelabs.com/logistics/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipient": {
"name": "<string>",
"phone": "<string>",
"address": "<string>",
"city": "<string>",
"email": "<string>",
"lat": 123,
"lng": 123
},
"reference": "<string>",
"item": {
"description": "<string>",
"weight_kg": 123,
"declared_value": 123
},
"items": [
{
"name": "<string>",
"sku": "<string>",
"quantity": 1,
"unit_price": 123,
"metadata": {}
}
],
"origin": {
"city": "<string>",
"lat": 123,
"lng": 123
}
}
'import requests
url = "https://api.tybritelabs.com/logistics/v1/orders"
payload = {
"recipient": {
"name": "<string>",
"phone": "<string>",
"address": "<string>",
"city": "<string>",
"email": "<string>",
"lat": 123,
"lng": 123
},
"reference": "<string>",
"item": {
"description": "<string>",
"weight_kg": 123,
"declared_value": 123
},
"items": [
{
"name": "<string>",
"sku": "<string>",
"quantity": 1,
"unit_price": 123,
"metadata": {}
}
],
"origin": {
"city": "<string>",
"lat": 123,
"lng": 123
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recipient: {
name: '<string>',
phone: '<string>',
address: '<string>',
city: '<string>',
email: '<string>',
lat: 123,
lng: 123
},
reference: '<string>',
item: {description: '<string>', weight_kg: 123, declared_value: 123},
items: [
{name: '<string>', sku: '<string>', quantity: 1, unit_price: 123, metadata: {}}
],
origin: {city: '<string>', lat: 123, lng: 123}
})
};
fetch('https://api.tybritelabs.com/logistics/v1/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tybritelabs.com/logistics/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'recipient' => [
'name' => '<string>',
'phone' => '<string>',
'address' => '<string>',
'city' => '<string>',
'email' => '<string>',
'lat' => 123,
'lng' => 123
],
'reference' => '<string>',
'item' => [
'description' => '<string>',
'weight_kg' => 123,
'declared_value' => 123
],
'items' => [
[
'name' => '<string>',
'sku' => '<string>',
'quantity' => 1,
'unit_price' => 123,
'metadata' => [
]
]
],
'origin' => [
'city' => '<string>',
'lat' => 123,
'lng' => 123
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tybritelabs.com/logistics/v1/orders"
payload := strings.NewReader("{\n \"recipient\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"email\": \"<string>\",\n \"lat\": 123,\n \"lng\": 123\n },\n \"reference\": \"<string>\",\n \"item\": {\n \"description\": \"<string>\",\n \"weight_kg\": 123,\n \"declared_value\": 123\n },\n \"items\": [\n {\n \"name\": \"<string>\",\n \"sku\": \"<string>\",\n \"quantity\": 1,\n \"unit_price\": 123,\n \"metadata\": {}\n }\n ],\n \"origin\": {\n \"city\": \"<string>\",\n \"lat\": 123,\n \"lng\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.tybritelabs.com/logistics/v1/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recipient\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"email\": \"<string>\",\n \"lat\": 123,\n \"lng\": 123\n },\n \"reference\": \"<string>\",\n \"item\": {\n \"description\": \"<string>\",\n \"weight_kg\": 123,\n \"declared_value\": 123\n },\n \"items\": [\n {\n \"name\": \"<string>\",\n \"sku\": \"<string>\",\n \"quantity\": 1,\n \"unit_price\": 123,\n \"metadata\": {}\n }\n ],\n \"origin\": {\n \"city\": \"<string>\",\n \"lat\": 123,\n \"lng\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tybritelabs.com/logistics/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipient\": {\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"email\": \"<string>\",\n \"lat\": 123,\n \"lng\": 123\n },\n \"reference\": \"<string>\",\n \"item\": {\n \"description\": \"<string>\",\n \"weight_kg\": 123,\n \"declared_value\": 123\n },\n \"items\": [\n {\n \"name\": \"<string>\",\n \"sku\": \"<string>\",\n \"quantity\": 1,\n \"unit_price\": 123,\n \"metadata\": {}\n }\n ],\n \"origin\": {\n \"city\": \"<string>\",\n \"lat\": 123,\n \"lng\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"order": {
"id": "ord_7f3a91",
"status": "pending_fulfilment",
"source": "storefront",
"reference": "ORD-1042",
"delivery_method": "last_mile",
"recipient_name": "John Doe",
"recipient_city": "Nakuru",
"created_at": "2026-06-07T10:15:00Z"
}
}
