List all my Orders

Overview

This API is for retrieving all the orders and Line items for each orders for the given Tenant with different query parameter.

Method

Service Name

Service Type

GET

orderservices/v1/fulfillmentorder

Synchronous

URI: https://api.blackhawknetwork.com/orderservices/v1/fulfillmentorder/

Sample URI: https://api.blackhawknetwork.com/orderservices/v1/fulfillmentorder/?startDate=2018-02-01T01%3A00%3A31.000Z&endDate=2018-03-01T01%3A00%3A31.000Z&page=0&size=5&partnerOrderNumber=TL8DWH

Request Header Attributes

Name

Type

Required

Max Length

Description

requestId

String

Y

128

merchantid

String

N

Request Elements

Name

Type

Required

Max Length

Description

partnerOrderNumber

String

N

30

Partner Order Number

status

Enum

N

NEW, IN_PROCESSING, IN_FULFILLMENT, ERROR, SHIPPED, REJECTED, CANCELLED (Case insensitive)

NB: ERROR is an internal state indicating BHN Operations engagement is needed. No action is required by DP

startDate

DateTime (ISO 8601)

N

Start date for the query.

Format- yyyy-MM-dd'T'HH:mm:ss.SSSZ

Combined date and time in UTC.

endDate

DateTime (ISO 8601)

N

End Date for the query. If not specified, default current day

Format- yyyy-MM-dd'T'HH:mm:ss.SSSZ

Combined date and time in UTC.

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 100

Response Attributes

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.

first

Boolean

Represents if the current page is first.

size

Integer

Represents size of the request.

content

List

The array of entities that match the query criteria and represent the subset of entities specified by the pagination related query string parameters.

The attributes are different based on the verboselevel.

_links

List

Represents Uri of the order

Order

Name

Type

Description

fulfillmentOrderId

String

Order Items will be returned for the specified fulfillment order id

bhnOrderNumber

String

BHN order number

partnerOrderNumber

String

Partner Order Number

partnerOrderDate

DateTime

Date order was placed

partnerOrderVersion

String

request version

partnerPONumber

String

Partner Order Number

orderItemUrl

String

The order item Url

totalOrderQuantity

Integer

Total Quantity

totalOrderValue

String

total load value

status

FulfillmentStatus

The fulfillment order status

FulfillmentStatus

Name

Type

Description

currentStatus

Status

Current Order Status

Status

Name

Type

Description

status

ItemStatusEnum

Fulfillment Order Status

NEW, IN_PROCESSING, IN_FULFILLMENT, ERROR, SHIPPED, REJECTED, CANCELLED (Case insensitive)

NB: ERROR is an internal state indicating BHN Operations engagement is needed. No action is required by DP

description

String

Status description Friendly description of this Fulfillment Order status.

Link

Name

Type

Description

ref

String

The relationship value with the current page(see Link Notes*)

href

String

Url of the order

Link Notes*: next, first, prev, last, self'

Http Response Codes

Success

HTTP Status Code

Description

200

Request was processed successfully and the response is returned

Error Codes

HTTP Status Code

Description

400

missing date field - endDate

400

Invalid format: "20170201" is too short

400

Invalid format: "xxxxxx"

400

start date couldn't be after end date

400

invalid status - PROCESSED

400

page number entered is more than the number of page available

404

Attempt to retrieve a non existing resource.

404

com.bhn.general.attempt.to.call.nonexistent.service

403

com.bhn.general.service.call.unauthorized

500

Internal server error

502

com.bhn.general.service.error

503

com.bhn.general.service.unavailable

504

com.bhn.general.service.timeout

Sample Request and Response

For all orders and order lineitems for a given TenantId/MID

GET https://api.blackhawknetwork.com/orderservices/v1/fulfillmentorder/?startDate=2018-02-01T01%3A00%3A31.000Z&endDate=2018-03-01T01%3A00%3A31.000Z&page=3&size=5 HTTP/1.1
Accept-Encoding: gzip,deflate
tenantId: TPSPVTQZYH5D143RTS5JS22BKW
requestId: HPCDKMSV763K2VGHCKQQ09QSGM
merchantId: 70300004232
Host: api.blackhawknetwork.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
{
   "totalElements": 13,
   "totalPages": 4,
   "numberOfElements": 4,
   "first": true,
   "size": 4,
   "content":    [
            {
         "fulfillmentOrderId": "GXJ9MNT4J87BZS7Q43BNTFZ498",
         "partnerTenantId": "DKX3KZ2B5SQQT998PTYRBLGNT0",
         "status": {"currentStatus":          {
            "status": "IN_FULFILLMENT",
            "description": "UpdateLineItemStatus update 2018-02-27T22:17:07.861Z"
         }},
         "orderItemUrl": "https://api.blackhawknetwork.com/orderservices/v1/fulfillmentorder/GXJ9MNT4J87BZS7Q43BNTFZ498/orderitem/",
         "bhnOrderNumber": "2280596",
         "partnerOrderNumber": "ZS71GQ",
         "partnerOrderDate": "2018-02-27T21:14:50.000Z",
         "partnerOrderVersion": "V1.0",
         "partnerPONumber": "test1234",
         "totalOrderQuantity": 20,
         "totalOrderValue": 500
      },
            {
         "fulfillmentOrderId": "9LSYS01RLHPCQB4RCR6KN7WHFW",
         "partnerTenantId": "3LLBJ8PL6210JT55RRJM1F04L0",
         "status": {"currentStatus":          {
            "status": "IN_FULFILLMENT",
            "description": "UpdateLineItemStatus update 2018-02-27T22:16:53.890Z"
         }},
         "orderItemUrl": "https://api.blackhawknetwork.com/orderservices/v1/fulfillmentorder/9LSYS01RLHPCQB4RCR6KN7WHFW/orderitem/",
         "bhnOrderNumber": "2280597",
         "partnerOrderNumber": "SR4IDU",
         "partnerOrderDate": "2018-02-27T21:37:28.000Z",
         "partnerOrderVersion": "V1.0",
         "partnerPONumber": "test1234",
         "totalOrderQuantity": 20,
         "totalOrderValue": 500
      },
            {
         "fulfillmentOrderId": "G2JXRF51PTQ3G68RGYZH7QFB74",
         "partnerTenantId": "S2G7KJ2QTML2AFR2NDYRNAZJ1R",
         "errors": [         {
            "errorCode": "LINEITEMS_REJECTED",
            "description": "2 LineItem(s) are rejected",
            "dateTimeOfError": "2018-02-27T22:19:09.925Z"
         }],
         "status": {"currentStatus":          {
            "status": "REJECTED",
            "description": "Fulfillment Processor PopulateFulfillmentOrder update."
         }},
         "orderItemUrl": "https://api.blackhawknetwork.com/orderservices/v1/fulfillmentorder/G2JXRF51PTQ3G68RGYZH7QFB74/orderitem/",
         "bhnOrderNumber": "2280598",
         "partnerOrderNumber": "PMNNKT",
         "partnerOrderDate": "2018-02-27T22:21:47.000Z",
         "partnerOrderVersion": "V1.0",
         "partnerPONumber": "test1234",
         "totalOrderQuantity": 20,
         "totalOrderValue": 500
      },
            {
         "fulfillmentOrderId": "ALQZPKGKW1TQ234T6DFGZTX4K4",
         "partnerTenantId": "QFW3VMNPFZ209X2JQDV8K1QNHH",
         "status": {"currentStatus":          {
            "status": "IN_FULFILLMENT",
            "description": "UpdateLineItemStatus update 2018-02-27T22:24:17.363Z"
         }},
         "orderItemUrl": "https://api.blackhawknetwork.com/orderservices/v1/fulfillmentorder/ALQZPKGKW1TQ234T6DFGZTX4K4/orderitem/",
         "bhnOrderNumber": "2280599",
         "partnerOrderNumber": "J8CER1",
         "partnerOrderDate": "2018-02-27T22:27:02.000Z",
         "partnerOrderVersion": "V1.0",
         "partnerPONumber": "test1234",
         "totalOrderQuantity": 2,
         "totalOrderValue": 50
      }
   ],
   "_links":    {
      "next": {"href": "https://api.blackhawknetwork.com/orderservices/v1/fulfillmentorder/?startDate=2018-02-27T01%3A00%3A31.000Z&endDate=2018-02-28T01%3A00%3A31.000Z&size=4&page=1"},
      "first": {"href": "https://api.blackhawknetwork.com/orderservices/v1/fulfillmentorder/?startDate=2018-02-27T01%3A00%3A31.000Z&endDate=2018-02-28T01%3A00%3A31.000Z&size=4&page=0"},
      "last": {"href": "https://api.blackhawknetwork.com/orderservices/v1/fulfillmentorder/?startDate=2018-02-27T01%3A00%3A31.000Z&endDate=2018-02-28T01%3A00%3A31.000Z&size=4&page=3"},
      "self": {"href": "https://api.blackhawknetwork.com/orderservices/v1/fulfillmentorder/?startDate=2018-02-27T01%3A00%3A31.000Z&endDate=2018-02-28T01%3A00%3A31.000Z&size=4&page=0"}
   }
}

For all orders and order lineitems for a given TenantId/MID, and given bhnOrderNumber

GET https://api.blackhawknetwork.com/orderservices/v1/fulfillmentorder/2282234 HTTP/1.1
Accept-Encoding: gzip,deflate
tenantId: TPSPVTQZYH5D143RTS5JS22BKW
requestId: HPCDKMSV763K2VGHCKQQ09QSGM
merchantId: 60300004232
Host: apiqa.blackhawknetwork.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
{
   "createdDate": "2018-06-26T17:58:28.128Z",
   "createdBy": "TPSPVTQZYH5D143RTS5JS22BKW",
   "updatedDate": "2018-06-26T17:59:33.006Z",
   "updatedBy": "5ZD64KDYNP1KDZBGR26J3T1AMH",
   "entityId": "1BYF4PLL5WQR4KVY1YP0B886BR",
   "fulfillmentOrderId": "1BYF4PLL5WQR4KVY1YP0B886BR",
   "partnerTenantId": "TPSPVTQZYH5D143RTS5JS22BKW",
   "activationDate": "2018-03-20T05:00:00.000Z",
   "packagingType": "CARD_ON_CARRIER",
   "status": {"currentStatus":    {
      "status": "SHIPPED",
      "description": "UpdateLineItemStatus update 2018-06-26T17:59:33.005Z"
   }},
   "orderItemUrl": "https://api.blackhawknetwork.com/orderservices/v1/fulfillmentorder/1BYF4PLL5WQR4KVY1YP0B886BR/fulfillmentorderitems/",
   "billingInfo":    {
      "billingAddress":       {
         "attnTo": "You",
         "firstName": "John",
         "middleName": "R",
         "lastName": "Donovan",
         "company": "BHNetwork",
         "addressOne": "6220 Stoneridge Mall Rd",
         "addressTwo": "FL3",
         "addressThree": "Suite 50",
         "state": "CA",
         "zipCode": "94588",
         "city": "Pleasanton",
         "countryCode": "USA",
         "phoneNumber": "9254449999",
         "districtOrCounty": "Alameda"
      },
      "billingEmailAddress": "[email protected]",
      "billingPersonId": "test1324"
   },
   "otherInfo":    {
      "otherInfo01": "test1",
      "otherInfo02": "test2"
   },
   "fees":    [
            {
         "feeId": "0W9HWVCFL42VQ466CH099LDDMR",
         "type": "CUSTOMIZATION_FEE",
         "unitPrice": 0.0,
         "feeAmount": 0.0
      },
            {
         "feeId": "F4T56P1VBTKNCMGNGTWVV70V6R",
         "type": "PURCHASE_FEE",
         "unitPrice": 0.0,
         "feeAmount": 0.0
      },
            {
         "feeId": "Z5H3LPFHPG0QYP10C86SK5WFF8",
         "type": "SHIPPING_FEE",
         "unitPrice": 0.0,
         "feeAmount": 0.0
      }
   ],
   "bhnOrderNumber": "2282234",
   "partnerOrderNumber": "900070020",
   "partnerOrderDate": "2018-03-08T18:55:55.000Z",
   "partnerPONumber": "test1234",
   "partnerOrderVersion": "1",
   "loadValuePhase": "ON_DATE",
   "partnerCustomerIdentifier": "900070020",
   "totalOrderQuantity": 10,
   "totalOrderValue": 250.0
}

Did this page help you?