Skip to main content
POST
Webhook for new orders (v2)

Overview

The v2 new-order webhook lets TextYess receive your orders so it can attribute them to the WhatsApp conversations, campaigns, and automations that drove them, and power analytics. It is CMS-agnostic: map your store’s order to the contract below once, whatever platform you use.
Automations only fire for recent orders. Flows with a new-order trigger run only when the order’s created_at is within the last 24 hours. Older orders are still ingested for analytics and attribution, so backfilling historical orders is safe — it will never message your customers.

Authentication

Send your organization token in the x-auth-token header. You can find both your token and your organization id in the Developers section:

Path Parameters

string
required
Your organization id, from https://ai.textyess.com/developers

Body Parameters

string
required
Your source order id. Used for idempotency — re-sending the same id for an organization is a no-op, so retries are safe.
string
required
The order timestamp (ISO 8601). A value without a timezone is treated as UTC. Send the real order date so historical orders attribute correctly — it also gates automations: flows run only when created_at is within the last 24 hours.
string
required
Free-text payment/order status.
number
required
The grand total in currency units. A numeric string (“99.90”) is also accepted.
array
required
The payment methods used for the order.
array
required
The items in the order.
object
required
Customer identity. For anonymous orders, supply placeholder values you control.
string
ISO currency code. Defaults to EUR when omitted.
string
Human-facing order number / increment id.
string
Free-text fulfillment status.
string
Tracking URL for the shipment.
object
Shipping address (all fields optional).
object
Billing address — same shape as shipping_address (all fields optional).
array
Discount codes applied to the order.
string
Cart identifier (enables onsite-chat attribution).
number
Subtotal.
number
Total tax.
number
Total discount.
number
Total shipping.

Response

boolean
Whether the webhook was processed.