Webhooks for Ordering Notifications
If a Partner is subscribed to any of the order or orderLine status changes, GiftAPI send out notifications to inform of any order or orderLine status updates.
Update Order Notification/Callback
The system supports callbacks to Partners/Subscribers when changes to the order status have been made to the order or order line level. This allows the subscriber to receive a message when the status has changed.
The partner must supply a public HTTPS endpoint and develop a Listener to receive the callback messages.
This notification service also provides an optional feature for subscriber to supply Open Authentication (OAuth) credentials as an additional layer of security.
The partner is required to answer the below questionnaire, post which onboarding team will configure the credentials. Once configured, partner can conduct a validation test and share results.
- What security mechanism would partner like to use for receiving notifications on this endpoint? GiftAPI support the below :
- Basic (Username/Password)
- OAuth (Client Credentials)
- API Key
- What statuses would Partner like to be onboarded with? GiftAPIs provide order and orderLine level notifications.
- GiftAPI also support addition of custom headers for additional validation capabilities.
The following tables consists the Order and Order Line events that Partner can subscribe to:
| Order Status | Descriptions |
|---|---|
| NEW | The order request was created to go through the order lifecycle |
| PROCESSING | The order is undergoing internal processes of validations. |
| FAILED | The Order request was failed due to issues such as system errors or system downtime etc. |
| REJECTED | The Order request was rejected due to issues such as Invalid requests, product unavailability. |
| CANCELLED | The Order was cancelled before fulfillment was complete. |
| COMPLETED | The fulfillment provider successfully generated the card, and the eGift URL was received. |
| OrderLine Status | Descriptions |
|---|---|
| NEW | The orderLine request was created to go through the order lifecycle |
| PROCESSING | The orderLine is undergoing internal processes of validations. |
| FAILED | The OrderLine request was failed due to issues such as system errors or system downtime etc. |
| REJECTED | The OrderLine request was rejected due to issues such as Invalid requests, product unavailability. |
| CANCELLED | The OrderLine was cancelled before fulfillment was complete. |
| COMPLETED | The fulfillment provider successfully generated the card, and the eGift URL was received. |
The following table consists the Order and Order Line Payload fields that Partner can subscribe to:
| Order Event Payload Fields | Description |
|---|---|
| entityType | ORDER |
| orderId | Order GUID created by Ordering API |
| orderNumber | Numeric value created by Ordering API when an order is created |
| orderStatus | Status of the order |
| externalId | Calling application order reference ID |
| externalPONumber | Purchase order number used by accounting for purposes such as reconciliation. |
| Order Line Item Payload Fields (If the data is null for a field, it will not appear in the notification payload) | Description |
|---|---|
| orderId | Order GUID created by Ordering API |
| orderLineId | Orderline GUID created by Ordering API |
| orderLineStatus | Status of the orderLine |
| UPC | Product requested |
| iid | Image ID associated to UPC |
| sku | BHN generated SKU |
| quantity | Number of items ordered for the line item |
| faceValue | Represents the amount including the value and currency |
| shippingTrackingInfo | Array containing shipping information |
| actualShippingMethod | Actual Shipping Address, if adjusted from inbound order request |
| shipmentTrackingNumber | Tracking number of items shipped, returned if applicable (Applicable to Physical orders only) |
| shippingURL | URL to track Shipment (Applicable to Physical orders only) |
| messageType | Provision type, Physical or Digital |
| deliveryStatus | Delivery status of the Card requested |
| schedule | Deferred delivery date |
| deliveryTimestamp | Timestamp indicating when the delivery reached its current status |
| externalLineId | Calling application order line reference Id |
| shippedDate | The actual shipped date received from downstream |
| eventTimestamp | The time when the event was sent out |
| cardReferenceId | Card Identifier for a particular line item |
Item Delivery Status Values (Coming Soon)
Delivery statuses for Digital orders:
| Value | Definition |
|---|---|
| IN-TRANSIT | Cards in the order have been fulfilled and email sent to recipient |
| DELIVERED | The recipient's email domain, ie @gmail.com, has provided a response |
| DELIVERED_SPAM | The email was delivered to the recipient's SPAM folder |
| DELIVERED_OPEN | The email was read by the recipient |
| RETURNED | The recipient's email domain, ie @gmail.com, has declined to accept the email. The email cannot be sent to this email address and has been added to the blacklist |
| BOUNCED | The recipient's email domain, ie @gmail.com, has not responded with a Delivered or Returned response. eGift email could be resent via manual intervention from BHN Customer Support |
Delivery statuses for Physical orders
| Value | Definition |
|---|---|
| IN-TRANSIT | Cards in the order have been fulfilled and mail courier has picked up the packages |
| DELIVERED | Courier has provided tracking information that the package has been delivered |
| RETURNED | Mail was returned for being undeliverable and updated manually by BHN Customer Support Agent |
| REGIONAL_OFFICE_RECEIPT | Used only on 1st Class Mail when the Fulfillment Partner supports IMB Tracing - in transit pending delivery |
| LOCAL_OFFICE_RECEIPT | Used only on 1st Class Mail when the Fulfillment Partner supports IMB Tracing - in transit pending delivery |
| OUT_FOR_DELIVERY | Used only on 1st Class Mail when the Fulfillment Partner supports IMB Tracing - in transit pending delivery |
Order Level Payload Sample
-
{ "event": { "entityType": "ORDER", "orderId": "01JRZ37TPZEFANBET3490GKT2K", "orderNumber": "9733-25549854-9018", "externalPONumber": "TSTSUDOo789oCT10000011111", "locale": "en_US", "orderStatus": "COMPLETED", "externalId": "DB3E04AF452E4BA897EE7663C5002", "id": "01JF0EEW4CNV2MMCZV35K97D4D" } }
OrderLine Payload Sample
-
{ "event": { "entityType": "ORDERLINE", "messageType": "DIGITAL", "orderId": "01JRZ2KVAMT6CP080QTB73HQ1Z", "orderLineId": "01JRZ2KVAMMGJ4AGJS6FCF5Z9Q", "orderLineStatus": "COMPLETED", "upc": "07675017464", "quantity": 1, "faceValue": { "value": 20.0, "currency": "USD" }, "iid": "76696", "eventTimestamp": "2025-04-16T10:35:10.974Z", "shippedDate": "2025-04-16T10:34:18.910Z", "id": "01JF0EEW4CNV2MMCZV35K97D4D", "delivery": { "methods": [ { "type": "EMAIL", "schedule": "DATE", "deliveryStatus": { "status": "DELIVERED_OPEN", "deliveryTimestamp": "2025-06-11T22:36:12.455887947Z" } }, { "type": "SMS", "deliveryStatus": { "status": "DELIVERED", "deliveryTimestamp": "2025-06-11T22:36:12.455887947Z" } } ] }, "cardReferenceInfo": [ { "cardReferenceId": "23YFEYDDJDNSKDOSDOWOS546464" } ] } }{ "event": { "entityType": "ORDERLINE", "messageType": "PHYSICAL", "orderId": "01JMR16QVX82P1QF604AK2VM8H", "orderLineId": "01JMR16QVY012PDD8TMCVYDQFR", "orderLineStatus": "COMPLETED", "shippingTrackingInfo": [ { "shippingTrackingNumber": "948883441903", "shippingURL": "http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=948883441903", "actualShippingMethod": "UPS Next Day" } ], "upc": "07675018605", "quantity": 6, "faceValue": { "value": 10.0, "currency": "USD" }, "iid": "74243", "externalLineId": "TEST-EXT-LINEID-001", "eventTimestamp": "2025-02-23T00:02:52.417Z", "shippedDate": "2025-02-23T00:02:51.940Z", "id": "01JMR1TABYE3MD07PZQF70FDR8", "delivery": { "methods": [ { "type": "PHYSICAL", "shipping_fee": {}, "physicalMethod": "upsground", "deliveryStatus": { "status": "DELIVERED", "deliveryTimestamp": "2025-06-11T22:36:12.455887947Z" } } ] }, "cardReferenceInfo": [ { "cardReferenceId": "23YFEYDDJDNSKDOSDOWOS546464" }, { "cardReferenceId": "23YFEFBHFKSDW374683SKDOSDOWOS" } ] } }
Updated 3 months ago
