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 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
Free-text search across category names.
Current page number.
Number of records per page.
Field to sort by, for example name. This one is required — a request without it comes back as "sortBy" is required.
Sorting direction: 1 = ascending, -1 = descending.
Value in
- 1
- -1
Only return categories created after this date. Example: 01-01-2024
Only return categories created before this date. Example: 31-12-2024
Response Body
application/json
application/json
application/json
application/json
application/json
Upload a product image POST
Uploads an image and returns the hosted URL for it. Upload the file first, then pass the returned URL as the product's image when you create or update it. Files must be under 5 MB.
Create a category POST
Creates a product category. A category only needs a name; products are filed into it afterwards with assignProductCategories or changeProductCategories.