orders

Create Purchase Confirmation

Send a WhatsApp purchase-confirmation template for an order.

Idempotent per (tenant, idempotency_key): retries of the same order never message the buyer twice.

post/api/v1/ecommerce/orders/confirmation

Request

  • Base URL: https://www.elocuenti.com
  • URL: https://www.elocuenti.com/api/v1/ecommerce/orders/confirmation
  • Auth: HTTP bearer

Request body

phonestring required

Customer phone in E.164 format.

template_namestring required

WhatsApp template name to send.

template_paramsobject nullable

Optional template variables. Keys must match the template's parameter_mapping (e.g. customer_name, order_id) or be positional ("1", "2", ...). Merged with defaults (customer_name, order_id, order_total).

order_idstring nullable

UUID of the confirmed order. Optional — omit for ticketing/marketplace flows that don't sync orders into Elocuenti.

external_referencestring nullable

Caller's own ID for the order (any string). Used for dedup when no order_id is available.

idempotency_keystring nullable

Explicit dedup key. Defaults to order_id (as text) or external_reference. To send AGAIN for an order that already has a row (e.g. to re-deliver a corrected link), pass a different key such as <external_reference>-resend-1: dedup is per (tenant, idempotency_key) only.

batch_idstring nullable

Optional caller-supplied batch identifier. Echoed verbatim into the structured logs so a whole send can be reconciled per batch.

order_totalnumber nullable

Order total; surfaced to templates as a formatted order_total variable.

currencystring nullable

ISO 4217 currency code for order_total (e.g. COP, MXN).

customer_namestring nullable
customer_emailstring nullable
fallback_templatestring nullable

Optional fallback template name if the primary is not found.

fromstring nullable

Optional. The business WhatsApp number to send from, in E.164 (e.g. +573001234567). Omit it to send from the business default. A number that is not one of the business's active numbers is refused with 422 from_number_not_available.

Response

Successful Response

request_idstring nullable

Changes

No recorded changes to this operation across all 1 revision of this API.