Example: Order Placed Payload

View as Markdown
Reference example only — Coi is the caller here, your endpoint is the receiver. Fired once, as a POST with a JSON body, right after an order completes. Configure the target URL at: Store > Store Settings > "Purchase" tab > "Webhook להזמנות". IMPORTANT — Cart is not only real products. Alongside actual purchased items, Cart carries pseudo-line-items using negative ProductID as a type tag, so every discount/fee affecting the order total is visible in one array instead of requiring separate fields: \-1 Delivery \-2 Coupon \-3 PayPal commission \-4 Payment/installment fee \-5 VAT \-6 Promotion (store discount rule) Any consumer that looks up "ProductID" against your own catalog MUST first filter out ProductID <= 0, or it will crash or silently mis-book a discount as a purchased product. A negative-ID line has Sku: null and an empty Options array. Cart\[\].Options is a real JSON array (not a double-encoded string) — each entry is {"Name": ..., "Price": ...}. No authentication header — treat the URL itself as the secret and keep it out of client-side code.

Request

This endpoint expects an object.
FullNamestringRequired
Customer's full name, as entered at checkout.
EmailstringRequiredformat: "email"
Customer's email address.
PhonestringRequired

Customer’s phone number, as entered (no fixed format — matches the input mask configured in Store Settings).

OrderNumberstringRequired

Coi’s own order number/identifier. Use this as your idempotency key — the same order is never re-sent with a different number.

Cartlist of objectsRequired

Every line in the order — both real purchased products and pseudo-lines (delivery, coupon, promotion, VAT, payment fee). Always check ProductID before treating a line as a purchased product.

Formlist of objectsRequired

The customer’s entire submitted checkout form, as name/value pairs — one entry per field the merchant’s form actually collects. Field names are whatever the merchant configured (typically Hebrew labels), not a fixed set, so read this array rather than assuming specific keys.

Addressstring or nullOptional

Shipping/billing address as free text, if the checkout form collected one.

UserNotesstring or nullOptional

Free-text order note from the customer, if the checkout form has a notes field.

NewsletterbooleanOptional
Whether the customer opted in to marketing emails at checkout.

Response

Successful response