KashierDevelopersKashier Developers

List categories

curl -X GET "https://test-api.kashier.io/v2/category?sortBy=string"
{  "data": [    {      "_id": "string",      "name": "string",      "description": "string",      "merchantId": "string",      "createdByUserId": "string",      "createdAt": "string",      "updatedAt": "string"    }  ],  "pagination": {    "total": 0,    "page": 0,    "limit": 0,    "pages": 0  }}

Retrieves the merchant's product categories, paginated. Filter by name with q, or narrow the list to categories created inside a date range.

Authorization

secretKey
Authorization<token>

Merchant secret key used to identify the merchant, obtained from Kashier's dashboard. Pass the raw secret key value in the Authorization header (NOT a "Bearer" token).

In: header

Query Parameters

q?string

Free-text search across category names.

page?integer

Current page number.

limit?integer

Number of records per page.

sortBy*string

Field to sort by, for example name. This one is required — a request without it comes back as "sortBy" is required.

sortType?integer

Sorting direction: 1 = ascending, -1 = descending.

Value in

  • 1
  • -1
from?string

Only return categories created after this date. Example: 01-01-2024

to?string

Only return categories created before this date. Example: 31-12-2024

Response Body

application/json

application/json

application/json

application/json

application/json

GET
/v2/category