GET /suppliers/:id/categories
Read the Product groups of a YBM Connect Supplier connected to your account. Use the numeric Supplier id from GET /suppliers. This route does not work for a Supplier you added yourself or a pending or rejected connection. To look before connecting, use the pre-connection preview.
Query parameters
expand=counts: Includeproduct_countfor each Product group. (optional)status=ACTIVEorstatus=INACTIVE: Count only products with that status whenexpand=countsis set. It does not filter Product groups. (optional)
Response
categories contains objects with id and name, plus product_count when requested. Use a category id to filter the connected products.
Status codes
200on success.400for invalid query parameters or a Supplier without an accepted YBM Connect connection.404if the Supplier record or its Product groups cannot be found.
Example response
{
"categories": [{ "id": "cat_example", "name": "Drinks" }]
}