Query Product Catalogs by Criteria

Introduction

This queries product catalog summary information according to the specified criteria and cursor view parameters. The criteria can either be product catalog summary or description, but not both.

Method

Service Name

Service Type

GET

productCatalogManagement/v1/productCatalogs

Synchronous

URI: https://api.blackhawknetwork.com/productCatalogManagement/v1/productCatalogs?{summary|details}.{attributeName}={attributeValue}&{first}={firstIndex}&{maximum}={maximumNumofEntries}&{sortKey}={summary}.{attributeName}&{ascending}={true|false}&{exactMatch}={true|false}&{caseSensitive}={true|false}

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.

Name

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/productCatalogManagement/v1/productCatalogs?{summary|details}.{attributeName}={attributeValue}&{first}={firstIndex}&{maximum}={maximumNumofEntries}&{sortKey}={summary}.{attributeName}&{ascending}={true|false}&{exactMatch}={true|false}&{caseSensitive}={true|false}

The following parameters are available:

Name

Description

Type

Required

first

The index of the first entity in this cursor view of the list.

The default first index is zero referring to the first entity in the full list.

String

N

maximum

The maximum number of entities to be shown in this cursor view of the list. The default value is 10.

String

N

sortKey

The name of the attribute that should be used for ordering the results. If this value is not provided, then there is no explicit sorting of the results.

Only attributes in product catalog summary can be used for ordering the results.

String

N

ascending

Whether or not the results are sorted in ascending order. The valid values are true or false. The default value is true.

String

N

exactMatch

Flag to exactly match the provided supported features.

boolean

N

caseSensitive

Flag to exactly match the case of the supported features.

boolean

N

Response Elements

The following elements are returned in the response.

Name

Description

Type

productCatalogSummaryList

List of matching product catalog summary entities.

List

total

The total number of entities existing in the system matching the given criteria.

Integer

parameters

The request elements specified in the request or their default values if none specified.

List

Product Catalog Summary List

Name

Description

Type

Max Length

Mandatory

version

The version of product catalog

Integer

Y

name

The name of the product catalog

String

255

Y

Sample Request and Response

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

GET /productCatalogManagement/v1/productCatalogs?summary.name=WRAPP+Product+Catalog&exactMatch=true&caseSensitive=false&first=0&maximum=3 HTTP/1.1
requestorId: CLMMVC5PQRRYHGZCG6LX47Z6T8
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
Content-Type: application/json
Date: Tue, 09 Oct 2012 20:52:09 GMT
Content-Length: 155
Server: Jetty(8.1.2.v20120308)
{
   "results":[
      {
         "entityId":"http://api.blackhawknetwork.com/productCatalogManagement/v1/productCatalog/BM3TNCWAKXD6ADBS7RNPLK7MNH",
         "name":"WRAPP Product Catalog",
         "version":1
      }
   ],
   "total":1,
   "parameters":{
      "first":0,
      "maximum":3,
      "ascending":true
   }
}

Did this page help you?