Suppliers

Add a catalog listing (screened for prompt injection)

POST
/suppliers/{id}/catalog

Add a catalog listing (screened for prompt injection). Requires the MANAGER role.

Authorization

__Host-qm_session<token>

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

In: cookie

Path Parameters

id*string

Resource id (UUID).

Formatuuid

Header Parameters

X-Requested-With*string

CSRF guard: must be quartermaster on every mutation.

Request Body

application/json

Fields for creating or updating a catalog listing.

Fields for creating or updating a catalog listing.

sku*string

Stock-keeping unit code.

Match^[A-Za-z0-9][\w.\-/]*$
Length1 <= length <= 64
title*string

Short title.

Length2 <= length <= 200
description?string

Free-text description.

Lengthlength <= 2000
Default""
category*string

Product category.

Value in

  • "food_packaging"
  • "cleaning_supplies"
  • "cooking_ingredients"
  • "beverages"
  • "kitchen_equipment"
  • "alcohol"
  • "gift_cards"
  • "services"
inventory_item_id?|

Id of the related inventory item.

Defaultnull
pack_quantity*integer

Units in one pack.

Range1 <= value <= 1000000
unit_price_minor*integer

Unit price, in minor units (cents).

Range1 <= value <= 100000000
in_stock?boolean

Whether the supplier currently has it in stock.

Defaulttrue
recurring?boolean

A recurring subscription rather than a one-off purchase.

Defaultfalse

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/suppliers/0f8fad5b-d9cb-469f-a165-70867728950e/catalog" \  -H "X-Requested-With: quartermaster" \  -H "Content-Type: application/json" \  -d '{    "sku": "BB-COLA-24",    "title": "Cola, 24 x 12 oz cans",    "description": "Classic cola",    "category": "beverages",    "inventory_item_id": null,    "pack_quantity": 24,    "unit_price_minor": 1499,    "in_stock": true,    "recurring": false  }'
{  "item": {    "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"  }}