Ecommerce
...
Webhooks
Webhook Documentation
17 min
overview webhooks allow you to receive real time notifications when events occur in your aiq ecommerce account when a configured event is triggered, aiq ecom sends an http post request to your specified webhook url with a json payload containing the event data webhook payload structure all webhook payloads follow this structure { "id" "webhook event uuid", "type" "event type", "data" { // event specific data (product or order object) }, "created" "2024 01 15t10 30 00 000z" } payload fields id (string) unique identifier for this webhook event type (string) the event type (e g , product created , `order created) data (object) the event data contains either a product or order object depending on the event type created (string) iso 8601 timestamp when the webhook event was created product events product created triggered when a new product is created in your venue event type product created product updated triggered when an existing product is updated event type product updated product deleted triggered when a product is deleted event type product deleted product example payload { "id" "550e8400 e29b 41d4 a716 446655440002", "type" "product updated", "data" { "id" "123e4567 e89b 12d3 a456 426614174000", "name" "og kush", "created" "2024 01 15t10 30 00 000z", "modified" "2024 01 15t16 45 00 000z", "organization" "org 123e4567 e89b 12d3 a456 426614174000", "venue" "venue 123e4567 e89b 12d3 a456 426614174000", "type" "flower", "price" 45 0, "pricewithdiscounts" 40 5, "pricegross" 45 0, "pricenet" 40 5, "pricetype" "regular", "quantity" 0, "quantitythreshold" 10, "purchasemax" 5, "quantitytotal" 0, "description" "a classic indica dominant hybrid with earthy, pine flavors", "size" "3 5g", "weight" 3 5, "weightunit" "grams", "weightformatted" "3 5g", "discountvalue" 0 1, "discounttype" "percent", "discountamount" 4 5, "discounts" \[], "tiers" null, "variants" null }, "created" "2024 01 15t16 45 00 000z" } product data fields true 220,220,222 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type order events order created triggered when a new order is created event type order created order confirmed triggered when an order is confirmed event type order confirmed order updated triggered when an order is updated (status change, item modification, etc ) event type order updated order cancelled triggered when an order is cancelled event type order cancelled order closed triggered when an order is closed/completed event type order closed order out for delivery triggered when an order is marked as out for delivery event type order out for delivery order ready for pickup triggered when an order is ready for customer pickup event type order ready for pickup order delivered triggered when an order is marked as delivered event type order delivered order shipped triggered when an order is shipped event type order shipped order example payload { "id" "550e8400 e29b 41d4 a716 446655440018", "type" "order shipped", "data" { "id" "order 123e4567 e89b 12d3 a456 426614174000", "created" "2024 01 15t10 30 00 000z", "modified" "2024 01 15t16 00 00 000z", "organization" "org 123e4567 e89b 12d3 a456 426614174000", "venue" "venue 123e4567 e89b 12d3 a456 426614174000", "status" "closed", "statuschangedon" "2024 01 15t16 00 00 000z", "substatus" "shipped", "substatuschangedon" "2024 01 15t16 00 00 000z", "paymentstatus" "paid", "paymentachstatus" null, "paymenttype" "debit", "subtotal" 90 0, "subtotalwithoutdiscounts" 100 0, "tax" 8 1, "taxes" \[ { "name" "sales tax", "amount" 0 09, "value" 8 1 } ], "fees" \[ { "name" "shipping fee", "amount" 10 0, "type" "flat", "value" 10 0 } ], "feetotal" 10 0, "feetotalbeforeoraftertax" null, "feetotalontotalaftertax" null, "total" 108 1, "discounts" \[ { "name" "10% off first order", "value" 0 1, "type" "percent", "amount" 10 0 } ], "totaltax" 8 1, "discounttotal" 10 0, "productoffers" \[], "items" \[ { "id" "item 123e4567 e89b 12d3 a456 426614174001", "product" "123e4567 e89b 12d3 a456 426614174000", "name" "og kush", "slug" "og kush", "image" "https //example com/image jpg", "sku" "ogk 001", "brand" "premium brand", "cannabiscompliancetype" "flower", "productcategory" "cat 123e4567 e89b 12d3 a456 426614174000", "productcategoryname" "flower", "subtype" null, "description" "a classic indica dominant hybrid", "size" "3 5g", "price" 45 0, "quantity" 2, "purchaseweight" 7 0, "weight" 3 5, "weightunit" "grams", "weightformatted" "3 5g", "weighttierweight" null, "discountvalue" null, "discounttype" null, "discountamount" null, "discounttotal" null, "modifiergroups" null } ] }, "created" "2024 01 15t16 00 00 000z" } order data fields true 245,207 55656108597285,209 44343891402715 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type order item fields true 220,220,222 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type webhook best practices idempotency use the id field to ensure you donβt process the same webhook event multiple times response time respond to webhook requests within 5 seconds aiq ecom will retry failed webhooks up to 3 times with exponential backoff (30s, 1m, 2m) status codes return a 2xx status code to indicate successful processing any 4xx or 5xx status will trigger a retry error handling log all webhook events for debugging and audit purposes testing test your webhook endpoint with sample payloads before going live event type reference product events product created β new product created product updated β existing product updated product deleted β product deleted order events order created β new order created order confirmed β order confirmed order updated β order updated (status change, item modification, etc ) order cancelled β order cancelled order closed β order closed/completed order out for delivery β order marked as out for delivery order ready for pickup β order ready for customer pickup order delivered β order marked as delivered order shipped β order shipped