Order Status Webhook
When signed up to use our order status webhook we will call you back each time the status changes on one of your orders. Using this functionality means you do not have to call back our order status and shipping status API endpoints to get updates for your orders.
Getting Started
In order to use the order status webhook you need to provide your BHN Onboarding Project Manager or Account Manager the following information:
- Webhook callback URL - this is the URL the order status notifications will be published to
- Authorization details - BHN currently supports basic auth with optional x-api-key
- Note: You will not receive callbacks for real-time synchronous only digital content orders (closed loop eGifts and open loop virtual accounts) placed via API as the final order status was already communicated to you in the order API response
We currently have two types of status updates that will be provided (based on product type ordered):
Order Status Update
When we publish order status updates you will receive the following information.
| Attribute Name | Required | Type | Description | Sample Value |
|---|---|---|---|---|
| messageType | Yes | String | Defines if the update is for order status or shipping status. Possible values: orderInfo and shippingInfo | orderInfo |
| orderNumber | No | Number | The order number created by Hawk Marketplace. Only available when an order was successfully created. | 32221233 |
| requestId | Yes | String | The requestId you provided when placing the order request. | 6914618-30244 |
| orderStatus | Yes | String | The current status of the order in Hawk Marketplace. Order status values table | In Process |
| numberOfCards | No | Number | The number of cards present in the order. | 1 |
| dateSubmitted | Yes | String | The date the order request was submitted provided in date-time format. | 2024-04-09T11:44:12.298-0400 |
| orderErrorList | No | Object | List of errors when processing the order request. | |
| eventTimestamp | Yes | String | The date/time the update event was triggered provided in date-time format. | 2024-04-18T14:45:54.490-0500 |
orderErrorList
The order error list object contains the error response for failed order requests.
| Attribute Name | Required | Type | Description | Sample Value |
|---|---|---|---|---|
| key | Yes | String | The error code associated with the error. | orderDetails.contentProvider.invalid |
| description | Yes | String | The error message description. | Content Provider Code is invalid for this program |
| itemNumber | No | Number | The line item in the order request the error applies to. | 1 |
| recipientId | No | String | The recipient>id value, if provided in the request, that is associated with the line item that triggered the error. | ABC1233 |
For more information error codes you may receive please review the REST API Error Code Reference.
Sample Order Status Payload
{
"messageType": "orderInfo",
"orderNumber": 32221233,
"requestId": "6914618-30244",
"orderStatus": "In Process",
"numberOfCards": 1,
"dateSubmitted": "2024-04-09T11:44:12.298-0400",
"orderErrorList": null,
"eventTimestamp": "2024-04-09T11:44:12.543-0400"
}{
"messageType": "orderInfo",
"orderNumber": null,
"requestId": "6899000-28650",
"orderStatus": "Error",
"numberOfCards": null,
"dateSubmitted": "2024-04-08T14:39:31.792+0000",
"orderErrorList": [
{
"key": "orderDetails.ClientRef.id.unique",
"description": "ClientRef id must be unique",
"itemNumber": null,
"recipientId": null
}
],
"eventTimestamp": "2024-02-27T20:06:31.823-0600"
}Order Status Reference
You will get notified whenever a order moves through one of the following statuses.
| Order Status Value | Description |
|---|---|
| In Process | The order is currently processing. |
| Funding Hold | The order is pending funding. It has not been fulfilled. |
| Funding Posted | Funding has posted and the processor has successfully received the order. The order will be fulfilled shortly. |
| Shipped | The order has shipped. |
| Complete | The order was completed and fulfilled successfully. This is the final status for a successfully delivered order. |
| Cancelled | Your order was cancelled before fulfillment. |
| Not All Records Funded | Not all the records in the order could be funded. The order has not fulfilled. |
| Not All Records Reversed | Not all records in the order could be reversed. |
| Not All Records Processed | Not all records in the order could be processed. |
| Declined | The order was declined before being fulfilled. |
| Failure | An order using a real time API failed. This is a final status. The order must be resubmitted. |
| Settlement Error | The order payment could not be completed. The order has not been fulfilled. |
| Error | An error was encountered when placing the order. The order was not fulfilled. |
Shipping Status Update
For physical products this will provide an update on when the order has shipped and any associated tracking information (where a trackable shipping method was used). When we publish order shipping status updates you will receive the following information.
| Attribute Name | Required | Type | Description | Sample Value |
|---|---|---|---|---|
| messageType | Yes | String | Defines if the update is for order status or shipping status. Possible values: orderInfo and shippingInfo | shippingInfo |
| orderNumber | Yes | Number | The order number created by Hawk Marketplace. | 32221233 |
| requestId | Yes | String | The requestId you provided when placing the order request. | 6914618-30244 |
| currentResults | Yes | Array of Objects | An array of objects containing information about all shipments that are part of the order fulfillment. | |
| eventTimestamp | Yes | String | The date/time the update event was triggered. | 2024-04-18T14:45:54.490-0500 |
currentResults Object
| Attribute Name | Required | Type | Description | Sample Value |
|---|---|---|---|---|
| pid | No | String | If you provided a pid during the order request it will be listed here | 1234 |
| shipDate | Yes | String | The ship date as received from fulfillment. | 2024-03-14T13:08:11.567-0500 |
| shipMethod | Yes | String | The ship method used for the item. | UPS Ground |
| trackingNumber | No | String | The tracking number associated with the shipment as provided by the shipper. Only applicable when a trackable shipping method was used. | 948883441903 |
Sample Shipping Status Payload
{
"messageType": "shippingInfo",
"orderNumber": "300417787",
"requestId": "2024-03-14T11:42:49-0500",
"currentResults": [
{
"pid": "pp55aaa22",
"shipDate": "2024-03-14T13:08:11.567-0500",
"shipMethod": "UPS Ground",
"trackingNumber": "948883441903"
}],
"eventTimestamp": "2024-04-18T14:45:54.490-0500"
}{
"messageType": "shippingInfo",
"orderNumber": "300417788",
"requestId": "2024-02-24T11:45:49-0700",
"currentResults": [
{
"pid": "abc123",
"shipDate": "2024-04-17T13:08:11.567-0500",
"shipMethod": "UPS Ground",
"trackingNumber": "948883441123"
},
{
"pid": "xyz123",
"shipDate": "2024-04-17T13:48:17.567-0500",
"shipMethod": "UPS Ground",
"trackingNumber": "948883441789"
}],
"eventTimestamp": "2024-04-18T16:53:24.450-0500"
}Updated 2 months ago
