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.

  1. What security mechanism would partner like to use for receiving notifications on this endpoint? GiftAPI support the below :
    1. Basic (Username/Password)
    2. OAuth (Client Credentials) 
    3. API Key
  2. What statuses would Partner like to be onboarded with? GiftAPIs provide order and orderLine level notifications.
  3. 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 StatusDescriptions
NEWThe order request was created to go through the order lifecycle
PROCESSINGThe order is undergoing internal processes of validations.
FAILEDThe Order request was failed due to issues such as system errors or system downtime etc.
REJECTEDThe Order request was rejected due to issues such as Invalid requests, product unavailability.
CANCELLEDThe Order was cancelled before fulfillment was complete.
COMPLETEDThe fulfillment provider successfully generated the card, and the eGift URL was received.
OrderLine StatusDescriptions
NEWThe orderLine request was created to go through the order lifecycle
PROCESSINGThe orderLine is undergoing internal processes of validations.
FAILEDThe OrderLine request was failed due to issues such as system errors or system downtime etc.
REJECTEDThe OrderLine request was rejected due to issues such as Invalid requests, product unavailability.
CANCELLEDThe OrderLine was cancelled before fulfillment was complete.
COMPLETEDThe 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 FieldsDescription
entityTypeORDER
orderIdOrder GUID created by Ordering API
orderNumberNumeric value created by Ordering API when an order is created
orderStatusStatus of the order
externalIdCalling application order reference ID
externalPONumberPurchase 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
orderIdOrder GUID created by Ordering API
orderLineIdOrderline GUID created by Ordering API
orderLineStatusStatus of the orderLine
UPCProduct requested
iidImage ID associated to UPC
skuBHN generated SKU
quantityNumber of items ordered for the line item
faceValueRepresents the amount including the value and currency
shippingTrackingInfoArray containing shipping information
actualShippingMethodActual Shipping Address, if adjusted from inbound order request
shipmentTrackingNumberTracking number of items shipped, returned if applicable (Applicable to Physical orders only)
shippingURLURL to track Shipment (Applicable to Physical orders only)
messageTypeProvision type, Physical or Digital
deliveryStatusDelivery status of the Card requested
scheduleDeferred delivery date
deliveryTimestampTimestamp indicating when the delivery reached its current status
externalLineIdCalling application order line reference Id
shippedDateThe actual shipped date received from downstream
eventTimestampThe time when the event was sent out
cardReferenceIdCard Identifier for a particular line item

Item Delivery Status Values (Coming Soon)

Delivery statuses for Digital orders:

ValueDefinition
IN-TRANSITCards in the order have been fulfilled and email sent to recipient
DELIVEREDThe recipient's email domain, ie @gmail.com, has provided a response
DELIVERED_SPAMThe email was delivered to the recipient's SPAM folder
DELIVERED_OPENThe email was read by the recipient
RETURNEDThe 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
BOUNCEDThe 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

ValueDefinition
IN-TRANSITCards in the order have been fulfilled and mail courier has picked up the packages
DELIVEREDCourier has provided tracking information that the package has been delivered
RETURNEDMail was returned for being undeliverable and updated manually by BHN Customer Support Agent
REGIONAL_OFFICE_RECEIPTUsed only on 1st Class Mail when the Fulfillment Partner supports IMB Tracing - in transit pending delivery
LOCAL_OFFICE_RECEIPTUsed only on 1st Class Mail when the Fulfillment Partner supports IMB Tracing - in transit pending delivery
OUT_FOR_DELIVERYUsed only on 1st Class Mail when the Fulfillment Partner supports IMB Tracing - in transit pending delivery

Order Level Payload Sample

  1. {
        "event": {
            "entityType": "ORDER",
            "orderId": "01JRZ37TPZEFANBET3490GKT2K",
            "orderNumber": "9733-25549854-9018",
            "externalPONumber": "TSTSUDOo789oCT10000011111",
            "locale": "en_US",
            "orderStatus": "COMPLETED",
            "externalId": "DB3E04AF452E4BA897EE7663C5002",
             "id": "01JF0EEW4CNV2MMCZV35K97D4D"
        }
    } 
    
    
    

OrderLine Payload Sample

  1. {
      "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"
                }
            ]
        }
    }