Read a Supplier

GET /suppliers/:id

Read one Supplier record from your account. Its numeric id comes from GET /suppliers. This is your account's record, not the Supplier's own YBM Connect profile. Updating or deleting it does not change data maintained by the Supplier in YBM Connect.

Status codes

  • 200 on success
  • 400 if the Supplier ID is not numeric
  • 404 on supplier not found

Response properties

  • id: The created timestamp of the supplier.
  • name: The assigned name.
  • connect: Boolean, true for YBM Connect suppliers.
  • connect_account: ID of the supplier in YBM Connect. (optional)
  • email: The contact email(s) for the supplier. Multiple email addresses can be specified separated by commas. (optional)
  • phone: The contact phone number for the supplier. (optional)
  • website: The contact website for the supplier. (optional)
  • lang: The preferred language for email communication. (optional)
  • min_order_amount: A total amount in cents that is required in the shop when ordering from this supplier. (optional)
  • customer_id: The supplier's reference ID for the account. (optional)
  • last_delivery: Timestamp for the last delivery made by this supplier for the account. (optional)
  • preferred_delivery_days: Map representing the preferred delivery schedule. The keys are the days indexed from 0 (Sunday) to 6 (Saturday) and the values are objects: (optional)
    • enabled: Boolean representing if the day is enabled for delivery.
    • time: Time in "HH:MM" string format, representing preferred delivery time. (optional)
  • archived: Timestamp for when the Supplier was archived. (optional)
  • request_status: "PENDING", "ACCEPTED" or "REJECTED" for a YBM Connect connection request. (optional)
  • suspended: Timestamp indicating a suspended Supplier relationship. (optional)

For connected Suppliers without a stored contact email, the API may show an email from their YBM Connect account. customer_id and suspended can also reflect division-specific settings, so their returned values may differ by API user's division.

Example response

{
  "id": 1655819191963,
  "name": "Test Supplier",
  "email": "test-supplier@example.com, cc@example.com",
  "connect": false,
  "customer_id": "cus_123456",
  "phone": "076 7798775",
  "last_delivery": 1695113842637
}