Query Products by Provisioning Type

Introduction

This API returns a list of summary information for the subset of products matching a given provisioning type.

Method

Service Name

Service Type

GET

productManagement/v1/products

Synchronous

URI: https://api.blackhawknetwork.com/productManagement/v1/products?provisioningType={PHYSICAL|DIGITAL}

Request Header Attributes

Note that all three of the header attributes are optional; however, if you want idempotency support then you should specify all three on every request.

Parameter

Description

Type

Required

requestorId

A value defined by the client application that can be used to uniquely identify that client application. If the client application does not specify a value, a globally unique identifier will be filled in automatically.

String

N

requestId

A value defined by the client application that can be used to uniquely identify that specific request from the client. This value should be set if the client application wants to take advantage of an idempotent operation on a service.

String

N

previousAttempts

The number of times this same request has been attempted unsuccessfully before. A value that is greater than zero will cause the service to view this request as a retry attempt and it will be treated idempotently.

Integer

N

In our example we will be sending the following values in the header:

Content-Type: application/json
requestorId: 1234
requestId: 2019-06-12T15:35:28-0500
previousAttempts: 0

Request Elements

Since this is a get request the request elements need to be sent in the URI itself. https://api.blackhawknetwork.com/productManagement/v1/products?provisioningType={PHYSICAL|DIGITAL}

The following parameters are available:

Parameter

Description

Type

Required

provisioningType

The Provisioning Type enumeration value.

String

Y

Provisioning Type

Enum Value

Description

PHYSICAL

Provisioning type for physical card

DIGITAL

Provisioning type for digital card

Response Elements

The following elements are returned in the response.

Name

Description

Type

productSummaryList

List of matching product summary entities.

List

total

Total count returned from the query.

Integer

Product Summary

Name

Description

Type

Max Length

Mandatory

entityId

A reference to the URI for the product.

URI

N

productName

The name of the product

String

255

Y

currency

The currency of the product

Currency

N

universalProductCode

The UPC of the product

String

50

Y

productLineId

The product line id of the product

Integer

Y

startDate

The date from which the product becomes active

Date

Y

endDate

The date at which the product becomes inactive

Date

N

locale

The two characters ISO 639-1 language code and 2 characters for the country code (separated by an underscore). eg: en_US

Locale

5

N

Sample Request and Response

Click on the tabs below to see a sample GET request and the sample response.

GET /productManagement/v1/products?provisioningType=PHYSICAL/1.1
requestorID: ZPZB7DDS20PNHALMZCBX14RVCM
Content-Type: application/json; charset=UTF-8
Accept: application/json; charset=UTF-8
Host: api.blackhawknetwork.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.2 (java 1.5)
HTTP/1.1 200 OK
Date: Fri, 06 Jul 2012 22:31:51 GMT
Content-Type: application/json;charset=UTF-8
Content-Length: 2027
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive

{
   "results":[
      {
         "entityId":"http://api.blackhawknetwork.com/productManagement/v1/product/AM3AN6ALP15AVT87BKPRVFVFS8",
         "productName":"Safeway Close Loop card",
         "productLineId":"https://api.blackhawknetwork.com/productManagement/v1/productLine/U94AN6ALP15AVT87BKPRVFVFS8",
         "currency":"USD",
         "universalProductCode":"123456",
         "startDate":"2012-06-27T19:14:45.000+0000",
         "endDate":"2022-06-27T19:14:45.000+0000"
      },
      {
         "entityId":"http://api.blackhawknetwork.com/productManagement/v1/product/TESAN6ALP15AVT87BKPRVFVFS8",
         "brandName":"Safeway Open Loop card",
         "productLineId":"https://api.blackhawknetwork.com/productManagement/v1/productLine/U94AN6ALP15AVT87BKPRVFVFS8",
         "currency":"USD",
         "universalProductCode":"987654",
         "startDate":"2012-09-27T19:14:45.000+0000",
         "endDate":"2018-09-27T19:14:45.000+0000"
      } 
   ],
   "total":2
}

Did this page help you?