Read list of Suppliers

GET /suppliers

Read the Supplier records visible to your account. The list includes Suppliers you added yourself (connect: false) and YBM Connect Suppliers (connect: true). Each record has a numeric id in your account. A connected Supplier also has a connect_account ID for its YBM Connect account; use the numeric id for account-specific routes. This endpoint requires Supplier read access.

Status codes

  • 200 on success

Response properties

  • list: The array of Supplier objects.

There is no pagination. If your API user is restricted to a division with limited Suppliers, the list contains only those Suppliers.

has_recommended_products: true may appear on list entries when a connected Supplier has a recommendation list for your customer number. It is omitted otherwise.

You can see all the Supplier properties on the GET /suppliers/:id page under "Response properties".

Example response

{
  "list": [
    {
      "id": 1655819191963,
      "name": "Test Supplier",
      "email": "test-supplier@example.com",
      "connect": false,
      "customer_id": "cus_123456",
      "phone": "076 7798775",
      "last_delivery": 1695113842637,
      "min_order_amount": 200000
    },
    {
      "id": 1655819192441,
      "name": "The Connect Supplier",
      "email": "connect-orders@example.com",
      "connect": true,
      "customer_id": "cus_789abc",
      "last_delivery": 1695114900700,
      "preferred_delivery_days": {
        "2": {
          "enabled": true
        },
        "5": {
          "enabled": false,
          "time": "17:00"
        }
      }
    },
    {
      "id": 1663253696138,
      "name": "The Other Supplier",
      "email": "test2-supplier@example.com",
      "connect": false,
      "archived": 1681392409254,
      "phone": "076 7798775",
      "last_delivery": 1695114958819
    }
  ]
}