Webhook
Webhooks provide a powerful way to automate actions and integrate your application with our system. By configuring a webhook, you can specify a URL to receive real-time notifications when certain events occur within your account. This allows your system to immediately react and process the events without the need for periodic polling.
Available Webhook Events
Shipped Order Event
Event Type: shipping
Description: This event is triggered when a shipment has been made for an order. The webhook payload contains detailed information about the order, including the order ID, shipping details and product information.
Payload Structure:
{
"orderNumber": "10000045686",
"shipments": [
{
"carrier": "FedEx",
"shippingMethod": "FedEx Ground",
"trackingNumber": "392964503590",
"shipmentDate": "2023-12-01",
"shipmentItems": [
{
"externalItemId": "1",
"product": "8x10 0.75in Stretched Canvas",
"quantity": 1
}
]
}
]
}
Configuring Your Webhooks
- Set up Endpoint: To start receiving webhook notifications, configure an endpoint on your server that can accept HTTP POST requests.
- Secure Your Endpoint: If your endpoint uses Basic Authentication, include the username and password when setting up the webhook subscription. This will ensure that our notifications are securely authenticated.
- Subscribe to Events: Through our dashboard, specify which events you want to subscribe to. Currently, the only available event is shipping.
Best Practices
- Acknowledgment: Respond to webhook payloads with a 200 OK status code as soon as you receive them, indicating successful receipt. Process the payload asynchronously to avoid delays.
- Error Handling: Implement error handling and retry mechanisms in case your endpoint becomes temporarily unavailable.
- Logging: Keep logs of received events and their outcomes to troubleshoot issues or audit actions triggered by webhooks.
By integrating webhooks, you can streamline operations, reduce latency, and enhance the responsiveness of your applications. If you have any questions or need further assistance, please contact our support team.