Assign or unassign categories in bulk
curl -X PUT "https://test-api.kashier.io/v2/products/assign/categories" \ -H "Content-Type: application/json" \ -d '{ "categoryIds": [ "507f1f77bcf86cd799439011" ], "productIds": [ "507f1f77bcf86cd799439012", "507f1f77bcf86cd799439013" ], "operation": "assign" }'{ "body": { "updatedCount": 0, "productIds": [ "string" ] }, "message": "string"}Adds categories to, or removes them from, a set of products in one call. operation picks the direction, so the same endpoint covers both filing products into a new category and clearing them out of an old one.
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
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
Get a product's timeline GET
Retrieves the audit trail for a product — every create and edit, which fields changed, and which dashboard user made the change.
Replace the categories on products PUT
Replaces the full category set on the given products with categoryIds, rather than adding to it. Use this when your ERP is the source of truth and you want Kashier to match it exactly.