Skip to main content
PUT
/
inventory
/
balances
Set on-hand stock
curl --request PUT \
  --url https://api.retrac.co/inventory/balances \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "itemId": "<string>",
  "locationId": "<string>",
  "onHandQty": 1,
  "note": "<string>"
}
'
{
  "id": "<string>",
  "itemId": "<string>",
  "locationId": "<string>",
  "onHandQty": 123,
  "item": {
    "id": "<string>",
    "sku": "<string>",
    "description": "<string>"
  },
  "location": {
    "id": "<string>",
    "name": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer API key from Settings → API Keys. Use restricted keys (prefix retrac_) with the minimum scopes required.

Query Parameters

workspaceId
string
required

The ID of the workspace.

Example:

"ws_cluuwcv0r..."

projectSlug
string
deprecated

The slug of the project. This field is deprecated – use workspaceId instead.

Body

application/json
itemId
string
required
Minimum string length: 1
locationId
string
required
Minimum string length: 1
onHandQty
integer
required
Required range: x >= 0
note
string | null
Maximum string length: 500

Response

The updated balance

id
string
required
itemId
string
required
locationId
string
required
onHandQty
integer
required
item
object
location
object