POST /suppliers
Create a Supplier you manage yourself. The request needs a name and an email address; separate multiple addresses with commas. To connect with a Supplier using YBM Connect, request a connection instead.
Request properties
name: Supplier name. (required)email: Supplier contact email address. (required)phone: Contact phone number. (optional)website: Contact website. (optional)lang: Preferred language for email communication. (optional)customer_id: Your customer number at this Supplier. (optional)min_order_amount: Minimum order value in cents. (optional)last_delivery: Timestamp of the last delivery in milliseconds since the Unix epoch. (optional)preferred_delivery_days: Map keyed by weekday from0(Sunday) to6(Saturday). Each value has anenabledboolean and may have atimeinHH:MMformat. (optional)
connect and connect_account are set by YourBarMate and cannot be supplied in this request. Although the schema accepts last_delivery, set it only when importing an existing delivery history: it prevents later deletion through DELETE /suppliers/:id.
Status codes
200on success400on invalid request data
Response properties
The created Supplier object, including its numeric id.
Example request
{
"name": "Test Supplier",
"email": "test-supplier@example.com"
}
Example response
{
"id": 1655819191963,
"name": "Test Supplier",
"email": "test-supplier@example.com",
"connect": false
}