Skip to main content

Vault API

The Vault API covers inventory Tradepost holds at a facility on your behalf: finding what you hold, recording which of your end users each unit belongs to, and shipping units back out.

Two records per unit

A vaulted unit is described by two rows, and the distinction matters for every call in this section.

What it isWhat it answers
Inventory line itemThe unit you ownWhat is it, and is it tradable?
Facility itemWhere that unit physically sitsWhere is it, and can it ship?

They are one-to-one: a line item has at most one placement. The line item is the stable identifier every operation takes; the placement describes where that unit currently is.

A unit is vaulted when it has a placement in state VAULTED. Nothing else means vaulted.

Placement states

StateMeaningOuttake allowed
VAULTEDHeld at the facilityYes
OUTTAKINGOuttake in flight, physically leavingNo
UNVAULTEDRemoved from the facilityNo
SOLDSold while at the facilityNo
TRANSFERREDMoved to another facilityNo
CONSIGNEDHeld, being sold on consignmentNo
LOANEDTemporarily loaned outNo
HELDHeld for authentication or verificationNo
DAMAGEDDamaged while at the facilityNo

Queries

QueryPurpose
listFacilityItemsPage your placements, filtered by facility, state or end user
getFacilityItemFetch one placement
getOuttakeRequestsList outtake requests still in progress
getOuttakeRequestOne outtake request in full, shipping side included
previewOuttakeFeesQuote a selection's outtake fees before requesting

Mutations

MutationPurpose
setFacilityItemExternalUsersRecord which of your end users each unit belongs to
requestFacilityLineItemOuttakeShip units back out, by line item or by end user
cancelOuttakeRequestCancel a request and return its units to the sellable pool

Every operation is scoped to your account. Ids you don't own, or that have no placement, are returned in unmatchedLineItemIds rather than failing the request.

Typical flow

listFacilityItems              what do I hold?

setFacilityItemExternalUsers whose is it?

requestFacilityLineItemOuttake ship it back

getOuttakeRequests where is it now?

Adding inventory

Coming soon.