Skip to content

Orders

PUT/api/v1/orders

Upsert by external_id. A payload whose modified_at is older than the stored version is not written (unchanged), so out-of-order requests never overwrite newer data. Statuses are stored as raw slugs (a wc- prefix is removed); slugs missing from your status definitions come back in unmapped_statuses. Phone and email are kept so the assistant can verify callers; the phone is stored encrypted.

  • Authentication: Authorization: Bearer rz_live_…
  • Scope: ingest:orders
  • Plan feature: none (available on every plan)
  • Idempotency-Key: optional (recommended for retries)

Fields marked * are required. Unknown fields are rejected with 422.

OrderBatch

FieldTypeLimitsMeaning
items *ApiOrder[]min items 1, max items 10001–1000 records.

ApiOrder

FieldTypeLimitsMeaning
external_id *stringmin 1, max 200Order id on your site.
numberstring | nullmax 2000Order number the customer says; defaults to external_id.
codestring | nullmax 2000Alternative order code.
status *stringmin 1, max 100Raw status slug (e.g. processing).
customer_namestring | nullmax 2000Customer name.
emailstring | nullmax 2000Email (for verification).
phonestring | nullmax 2000Phone (to recognise callers; stored encrypted).
customer_idstring | nullmax 2000Customer id.
payment_methodstring | nullmax 2000Payment method.
payment_method_idstring | nullmax 2000Payment method id.
shipping_methodstring | nullmax 2000Shipping method.
shipping_method_idstring | nullmax 2000Shipping method id.
shipping_citystring | nullmax 2000Shipping city/district.
itemsApiOrderItem[]max items 500, default []Line items.
totalnumber | string^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$, default "0"Total.
currencystringmin 3, max 3, default "TRY"Currency.
carrierstring | nullmax 2000Carrier.
tracking_numberstring | nullmax 2000Tracking number.
tracking_statusstring | nullmax 2000Carrier status code.
tracking_urlstring | nullmax 2000Tracking URL.
shipment_codestring | nullmax 2000Shipment code.
channelstringmin 1, max 50, default "site"site / trendyol / hepsiburada.
flagsobjectdefault {}Order flags (e.g. kurumsal, taksit, tax_free).
couponsstring[]max items 20, default []Coupon codes used (marks the coupon as used).
sepet_idstring | nullmin 1, max 200dis_id of the cart that became this order.
created_at *string (date-time)Created at (ISO 8601; Turkey time if no offset).
modified_atstring (date-time) | nullLast change; defaults to now.
completed_atstring (date-time) | nullCompleted at.

ApiOrderItem

FieldTypeLimitsMeaning
name *stringmin 1, max 500Item name.
qtyinteger≥ 0, default 1Quantity.
totalnumber | string^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$, default "0"Line total.
refstring | nullmax 2000Product item_ref.
Terminal window
curl -s -X PUT "$RZ_API/api/v1/orders" \
-H "Authorization: Bearer $RZ_KEY" -H "Content-Type: application/json" \
-H "Idempotency-Key: siparis-98765-v3" \
-d '{"items": [{"external_id": "98765", "number": "98765", "status": "processing",
"customer_name": "Ayşe Yılmaz", "phone": "05321234567", "email": "[email protected]",
"items": [{"name": "Kablosuz Kulaklık X2", "qty": 1, "total": "1899.90", "ref": "1234"}],
"total": "1899.90", "currency": "TRY", "carrier": "Örnek Kargo", "tracking_number": "123456789012",
"created_at": "2026-09-24T10:15:00+03:00", "modified_at": "2026-09-24T12:00:00+03:00"}]}'

Schema: OrderResult

FieldTypeLimitsMeaning
inserted *integer
updated *integer
unchanged *integer
unmapped_statuses *string[]
{
"inserted": 1,
"updated": 0,
"unchanged": 0,
"unmapped_statuses": []
}

Error statuses: 401, 403, 404, 413, 422, 429 — see Errors and limits.