# Create Webhook Register a new webhook for event notifications POST /api/v3/webhooks Content-Type: application/json Available topics: - VENDOR_WEBHOOK_TOPIC_ORDER_COMPLETED: Order fulfillment completed - VENDOR_WEBHOOK_TOPIC_ORDER_CANCELED: Order was cancelled - VENDOR_WEBHOOK_TOPIC_TRACKING_UPDATED: Shipping tracking updated - VENDOR_WEBHOOK_TOPIC_ADDRESS_UNVERIFIED: Shipping address validation failed Security: - Webhooks are sent via HTTPS POST - Include signature header for verification - Must respond with 200 OK within 30 seconds Use cases: - Automate order status updates - Sync tracking information - Alert customers of shipment Endpoint: POST /api/v3/webhooks Version: v3.0.0 ## Request fields (application/json): - `status` (string,number) Webhook status: ACTIVE or INACTIVE (default: ACTIVE) Enum: "STATUS_ACTIVE", 2, "STATUS_INACTIVE", 3 - `topic` (string,number) Event topic to subscribe to (required) Choose from: ORDER_COMPLETED, ORDER_CANCELED, TRACKING_UPDATED, ADDRESS_UNVERIFIED Enum: "TOPIC_ORDER_COMPLETED", 2, "TOPIC_ORDER_CANCELLED", 3, "TOPIC_TRACKING_ORDER_UPDATED", 4, "TOPIC_ORDER_ON_HOLD", 5, "TOPIC_SHIPPING_ADDRESS_VERIFIED", 6, "TOPIC_SHIPPING_ADDRESS_UNVERIFIED", 7, "TOPIC_PRODUCT_OUT_OF_STOCK", 8 - `name` (string) Human-readable webhook name (optional, helps identify webhook purpose, max length: 255 characters) - `version` (string,number) Webhook payload version (recommended: use latest version for new webhooks) Enum: "VERSION_V1", 2, "VERSION_V3", 3 - `delivery_url` (string) HTTPS URL to receive webhook POST requests (required, must be publicly accessible and respond within 30 seconds, must use HTTPS) - `store_id` (string) Optional store ID to filter events (if provided, only events for this store will trigger the webhook) ## Response 200 fields (application/json): - `status` (string) Response status: "success" or "error" - `message` (string) Human-readable message Success: "Webhook created successfully" Error: "Invalid delivery URL" or "Duplicate webhook" - `data` (object) Created webhook details Includes: webhook_id, topic, delivery_url, created_at - `data.webhook_id` (string) Unique webhook ID - `data.topic` (string,number) Event topic this webhook subscribes to Enum: "TOPIC_ORDER_COMPLETED", 2, "TOPIC_ORDER_CANCELLED", 3, "TOPIC_TRACKING_ORDER_UPDATED", 4, "TOPIC_ORDER_ON_HOLD", 5, "TOPIC_SHIPPING_ADDRESS_VERIFIED", 6, "TOPIC_SHIPPING_ADDRESS_UNVERIFIED", 7, "TOPIC_PRODUCT_OUT_OF_STOCK", 8 - `data.status` (string,number) Webhook status (active/inactive) Enum: "STATUS_ACTIVE", 2, "STATUS_INACTIVE", 3 - `data.delivery_url` (string) URL where webhook events will be delivered (HTTPS required) - `data.version` (string,number) Webhook payload version Enum: "VERSION_V1", 2, "VERSION_V3", 3 - `data.created_at` (string) When this webhook was created - `data.updated_at` (string) When this webhook was last updated - `data.team_id` (string) Team ID this webhook belongs to - `data.store_id` (string) Store ID this webhook is scoped to (optional) ## Response 400 fields (application/json): - `code` (string, required) Machine-readable error code Example: "INVALID_ARGUMENT" - `message` (string, required) Human-readable error message Example: "The request parameters are invalid" - `details` (array) Additional error details - `details.field` (string) Field that caused the error - `details.issue` (string) Description of the issue ## Response 401 fields (application/json): - `code` (string, required) Machine-readable error code Example: "INVALID_ARGUMENT" - `message` (string, required) Human-readable error message Example: "The request parameters are invalid" - `details` (array) Additional error details - `details.field` (string) Field that caused the error - `details.issue` (string) Description of the issue ## Response 403 fields (application/json): - `code` (string, required) Machine-readable error code Example: "INVALID_ARGUMENT" - `message` (string, required) Human-readable error message Example: "The request parameters are invalid" - `details` (array) Additional error details - `details.field` (string) Field that caused the error - `details.issue` (string) Description of the issue ## Response 404 fields (application/json): - `code` (string, required) Machine-readable error code Example: "INVALID_ARGUMENT" - `message` (string, required) Human-readable error message Example: "The request parameters are invalid" - `details` (array) Additional error details - `details.field` (string) Field that caused the error - `details.issue` (string) Description of the issue ## Response 500 fields (application/json): - `code` (string, required) Machine-readable error code Example: "INVALID_ARGUMENT" - `message` (string, required) Human-readable error message Example: "The request parameters are invalid" - `details` (array) Additional error details - `details.field` (string) Field that caused the error - `details.issue` (string) Description of the issue