post
https://{URL}/v1/open-api/products
This method retrieves the prices and details of all available products accessible to a client based on their subscription status. This information includes the price value associated with each product.
A. Request Header
| Field | Format | Mandatory | Length | Example |
|---|---|---|---|---|
| Content-Type | string | Y | application/json | |
| Open-Api-Timestamp | yyyy-mm-dd'T'hh:mm:ss+07:00 | Y | 2024-02-06T11:59:19.000+07:00 | |
| Open-Api-Signature | Digital Signature | Y | 88 | T8LAFrzucHs5BKP2KeAxGmzRpaULJ/Y8hg M9UOCKDc/UprAH5cS51TSI3v8zIutxKQnly Ri1sa47ELh3uj6AuQ== |
B. Request Body
| Field | Type | Description | Required | Example |
|---|---|---|---|---|
| limit | int | The maximum number of items to be included per page | true | 10 |
| page | int | The requested page number in the paginated result set | true | 1 |
| search | array of objects | This object contains fields used for searching within the dataset | ||
field | string | The field to search within the dataset. Possible value for “field” in search array: “keyword” “categories” “enable” | false | “keyword” |
value | string | The value to search for within the specified search field. Possible value for “value” in search array: 1. for keyword: “axis” “indosat” “dana” etc 2. for categories: “data” “pulsa” “maxim” “plnprepaid” etc 3. for enable: “true” “false” | false | “axis” |
| sort | object | This object contains fields used for sorting the results | ||
field | string | The field by which to sort the results. Possible value for “field” in sort object: “name” “code” “category” “enable” “agent_price” “updated_at” “success_rate” “time_rate” | true | “agent_price” |
value | string | The sorting order for the results (ascending or descending). Possible value for “value” in sort object: “asc” “desc” | true | “desc” |
C. Sample Request
{
"limit": 10,
"page": 1,
"search": [
{
"field": "keyword",
"value": "axis"
},
{
"field": "enable",
"value": "true"
}
],
"sort": {
"field": "agent_price",
"value": "desc"
}
}
D. Response Body
| Field | Type | Description | Example |
|---|---|---|---|
| response_code | string | Contains the OpenAPI response code | “200042000” |
| response_message | string | Contains the value of OpenAPI response message | “Sukses” |
| meta | object | Contains the metadata related to user list’s pagination | |
total_data | string | The field to search within the dataset | 2 |
total_page | string | The value to search for within the specified search field | 1 |
current_page | int | The value of current page | 1 |
per_page | int | The number of items or rows to be displayed per page | 10 |
| data | array of objects | The list of objects containing user data | |
product_name | string | The value of product’s name | “(Transfer) Axis 20.000” |
product_detail | string | The value of product’s short detail | “Masa Aktif 10 Hari” |
product_category | string | The value of product’s category | “pulsa” |
agent_price | string | The value of price for agents in Rupiah | “19953” |
product_code | string | Unique identifier for the product | “RJBTAX20” |
enable | boleean | The flag to mark enabled / disabled product | true |
updated_at | string | The value of product’s last update | “2024-02-01T16:45:16Z” |
E. Sample Response
{
"response_code": "200042000",
"response_message": "Sukses",
"meta": {
"total_data": 2,
"total_page": 1,
"current_page": 1,
"per_page": 10
},
"data": [
{
"product_name": "(Transfer) Axis 20.000",
"product_detail": "Masa Aktif 10 Hari",
"product_category": "pulsa",
"agent_price": "19953",
"product_code": "RJBTAX20",
"enable": true,
"updated_at": "2024-02-01T16:45:16Z"
},
{
"product_name": "(Transfer) Axis 20.000",
"product_detail": "Masa Aktif 10 Hari",
"product_category": "pulsa",
"agent_price": "19938",
"product_code": "PRPTAX20",
"enable": true,
"updated_at": "2024-02-01T16:45:16Z"
}
]
}
Try It Here (Form)
To try the following endpoint, enter the example request data you want to use in the following form