Fetch Product List
Introduction
HitPoints has many categories of products. Merchant can only accept recharge by signed categories, so merchant may inquire the signed products.
API Url
sandbox:https://api.sandbox.hitpoints.com/v1/items
production:https://api.hitpoints.com/v1/items
Request Method
GET
Request Parameters
Parameters
Required
Type
Description
currency
Optional
string(3)
filter the product list with currency, default is to output product list of all currencies
random_key
Yes
string(16)
a random request string
Response Example
{
"data": {
"pin-value-fixed": [
{
"product_id": 4,
"product_name": "Happy Card",
"category_name": "20 Yuan",
"category_code": "happy-card-a",
"region": "BC",
"currency": "CNY",
"par_value": "20.00"
},
{
"product_id": 2,
"product_name": "Happy Card",
"category_name": "10 Yuan",
"category_code": "happy-card-a",
"region": "BC",
"currency": "CNY",
"par_value": "10.00"
}
],
"another-pin-group": [
{
"product_id": 3,
"product_name": "UnfixedPinCategory",
"category_name": "charge card",
"category_code": "unfixed-pin-category",
"region": "CN",
"currency": "CNY",
"par_value": "0.00"
}
]
},
"code": 200,
"message": "ok",
"success": true
}Response Field Description
Field
Description
code
The response code describe the request is success or not, code = 200 means success
message
The description message to the code
success
Describe the code with bool, when code = 200 , it's true, otherwise it's false
These fields below will response when code=200
Fields
Description
data
the product list, group by category
pin-value-fixed
the category key name,all products under the key have a fixed par value
Product Field description:
Field
Description
product_id
ID of product
product_name
Name of product
category_name
Category name of product
category_code
Category code of product
region
The available region(Country) code
par_value
The face value of the product
currency
The currency for the face value
Response Header:
Fields
Description
Sign
The signature from HitPoints server
Date-GMT
The Time String for HitPoints calculate response signature
Notice: if request failed,that the code!=200, or this is no data field in response body,there will be no Sign field in response header
Fail response example:
{
"code": 400100,
"message": "bad request parameter, parameter validate fail",
"success": false
}Last updated
Was this helpful?