Suppliers

Add a supplier (owners approve it in the Spend Mandate)

POST
/suppliers

Add a supplier (owners approve it in the Spend Mandate). Requires the MANAGER role.

Authorization

__Host-qm_session<token>

Session cookie set by sign-in on HTTPS deployments (the hosted demo).

In: cookie

Header Parameters

X-Requested-With*string

CSRF guard: must be quartermaster on every mutation.

Request Body

application/json

Fields for creating or updating a supplier.

Fields for creating or updating a supplier.

name*string

Display name.

Length2 <= length <= 120
website?|

Supplier website.

Defaultnull
description?|

Free-text description.

Defaultnull
lead_time_days*integer

Days from order to delivery.

Range0 <= value <= 60
tax_rate_bps*integer

Tax rate, in basis points (825 = 8.25%).

Range0 <= value <= 3000
fee_terms?array<>

Published fees and shipping terms; any other fee in a quote is unauthorised.

Itemsitems <= 10
Default[]
active?boolean

Whether the record is in use.

Defaulttrue
checkout_eligible?boolean

Whether orders from this supplier can be paid through PayPal checkout.

Defaulttrue

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/suppliers" \  -H "X-Requested-With: quartermaster" \  -H "Content-Type: application/json" \  -d '{    "name": "Bayside Beverages",    "website": "https://bayside.example.com",    "description": "Local drinks distributor",    "lead_time_days": 2,    "tax_rate_bps": 825,    "fee_terms": [      {        "code": "SHIP_STD",        "label": "Delivery",        "kind": "SHIPPING",        "amount_minor": 900,        "waived_over_minor": 15000      }    ],    "active": true,    "checkout_eligible": true  }'
{  "supplier": {    "id": "string",    "name": "string",    "approved": true,    "active": true,    "checkout_eligible": true,    "lead_time_days": 0,    "tax_rate_bps": 0,    "fee_terms": [      {        "code": "string",        "label": "string",        "kind": "SHIPPING",        "amount_minor": 0,        "waived_over_minor": 0      }    ],    "website": "string",    "description": "string",    "quarantined": true,    "catalog_items": 0,    "data_source": "CHANNEL3_MARKET",    "catalog": [      {        "id": "string",        "supplier_id": "string",        "sku": "string",        "title": "string",        "description": "string",        "category": "food_packaging",        "inventory_item_id": "string",        "pack_quantity": 0,        "unit_price_minor": 0,        "currency": "string",        "in_stock": true,        "recurring": true,        "quarantined": true,        "quarantine_reason": "string",        "updated_at": "string"      }    ],    "created_at": "string"  }}