Chatilo
USDPrices shown in US dollars Sign in Start free trial
API reference

Orders

Orders are placed by customers in chat; the API reads them and marks them fulfilled or cancelled. Payment is collected by the workspace’s own Razorpay, Stripe or Revolut account, or inside WhatsApp with WhatsApp Pay (India), never by the API. An order paid inside WhatsApp has payment_method "whatsapp_pay", no payment_url, and fires order.paid like any other.

List orders #

GET/api/v1/orders

Works with any key Paged

Orders, newest first. Every filter is optional and they combine.

Query parameters

statusstring
awaiting_payment, paid, fulfilled or cancelled.
contact_idinteger
Only this contact’s orders.
numberinteger
The order number the customer sees, such as 1042.
sincedate-time
Only orders placed at or after this time.
pageinteger
Which page, starting at 1. A page past the end is an empty list.
limitinteger
How many per page: 1 to 100. 50 when left out.

Returns HTTP 200

okboolean
Always true on success.
orderslist of Order
The orders on this page.
pageinteger
The page you asked for.
pagesinteger
How many pages there are at this limit.
totalinteger
How many items match in all.
limitinteger
Items per page.
has_moreboolean
True while there is a next page.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
422invalid_date
A date filter isn’t a date and time like 2026-01-31T09:30:00Z.
422invalid_filter
status isn’t one of the four.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl "https://chatilo.me/api/v1/orders?status=paid" \
  -H "Authorization: Bearer YOUR_API_KEY"
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/orders?status=paid');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/orders?status=paid", {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.get(
    "https://chatilo.me/api/v1/orders?status=paid",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 200
{
    "ok": true,
    "orders": [
        {
            "id": 6001,
            "number": 1042,
            "status": "paid",
            "total": 499800,
            "currency": "INR",
            "contact_id": 1001,
            "conversation_id": 2001,
            "subtotal": 499800,
            "source": "chat",
            "payment_provider": "razorpay",
            "payment_method": "payment_link",
            "payment_reference": null,
            "payment_url": "https://rzp.io/i/example",
            "payment_id": "pay_Example123",
            "items": [
                {
                    "product_id": 301,
                    "name": "Linen dress",
                    "sku": "KS-01",
                    "price": 249900,
                    "quantity": 2,
                    "total": 499800
                }
            ],
            "created_at": "2026-01-31T09:30:00Z",
            "paid_at": "2026-01-31T09:30:00Z",
            "fulfilled_at": null,
            "cancelled_at": null,
            "url": "https://chatilo.me/orders/6001"
        }
    ],
    "page": 1,
    "pages": 1,
    "total": 1,
    "limit": 50,
    "has_more": false
}

Get an order #

GET/api/v1/orders/{id}

Works with any key

One order with its items and the customer.

Path

idintegerrequired
The order’s id (not the order number).

Returns HTTP 200

okboolean
Always true on success.
orderOrder
The order.
contactContact or null
Who placed it.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
404order_not_found
No order with that id in this workspace.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl "https://chatilo.me/api/v1/orders/6001" \
  -H "Authorization: Bearer YOUR_API_KEY"
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/orders/6001');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/orders/6001", {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.get(
    "https://chatilo.me/api/v1/orders/6001",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 200
{
    "ok": true,
    "order": {
        "id": 6001,
        "number": 1042,
        "status": "paid",
        "total": 499800,
        "currency": "INR",
        "contact_id": 1001,
        "conversation_id": 2001,
        "subtotal": 499800,
        "source": "chat",
        "payment_provider": "razorpay",
        "payment_method": "payment_link",
        "payment_reference": null,
        "payment_url": "https://rzp.io/i/example",
        "payment_id": "pay_Example123",
        "items": [
            {
                "product_id": 301,
                "name": "Linen dress",
                "sku": "KS-01",
                "price": 249900,
                "quantity": 2,
                "total": 499800
            }
        ],
        "created_at": "2026-01-31T09:30:00Z",
        "paid_at": "2026-01-31T09:30:00Z",
        "fulfilled_at": null,
        "cancelled_at": null,
        "url": "https://chatilo.me/orders/6001"
    },
    "contact": {
        "id": 1001,
        "name": "Grace Miller",
        "phone": "919876543210",
        "email": "[email protected]",
        "source": "api",
        "opted_in": true,
        "tags": [
            "VIP"
        ],
        "created_at": "2026-01-31T09:30:00Z",
        "attributes": {
            "city": "Denver"
        },
        "notes": "",
        "opted_out_at": null,
        "last_seen_at": "2026-01-31T09:30:00Z",
        "updated_at": "2026-01-31T09:30:00Z"
    }
}

Mark an order fulfilled #

POST/api/v1/orders/{id}/fulfil

Needs a read-and-write key

Says the order has been handed over or shipped. Works for orders that are awaiting payment (cash on delivery) or paid. The team sees a line about it in the conversation; the customer is not messaged.

Path

idintegerrequired
The order’s id (not the order number).

Returns HTTP 200

okboolean
Always true on success.
orderOrder
The order.
contactContact or null
Who placed it.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
403read_only_key
A read-only key was used for a request that changes something.
404order_not_found
No order with that id in this workspace.
409invalid_state
The order is already fulfilled or cancelled.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl -X POST "https://chatilo.me/api/v1/orders/6001/fulfil" \
  -H "Authorization: Bearer YOUR_API_KEY"
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/orders/6001/fulfil');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/orders/6001/fulfil", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.post(
    "https://chatilo.me/api/v1/orders/6001/fulfil",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 200
{
    "ok": true,
    "order": {
        "id": 6001,
        "number": 1042,
        "status": "fulfilled",
        "total": 499800,
        "currency": "INR",
        "contact_id": 1001,
        "conversation_id": 2001,
        "subtotal": 499800,
        "source": "chat",
        "payment_provider": "razorpay",
        "payment_method": "payment_link",
        "payment_reference": null,
        "payment_url": "https://rzp.io/i/example",
        "payment_id": "pay_Example123",
        "items": [
            {
                "product_id": 301,
                "name": "Linen dress",
                "sku": "KS-01",
                "price": 249900,
                "quantity": 2,
                "total": 499800
            }
        ],
        "created_at": "2026-01-31T09:30:00Z",
        "paid_at": "2026-01-31T09:30:00Z",
        "fulfilled_at": "2026-02-01T06:00:00Z",
        "cancelled_at": null,
        "url": "https://chatilo.me/orders/6001"
    },
    "contact": {
        "id": 1001,
        "name": "Grace Miller",
        "phone": "919876543210",
        "email": "[email protected]",
        "source": "api",
        "opted_in": true,
        "tags": [
            "VIP"
        ],
        "created_at": "2026-01-31T09:30:00Z",
        "attributes": {
            "city": "Denver"
        },
        "notes": "",
        "opted_out_at": null,
        "last_seen_at": "2026-01-31T09:30:00Z",
        "updated_at": "2026-01-31T09:30:00Z"
    }
}

Cancel an order #

POST/api/v1/orders/{id}/cancel

Needs a read-and-write key

Cancels an order that is awaiting payment or paid, and puts its stock back. A paid order is not refunded by this: refund the customer from your own payment account. refund_needed tells you when that applies.

Path

idintegerrequired
The order’s id (not the order number).

Returns HTTP 200

okboolean
Always true on success.
orderOrder
The order.
contactContact or null
Who placed it.
refund_neededboolean
True when the order had been paid.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
403read_only_key
A read-only key was used for a request that changes something.
404order_not_found
No order with that id in this workspace.
409invalid_state
The order is already fulfilled or cancelled.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl -X POST "https://chatilo.me/api/v1/orders/6001/cancel" \
  -H "Authorization: Bearer YOUR_API_KEY"
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/orders/6001/cancel');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/orders/6001/cancel", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.post(
    "https://chatilo.me/api/v1/orders/6001/cancel",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 200
{
    "ok": true,
    "order": {
        "id": 6001,
        "number": 1042,
        "status": "cancelled",
        "total": 499800,
        "currency": "INR",
        "contact_id": 1001,
        "conversation_id": 2001,
        "subtotal": 499800,
        "source": "chat",
        "payment_provider": "razorpay",
        "payment_method": "payment_link",
        "payment_reference": null,
        "payment_url": "https://rzp.io/i/example",
        "payment_id": "pay_Example123",
        "items": [
            {
                "product_id": 301,
                "name": "Linen dress",
                "sku": "KS-01",
                "price": 249900,
                "quantity": 2,
                "total": 499800
            }
        ],
        "created_at": "2026-01-31T09:30:00Z",
        "paid_at": "2026-01-31T09:30:00Z",
        "fulfilled_at": null,
        "cancelled_at": "2026-02-01T06:00:00Z",
        "url": "https://chatilo.me/orders/6001"
    },
    "contact": {
        "id": 1001,
        "name": "Grace Miller",
        "phone": "919876543210",
        "email": "[email protected]",
        "source": "api",
        "opted_in": true,
        "tags": [
            "VIP"
        ],
        "created_at": "2026-01-31T09:30:00Z",
        "attributes": {
            "city": "Denver"
        },
        "notes": "",
        "opted_out_at": null,
        "last_seen_at": "2026-01-31T09:30:00Z",
        "updated_at": "2026-01-31T09:30:00Z"
    },
    "refund_needed": true
}

Cookies on this site

We use the cookies needed to run the site and keep you signed in. With your OK we also remember choices you make here, such as the currency for prices. We don’t use advertising or tracking cookies. Cookie policy