Read Connected Product groups

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: Include product_count for each Product group. (optional)
  • status=ACTIVE or status=INACTIVE: Count only products with that status when expand=counts is 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

  • 200 on success.
  • 400 for invalid query parameters or a Supplier without an accepted YBM Connect connection.
  • 404 if the Supplier record or its Product groups cannot be found.

Example response

{
  "categories": [{ "id": "cat_example", "name": "Drinks" }]
}