Update an order
이 페이지는 아직 한국어 언어로 제공되지 않습니다. 기본 언어(English)로 표시합니다.
Update an order
https://api.cekat.ai/api/orders/{id}Updates an order’s status, payment status, address, notes, or invoice. Send only the fields you want to change. changed in the response lists what changed, with old and new values.
Cancelling an order with a pending invoice expires the invoice (and its Xendit payment link). Payment status can’t be set by hand for Xendit orders.
Authorization
Your Cekat API key, from Settings → Developers & API in the Cekat dashboard.
Alternative to api_key: send the same key as Bearer YOUR_API_KEY.
Path parameters
Body application/jsonrequired
pending, processing, shipping, cancelled, completedpending, paid, expiredOnly for custom orders.
Response
Order updated.
An order with its contact, products and invoices. Additional fields may be present.
Show child attributes
pending, processing, shipping, cancelled, completedmanual, xendit, customShow child attributes
Show child attributes
The order's invoices, newest first.
Show child attributes
PENDING, PAID, EXPIRED, SETTLEDXendit payment link, for xendit orders.
Invoice PDF, or your own invoice URL for custom orders.
Each changed field with old_value and new_value.
A value is invalid, or the change is not allowed for this payment method.
Show child attributes
Request ID. Include it when contacting Cekat support.
The API key is missing or invalid.
Show child attributes
Request ID. Include it when contacting Cekat support.
The resource was not found or does not belong to your business.
Show child attributes
Request ID. Include it when contacting Cekat support.
Rate limit exceeded. Wait and retry.
curl --request PUT \
--url 'https://api.cekat.ai/api/orders/3c90c3cc-0d44-4b50-8888-8dd25736052a' \
--header 'api_key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"order_status": "pending",
"payment_status": "pending",
"invoice_is_sent": true,
"address": "<string>",
"notes": "<string>",
"custom_invoice_url": "https://example.com"
}'
const response = await fetch('https://api.cekat.ai/api/orders/3c90c3cc-0d44-4b50-8888-8dd25736052a', {
method: 'PUT',
headers: { 'api_key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({
"order_status": "pending",
"payment_status": "pending",
"invoice_is_sent": true,
"address": "<string>",
"notes": "<string>",
"custom_invoice_url": "https://example.com"
})
});
const data = await response.json();
console.log(data);
import requests
url = "https://api.cekat.ai/api/orders/3c90c3cc-0d44-4b50-8888-8dd25736052a"
headers = {"api_key": "YOUR_API_KEY"}
payload = {
"order_status": "pending",
"payment_status": "pending",
"invoice_is_sent": True,
"address": "<string>",
"notes": "<string>",
"custom_invoice_url": "https://example.com"
}
response = requests.put(url, headers=headers, json=payload)
print(response.json())
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.cekat.ai/api/orders/3c90c3cc-0d44-4b50-8888-8dd25736052a',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => ['api_key: YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'order_status' => 'pending',
'payment_status' => 'pending',
'invoice_is_sent' => true,
'address' => '<string>',
'notes' => '<string>',
'custom_invoice_url' => 'https://example.com'
]),
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{
"message": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_number": 1,
"created_at": "2026-01-15T09:30:00Z",
"order_status": "pending",
"payment_method": "manual",
"subtotal": 10000,
"discount": 10000,
"shipping_fee": 10000,
"vat": 10000,
"grand_total": 10000,
"currency": "<string>",
"address": "<string>",
"notes": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"display_name": "Jane Doe",
"phone_number": "6281234567890",
"email": "[email protected]"
},
"cekat_orders_products": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_name": "Kopi Susu",
"quantity": 1,
"price": 10000
}
],
"invoices": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"amount": 10000,
"payment_link": "<string>",
"pdf_link": "<string>",
"is_sent": true,
"expiry_date": "2026-01-15",
"paid_at": "2026-01-15T09:30:00Z",
"created_at": "2026-01-15T09:30:00Z"
}
]
},
"changed": {}
}
{
"success": true,
"message": "<string>",
"statusCode": 1,
"error": {
"message": "<string>"
},
"correlationId": "<string>"
}
{
"success": true,
"message": "<string>",
"statusCode": 1,
"error": {
"message": "<string>"
},
"correlationId": "<string>"
}
{
"success": true,
"message": "<string>",
"statusCode": 1,
"error": {
"message": "<string>"
},
"correlationId": "<string>"
}
{
"message": "<string>"
}