Get Shipping Information
Introduction
The queryShippingInfo and queryShippingFullInfo endpoints facilitates the retrieval of shipping information for an order. The queryShippingFullInfo endpoint additionally returns the proxyNumber and PID (if present) associated with the issues cards.
URI: https://api.certification.blackhawknetwork.com/rewardsOrderProcessing/v1/queryShippingInfo?orderNumber=<Order Number>
URI: https://api.certification.blackhawknetwork.com/rewardsOrderProcessing/v1/queryShippingFullInfo?orderNumber=<Order Number>
Retrieving Shipping Information
Request Header
To send the request for shipping information we need to send the following information in the request header:
| Parameter | Description | Type | Required | Default Value |
|---|---|---|---|---|
| merchantId | The Merchant ID (MID) is a string identifier, provided to you by your account manager that varies based on the product type. | String | Yes | None |
| requestId | A unique identifier for each request provided by you (the caller). | String | Yes | None |
In our example we will be sending the following values:
Content-Type: application/json
merchantId: 20200009887
requestId: 2019-10-31T15:25:11-0600Query Parameters
The following query parameters need to be sent:
| Parameter | Description | Type | Required |
|---|---|---|---|
| orderNumber | The order number for the order to return shipping information for. | String | Yes |
Example: https://api.certification.blackhawknetwork.com/rewardsOrderProcessing/v1/queryShippingInfo?orderNumber=1234567890 or https://api.certification.blackhawknetwork.com/rewardsOrderProcessing/v1/queryShippingFullInfo?orderNumber=1234567890
Responses
Assuming the query was successful a JSON object will be returned in the response containing the following information:
| Parameter | Description | Type | Required |
|---|---|---|---|
| current | The endpoint that was called. | String | Yes |
| totalCount | The count of records returned. | Integer | Yes |
| currentResults | The returned shipping information. | Object | No |
CurrentResults Object
| Parameter | Description | Type | Required | Allowed Values |
|---|---|---|---|---|
| message | Result message from the shipper. | String | No | |
| shipDate | The shipping date. | String (date-time) | No | |
| shipMethod | The shipping method. | String | No | |
| trackingNumber | The shipper tracking number. | String | No | |
| orderStatus | The current order status. | String | No | See Order Status Reference for possible value returned. |
| proxyNumber | The proxy number associated with the issued card. | String | No | Note: this attribute is only returned when calling queryShippingFullInfo |
| pid | The PID associated with the issued card. | String | No | Note: this attribute is only returned when calling queryShippingFullInfo |
In our example, the currentResults object contains the following values:
{
"current": "https://api.blackhawknetwork.com/rewardsOrderProcessing/v1/queryShippingInfo",
"totalCount": 1,
"currentResults": [{
"message": "Requested Information.",
"shipDate": "2019-10-14T04:00:00.000+0000",
"shipMethod": "UPS_GROUND",
"trackingNumber":"1Z999AA10123456784",
"orderStatus": "COMPLETE"
}]
}Order Status Reference
| orderStatus Value | Notes |
|---|---|
| CANCELLED | Order was cancelled before shipping. |
| COMPLETE | The order completed successfully. This is the final status for a successfully delivered order. |
| DECLINED | The order was declined before shipping. |
| ERROR | An error was encountered when placing the order. The order was not shipped. |
| FUNDING_HOLD | The order is pending funding. It has not shipped yet. |
| FUNDING_POSTED | The processor has successfully received the order. The order will be shipped soon. |
| IN_PROCESS | The order is processing and has not yet shipped. |
| NOT_ALL_RECORDS_FUNDED | Not all the records in the order could be funded. The order has not shipped. |
| NOT_ALL_RECORDS_REVERSED | Not all records in the order could be reversed. |
| REAL-TIME_FAILURE | An order using a real time API failed. This is a final status. The order must be resubmitted. Note: Real-time calls can only be made for eGift and Virtual Prepaid Accounts so there will never be a shipment. |
| SHIPPED | Blackhawk Network has been notified that the order has shipped. Note: Shipped orders are moved to "COMPLETE" status nightly. |
| SUCCESSFULLY_SENT_TO_PROCESSOR | The order has been sent to the processor. Blackhawk Network is waiting for confirmation of shipment. |
Error Code Reference
Listed below are common error codes you may receive when calling this API.
| HTTP Status Code | Error Code | Message | Explanation of Error | Resolution |
|---|---|---|---|---|
| 400 | search.criteria.orderNumber.required | Order number is required. | You did not send an order number. | Ensure an order number is passed in the request. |
| 404 | order.number.not.found | Order number not found. | The order number was not found or did not have any shipping information. | Verify you have passed the correct order number. Verify the order has shipped. |
| 404 | order.number.and.or.cardholder.name.not.found | Order number and/or cardholder name not found. | Order number and/or cardholder name not found or did not have any shipping information. | Verify you have passed the correct order number and/or cardholder information. Verify the order has shipped. |
Sample Error Response
HTTP/1.1 404
Date: Fri, 17 Nov 2023 21:24:54 GMT
Server: Apache
Content-Type: application/json
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
BHN-TRACE-ID: ZVfaJdmf@XbN1tdc@RMrEAAAAIM
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
{
"errors" : [ {
"errorCode" : "order.number.not.found",
"message" : "Order number not found."
} ]
}HTTP/1.1 400
Date: Fri, 17 Nov 2023 21:25:34 GMT
Server: Apache
Content-Type: application/json
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
BHN-TRACE-ID: ZVfaTlOuTUI2EIHeKOUMCwAAAGg
Connection: close
Transfer-Encoding: chunked
{
"errors" : [ {
"errorCode" : "search.criteria.orderNumber.required",
"message" : "Order number is required."
} ]
}Updated 2 months ago
