Skip to content
トレカクラウド
Esc
↑↓navigate↵open⌘Jpreview

Read inventory changes

Returns changes to sites, storage locations and units after the cursor. data is the current value at read time, so the receiver only upserts by id. Without a cursor it starts from the beginning, which syncs everything. Nothing is deleted: deactivation shows in isActive, and a unit leaving stock shows in status.

Keep reading with nextCursor while hasMore is true.

GET/inventory/changes
Authorization
AuthorizationOAuth2 access token · headerrequired

Authorization code flow (PKCE S256 required). Send resource=https://api.toreca-cloud.com/partner/v1 with the authorization, token and refresh requests. Access tokens last 15 minutes; refresh tokens last 90 days and rotate on every refresh.

Scopes:inventory:read
Query parameters
cursorstring

The previous nextCursor. Treat it as opaque.

max length 64
limitinteger
min 1 · max 500 · default: 200
Responses
200

The changes

changesChange[]required
Show properties
Array of Change
typestringrequired
Allowed:sitelocationitem
idstring<uuid>required
dataobjectrequired

The site, storage location or unit as of read time. A unit has its asset number, status, location, card, grade, condition tags, photos, acquisition amount and more.

nextCursorstringrequired
hasMorebooleanrequired
400

invalid_request or invalid_cursor

errorstringrequired

The error code

scopestring

With insufficient_scope, the missing scope

401

invalid_token: the token is missing, expired, or for another resource.

errorstringrequired

The error code

scopestring

With insufficient_scope, the missing scope

403

One of insufficient_scope, connection_revoked, client_disabled or forbidden.

errorstringrequired

The error code

scopestring

With insufficient_scope, the missing scope

Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.toreca-cloud.com/partner/v1/inventory/changes' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Response
{
  "changes": [
    {
      "type": "site",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "data": {}
    }
  ],
  "nextCursor": "string",
  "hasMore": true
}