Query Product Lines by Criteria
Introduction
This API returns a list of elements from the product line summary that includes a subset of the product lines that meet the specified criteria and cursor view parameters.
Method | Service Name | Service Type |
---|---|---|
GET | productManagement/v1/productLines | Synchronous |
-
Post-Production URI:
https://api.certification.blackhawknetwork.com/productManagement/v1/productLines?{first}={firstIndex}&{maximum}={maximumNumofEntries}&{sortKey}=(summary|details).{attributeName}&{ascending}={true|false}&{exactMatch}={true|false}&{caseSensitive}={true|false}&{lt|le|gt|ge|eq|ne}({summary|details}.{attributeName},{attributeValue})
-
Production URI:
https://api.blackhawknetwork.com/productManagement/v1/productLines?{first}={firstIndex}&{maximum}={maximumNumofEntries}&{sortKey}=(summary|details).{attributeName}&{ascending}={true|false}&{exactMatch}={true|false}&{caseSensitive}={true|false}&{lt|le|gt|ge|eq|ne}({summary|details}.{attributeName},{attributeValue})
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/productLines?{first}={firstIndex}&{maximum}={maximumNumofEntries}&{sortKey}=(summary|details).{attributeName}&{ascending}={true|false}&{exactMatch}={true|false}&{caseSensitive}={true|false}&{lt|le|gt|ge|eq|ne}({summary|details}.{attributeName},{attributeValue})
The following parameters are available:
Parameter | 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. | Integer String | N |
maximum | The maximum number of entities to be shown in this cursor view of the list. The default value is 10. | Integer 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 line summary can be used for for ordering the results. | String | N |
ascending | Whether or not the results are sorted in ascending order. The default value is true. | Boolean 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 |
---|---|---|
productLineSummaryList | List of matching product line summary entities. | List |
total | Total count returned from the query. | Integer |
parameters | The Request Elements specified in the request or their default values if none specified. | List |
Product Line Summary
Name | Description | Type | Max Length | Mandatory |
---|---|---|---|---|
entityId | A reference to the URI for the product line. | URI | 255 | N |
brandName | The name of the brand. | String | 255 | Y |
brandLogoImage | The URI of the logo image of the brand. | String | 255 | N |
productLineName | Name of the product line. | String | Y | |
brandId | ID of the brand. | String | 26 | N |
productLineStatus | The status of the product line. The possible values are in the Product Line Status enumeration. | Enum | N | |
accountType | The account type of the product line. The possible values are in the Account Type enumeration. | Enum | N | |
paymentNetworkType | The payment network type of the product line. The possible values are in the Payment Network Type enumeration. | Enum | N | |
startDate | The date from which the product line becomes active. | Date | Y | |
endDate | The date at which the product line becomes inactive. | Date | N | |
locale | The two-character ISO 639-1 language code followed by the two-character country code, separated by an underscore, e.g., en_US. | Locale | 5 | N |
Product Line Status
Enum Value | Description |
---|---|
DRAFT | New product line in draft mode. |
ACTIVATED | Product line in active mode. |
SUSPENDED | Product line in suspended mode. |
Account Type
Enum Value | Description |
---|---|
CREDIT_CARD | Credit card |
GIFT_CARD | Gift card |
LOYALTY_CARD | Loyalty card |
PHONE_CARD | Phone card |
Payment Network Type
Enum Value | Description |
---|---|
VISA | Visa |
MASTERCARD | Master Card |
DISCOVER | Discover |
AMEX | American Express |
Sample Request and Response
Click on the tabs below to see a sample GET request and the sample response.
GET /productManagement/v1/productLines?first=0&maximum=10&sortKey=summary.brandName&ascending=true&exactMatch=false&caseSensitive=false&eq(summary.productLineStatus,ACTIVATED)&ge(details.createdTimestamp,2013-06-01T21:12:00.000%2B0000)&le(details.createdTimestamp,2020-06-02T21:12:00.000%2B0000) HTTP/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
Server: Apache-Coyote/1.1
Cache-Control: max-age=3600
Date: Tue, 09 Jul 2013 18:41:44 GMT
Content-Type: application/json
Content-Length: 5673
{
"results":[
{
"entityId":"https://api.blackhawknetwork.com/productManagement/v1/productLine/LRWMS0GDZSJ6PAD180DC937T2M",
"productLineName":"Retailer_A",
"brandName":"Retailer_A",
"brandCode":"",
"brandLogoImage":"https://content.giftcardmall.com/gcmimages//MANUFACTURER/icon/GOWALLET_METADATA/380V4646.0.PNG",
"productLineStatus":"ACTIVATED",
"accountType":"GIFT_CARD",
"startDate":"2012-09-17T22:54:14.987+0000",
"endDate":"2023-02-19T22:59:41.280+0000",
"locale":"en_US"
},
{
"entityId":"https://api.blackhawknetwork.com/productManagement/v1/productLine/NJ8ZXBVPDAKG5H378JFG8QLLY8",
"productLineName":"Retailer_B",
"brandName":"Retailer_B",
"productLineStatus":"ACTIVATED",
"accountType":"GIFT_CARD",
"startDate":"2008-09-17T20:16:53.793+0000",
"endDate":"2023-03-12T01:59:00.000+0000",
"locale":"en_US"
}
],
"total":2,
"parameters":{
"first":0,
"maximum":10,
"sortKey":"summary.brandName",
"ascending":true
}
}
Updated 7 months ago