Skip to main content
POST
Record a uniform delivery or adjustment

Authorizations

Authorization
string
header
required

A group API key, sent as Authorization: Bearer sw_live_…. Keys from staging and the demo start sw_test_ instead. A group admin creates keys in Settings → Integrations → API keys.

Scopes

uniform:write

Headers

Idempotency-Key
string
required

Unique per stock movement: any printable text up to 255 characters. A retry with the same key and body within 24 hours answers with the first stock movement instead of making another. Required.

Required string length: 1 - 255

Body

application/json

A field not listed here is refused with a 400.

stockId
string<uuid>
required

The stock line: one size in one store, from GET /uniform-items.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
type
enum<string>
required
Available options:
delivery,
adjustment
quantity
integer
required

Units. A delivery adds them, so it must be above 0. An adjustment adds a positive number and takes away a negative one. Stock never goes below 0: a change that would is refused with 409 insufficient_stock.

Required range: -100000 <= x <= 100000
reason
string
required

Why, in a few words: "Delivery from Scout Store", "Stock count". Shown in Scoutworks. Free text never leaves through the API, so it is not returned.

Required string length: 1 - 500
{key}
any

Response

The stock movement an earlier request with the same Idempotency-Key made.

data
object
required