List Cards By FulfillmentOrderID
Introduction
This API will retrieve a list of cards by a Blackhawk Network order identifier.
Method | Service Name | Service Type |
---|---|---|
GET | orderservices/v1/cards | Synchronous |
- Post-Production URI:
https://api.certification.blackhawknetwork.com/orderservices/v1/cards?fulfillmentOrderId=BMMSY6YXR76PHDH84V430QPAJH
- Production URI:
https://api.blackhawknetwork.com/orderservices/v1/cards?fulfillmentOrderId=BMMSY6YXR76PHDH84V430QPAJH
Request Header Attributes
Name | Type | Required | Max Length | Description |
---|---|---|---|---|
requestId | String | Y | 128 | An unique identifier of the request. If the same requestId is used within 24 hrs, the response for the previous requestId will be sent. |
merchantId | String | Y | 11 | An identifier that was issued by BHN to each contractual legal entity for billing purposes. |
Request Elements
Name | Type | Required | Description |
---|---|---|---|
fulfillmentOrderId | String | C | The unique id generated by BHN for each submitted order |
bhnOrderItemId | String | C | The unique id generated by BHN for each submitted order item. |
page | Integer | N | The page number of the complete result set. |
size | Integer | N | The total number of results per page which matches the searching criteria. If not specified, defaults to 20 |
sort | Attribute Name | N | The parameter by which to sort the results - ASC, DESC. |
At least one conditional request parameter is required
Response Elements
Name | Type | Description |
---|---|---|
totalElements | Integer | Represents total orders in the request. |
totalPages | Integer | Represents a total number of pages in the request. |
numberOfElements | Integer | Represents a total number of orders in the page. |
size | Integer | Represents size of the request. |
content | List | List of cards given by searching criteria. |
_links | JSON object | Links to go to specific pages in the result set. |
CardByOrder
Name | Type | Description |
---|---|---|
partnerOrderNumber | String | This is a human readable key specified by DDP that can easily be cross-reference to some unique identifier in the DDP BHN system. |
partnerPONumber | String | Partner Order Number |
partnerOrderDate | DateTime | Date order was placed |
cardId | String | The unique identifier generated by BHN. It might be used for balance Inquiry. |
proxyCardNumber | String | Proxy Card Number |
cardStatus | String | Card activation / load-value status |
fulfillmentOrderId | String | BHN fulfillment order id |
bhnOrderItemId | String | BHN order line item identifier |
activationCode | String | Activation Code |
cardNumber | String | Card Number |
UPC | String | BHN product UPC |
isCardNumberAvailable | Boolean | Flag to show if Card Number is available.If False, use readAccount API to get the Card Number with cardId as accountID in the request |
Links
Name | Type | Description |
---|---|---|
prev | Object containing one attribute "href" with the link value. | Link to the previous page of results. |
next | Object containing one attribute "href" with the link value. | Link to the next page of results. |
first | Object containing one attribute "href" with the link value. | Link to the first page of results. |
last | Object containing one attribute "href" with the link value. | Link to the last page of results. |
self | Object containing one attribute "href" with the link value. | Link to the current page of results. |
HTTP Response
Success
HTTP Status Code | Description |
---|---|
200 | Request was processed successfully and the response is returned |
Error
HTTP Status Code | Error Code | Description |
---|---|---|
400 | 400 | either fulfillmentorderid or bhnOrderNumber must be provided since partnerOrderNumber has more multiple fulfillment orders in BHN system. |
400 | 400 | page number entered is more than the number of page available |
400 | 400 | Bad request |
404 | 404 | com.bhn.general.attempt.to.call.nonexistent.service |
404 | 404 | Attempt to retrieve a non existing resource. |
403 | 403 | Attempt to retrieve a non existing resource. |
500 | 500 | Internal server error |
502 | 502 | com.bhn.general.service.error |
503 | 503 | com.bhn.general.service.unavailable |
504 | 504 | com.bhn.general.service.timeout |
Sample Request
GET https://api.blackhawknetwork.com/orderservices/v1/cards?fulfillmentOrderId=BMMSY6YXR76PHDH84V430QPAJH HTTP/1.1
Accept-Encoding: gzip,deflate
tenantId: HPCDKMSV763K2VGHCKQQ09QSGM
requestId: TPSPVTQZYH5D143RTS5JS22BKW
merchantId: 70300003138
Host: api.blackhawknetwork.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_152)
{
"totalElements" : 20,
"totalPages" : 20,
"numberOfElements" : 1,
"size" : 1,
"content" : [
{
"partnerOrderNumber" : "3002245600",
"fulfillmentOrderId" : "1WGZSR7MW8G8XMMZJRHHHZNTZW",
"partnerOrderDate" : "2019-02-11T12:32:06.000Z",
"cardId" : "1TQ3FARPGVLZS0TRD1CHSFXJHH",
"proxyCardNumber" : "9877891463781922",
"cardStatus" : "ACTIVATED",
"bhnOrderItemId" : "71X94ZA18CP52524NW71C36HKC",
"activationCode" : "8722",
"cardNumber" : "9877891463781922",
"UPC" : "07675017729",
"activationAmount" : 15.00,
"isCardNumberAvailable" : true
}
],
"number" : 1,
"_links" : {
"prev" : {
"href" : "https://apipp.blackhawknetwork.com/orderservices/v1/cards?fulfillmentOrderId=1WGZSR7MW8G8XMMZJRHHHZNTZW&size=1&page=0"
},
"next" : {
"href" : "https://apipp.blackhawknetwork.com/orderservices/v1/cards?fulfillmentOrderId=1WGZSR7MW8G8XMMZJRHHHZNTZW&size=1&page=2"
},
"first" : {
"href" : "https://apipp.blackhawknetwork.com/orderservices/v1/cards?fulfillmentOrderId=1WGZSR7MW8G8XMMZJRHHHZNTZW&size=1&page=0"
},
"last" : {
"href" : "https://apipp.blackhawknetwork.com/orderservices/v1/cards?fulfillmentOrderId=1WGZSR7MW8G8XMMZJRHHHZNTZW&size=1&page=19"
},
"self" : {
"href" : "https://apipp.blackhawknetwork.com/orderservices/v1/cards?fulfillmentOrderId=1WGZSR7MW8G8XMMZJRHHHZNTZW&size=1&page=1"
}
}
}
Updated 4 months ago