- Callbacks
- Get Callback URLs
Callbacks
Get Callback URLs
Retrieve registered callback URLs filtered by message type
curl --request GET \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/callbacks \
--header 'Authorization: Bearer <token>'Retrieve all registered webhook callback URLs, optionally filtered by message type. Use this endpoint to view and audit your current webhook subscriptions.
Filter by specific message types to reduce response size, or use message_type=all to retrieve all callbacks at once.
Query Parameters
Filter callbacks by message type. Use all to retrieve all callbacks regardless of type.
Available Message Types
skuInventoryChange
Inventory level changes for any SKU
orderEvent
Order status updates (created, shipped, delivered, canceled)
orderUpdateResolution
Order update request completion status
orderCancelResolution
Order cancellation request completion status
inboundShipmentEvent
Inbound shipment status changes
rmaEvent
Return merchandise authorization updates
snapshotReady
Inventory snapshot generation completion
curl -X GET "https://app.masonhub.co/{account}/api/v1/callbacks?message_type=skuInventoryChange" \
-H "Authorization: Bearer your_jwt_token"
[
{
"id": "callback-uuid-123",
"url": "https://api.clienturl.com/api/inventory_event",
"message_type": "skuInventoryChange",
"api_version": "1.0",
"token": "encrypted_verification_token",
"created_at": "2018-08-01T10:30:00Z"
},
{
"id": "callback-uuid-456",
"url": "https://api.clienturl.com/api/order_event",
"message_type": "orderEvent",
"api_version": "1.0",
"token": "encrypted_verification_token",
"created_at": "2018-08-01T10:35:00Z"
}
]
Response Fields
Each callback object in the response includes:
| Field | Type | Description |
|---|---|---|
id | string | Unique callback UUID for future operations |
url | string | HTTPS webhook endpoint URL |
message_type | string | Event type this callback is subscribed to |
api_version | string | API version for callback payloads |
token | string | Encrypted verification token (if configured) |
created_at | string | Registration timestamp in RFC3339 format |
Callback Payload Format
When events occur, MasonHub sends POST requests to registered URLs with this structure:
{
"callback_url": "https://client.com/api/webhook",
"message_type": "eventType",
"message_id": "unique-event-id",
"api_version": "1.0",
"data": [
{
// Event-specific data
}
]
}
Use Cases
Audit Callbacks
Verify Registration
Get Callback IDs
Periodically fetch all callbacks to ensure your webhook configuration is up to date:
GET /callbacks?message_type=all
Review the list and remove any callbacks pointing to decommissioned endpoints.
Best Practices
Regular Audits
Periodically review registered callbacks to ensure they’re current and pointing to valid endpoints.
Message Type Filtering
Use specific message types when fetching callbacks to reduce response size and improve performance.
Store Callback IDs
Save callback IDs when creating registrations for easier management and deletion later.
Monitor Endpoints
Ensure all registered URLs are accessible and responding correctly to avoid delivery failures.
Use message_type=all during initial setup to get a complete view of all your webhook subscriptions.
curl -X GET "https://app.masonhub.co/{account}/api/v1/callbacks?message_type=skuInventoryChange" \
-H "Authorization: Bearer your_jwt_token"
curl --request GET \
--url https://sandbox.masonhub.co/dragonfly-cosmetics-demo/api/v1/callbacks \
--header 'Authorization: Bearer <token>'[
{
"id": "callback-uuid-123",
"url": "https://api.clienturl.com/api/inventory_event",
"message_type": "skuInventoryChange",
"api_version": "1.0",
"token": "encrypted_verification_token",
"created_at": "2018-08-01T10:30:00Z"
},
{
"id": "callback-uuid-456",
"url": "https://api.clienturl.com/api/order_event",
"message_type": "orderEvent",
"api_version": "1.0",
"token": "encrypted_verification_token",
"created_at": "2018-08-01T10:35:00Z"
}
]