Orders
Create an order
POST/api/v1/orders
Send each order as soon as it is placed. Yudoo stores it and fires the store's order automations: the confirmation for its payment method first. Sending the same id again updates the order instead of creating a second one, so a retry is always safe.
curl -X POST https://app.yudoo.io/api/v1/orders \
-H "Authorization: Bearer wp_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"id": "1042",
"number": "1042",
"status": "pending",
"customer": { "name": "Mohamed Ali", "phone": "201001234567", "email": "mohamed@example.com" },
"currency": "EGP",
"total": 540,
"shipping_total": 40,
"payment_method": "cod",
"shipping_address": { "address1": "12 Tahrir St", "city": "Cairo", "province": "Cairo", "country": "EG" },
"items": [
{ "name": "Cotton T-shirt", "variant": "White / L", "quantity": 1, "price": 250, "sku": "TS-WH-L" },
{ "name": "Sport socks", "quantity": 2, "price": 125 }
],
"note": "Please deliver after 5 pm"
}'const res = await fetch("https://app.yudoo.io/api/v1/orders", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.YUDOO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
id: order.id, // your platform's order id
number: order.number,
customer: { name: order.customerName, phone: order.phone }, // 201001234567
currency: "EGP",
total: order.total,
payment_method: "cod",
items: order.lines.map((l) => ({ name: l.title, quantity: l.qty, price: l.price })),
}),
});
const { order: saved, error } = await res.json();$ch = curl_init("https://app.yudoo.io/api/v1/orders");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("YUDOO_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"id" => (string) $order->id,
"number" => $order->number,
"customer" => ["name" => $order->name, "phone" => $order->phone],
"currency" => "EGP",
"total" => $order->total,
"payment_method" => "cod",
"items" => array_map(fn($l) => ["name" => $l->title, "quantity" => $l->qty, "price" => $l->price], $order->lines),
]),
]);
$response = json_decode(curl_exec($ch), true);import os, requests
res = requests.post(
"https://app.yudoo.io/api/v1/orders",
headers={"Authorization": f"Bearer {os.environ['YUDOO_API_KEY']}"},
json={
"id": str(order.id),
"number": order.number,
"customer": {"name": order.name, "phone": order.phone},
"currency": "EGP",
"total": order.total,
"payment_method": "cod",
"items": [{"name": l.title, "quantity": l.qty, "price": l.price} for l in order.lines],
},
timeout=10,
)
saved = res.json()["order"] | Field | Type | Description |
|---|---|---|
id | string | Required. Your platform's own order id. Sending the same id again updates that order. |
customer.phone | string | Required. International format with the country code, digits only (201001234567). The WhatsApp messages go here. |
customer.name | string | The customer's name ({{customer_first_name}} in the messages). |
customer.email | string | Optional. |
number | string | The number the customer knows ("1042" → #1042). Defaults to #id. |
status | string | pending (default), processing, shipped, delivered, cancelled… See Order statuses. |
payment_method | string | cod, bank_transfer, instapay, vodafone_cash, card… It picks the confirmation the order gets. See Payment methods. |
currency | string | 3-letter ISO code: EGP, SAR, AED, USD… |
total | number | The order's total, shipping included. |
shipping_total | number | The shipping fee. |
items[] | array | Up to 200 lines: name (required), quantity, price, variant, sku, product_id, image_url (https). |
shipping_address | object | address1, address2, city, province, postal_code, country (ISO-2 or name). |
note | string | The customer's order note. |
tracking | object | number, url, carrier — when the order already shipped. |
placed_at | string | ISO 8601 date. Defaults to the moment Yudoo received the order. |
The answer is 201 Created with the order (200 when the id was sent before):
{
"order": {
"id": "1042",
"number": "#1042",
"status": "pending",
"confirmation": { "status": "pending", "at": null, "cancel_reason": null },
"customer": { "name": "Mohamed Ali", "phone": "201001234567", "email": "mohamed@example.com" },
"currency": "EGP",
"total": 540,
"payment_method": "cod",
"items": [
{ "name": "Cotton T-shirt", "variant": "White / L", "quantity": 1, "price": 250, "sku": "TS-WH-L", "product_id": null },
{ "name": "Sport socks", "variant": null, "quantity": 2, "price": 125, "sku": null, "product_id": null }
],
"tracking": null,
"created_at": "2026-11-04T10:00:00.000Z",
"updated_at": "2026-11-04T10:00:00.000Z"
}
} Stuck, or need a field we don't have yet? Our team answers on WhatsApp.