Skip to main content

TrakRF API (v1)

Download OpenAPI specification:Download

TrakRF public REST API. See docs.trakrf.id/api for the customer-facing reference.

assets

List assets

Paginated assets list with natural-key filters, sort, and substring search

Authorizations:
APIKey
query Parameters
limit
integer
Default: 50

max 200

offset
integer
Default: 0

min 0

location
string

filter by location natural key (may repeat)

is_active
boolean

filter by active flag

type
string

filter by type

q
string

substring search (case-insensitive) on name, identifier, description, and active identifier values

sort
string

comma-separated; prefix '-' for DESC

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "limit": 50,
  • "offset": 0,
  • "total_count": 100
}

Create an asset

Create a new asset record, optionally with one or more tag identifiers (RFID, BLE, barcode). Returns the created asset with its assigned identifiers. The Location response header contains the canonical URL.

Authorizations:
APIKey
Request Body schema: application/json
required

Asset to create with optional identifiers

current_location
string [ 1 .. 255 ] characters
description
string <= 1024 characters
identifier
string <= 255 characters
Array of objects (github_com_trakrf_platform_backend_internal_models_shared.TagIdentifierRequest)
is_active
boolean
object
name
required
string [ 1 .. 255 ] characters
type
string
Enum: "asset" "person" "inventory"
valid_from
string <date-time>
valid_to
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "current_location": "WHS-01",
  • "description": "string",
  • "identifier": "string",
  • "identifiers": [
    ],
  • "is_active": true,
  • "metadata": { },
  • "name": "string",
  • "type": "asset",
  • "valid_from": "2025-01-01T00:00:00Z",
  • "valid_to": "2026-01-01T00:00:00Z"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete an asset

Delete an asset by its natural identifier. The asset is removed from all subsequent queries and its identifier becomes immediately available for reuse. Returns 204 on success, 404 if the asset does not exist or has already been deleted.

Authorizations:
APIKey
path Parameters
identifier
required
string

Asset identifier

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get asset by natural identifier

Retrieve an asset by its natural identifier. Returns 404 if the asset does not exist.

Authorizations:
APIKey
path Parameters
identifier
required
string

Asset identifier (natural key)

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update an asset

Update mutable fields on an existing asset. Only fields included in the request body are changed.

Authorizations:
APIKey
path Parameters
identifier
required
string

Asset identifier

Request Body schema: application/json
required

Fields to update

current_location
string [ 1 .. 255 ] characters
description
string <= 1024 characters
identifier
string [ 1 .. 255 ] characters
is_active
boolean
object
name
string [ 1 .. 255 ] characters
type
string
Enum: "asset" "person" "inventory"
valid_from
string <date-time>
valid_to
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "current_location": "WHS-01",
  • "description": "string",
  • "identifier": "string",
  • "is_active": true,
  • "metadata": { },
  • "name": "string",
  • "type": "asset",
  • "valid_from": "2025-01-01T00:00:00Z",
  • "valid_to": "2026-01-01T00:00:00Z"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Add an identifier to an asset

Attach a tag identifier (RFID EPC, BLE beacon ID, barcode, etc.) to an existing asset. The identifier must be unique within the organization.

Authorizations:
APIKey
path Parameters
identifier
required
string

Asset identifier

Request Body schema: application/json
required

Tag identifier to attach

type
string
Enum: "rfid" "ble" "barcode"
value
required
string [ 1 .. 255 ] characters

Responses

Request samples

Content type
application/json
{
  • "type": "rfid",
  • "value": "string"
}

Response samples

Content type
application/json
{ }

Remove an identifier from an asset

Detach a tag identifier from an asset by its identifier record ID.

Authorizations:
APIKey
path Parameters
identifier
required
string

Asset identifier

identifierId
required
integer

Identifier ID

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

reports

Asset movement history

Location history for an asset identified by its natural key.

Authorizations:
APIKey
path Parameters
identifier
required
string

Asset identifier (natural key)

query Parameters
limit
integer
Default: 50

max 200

offset
integer
Default: 0

min 0

from
string

RFC 3339 start timestamp

to
string

RFC 3339 end timestamp

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "limit": 50,
  • "offset": 0,
  • "total_count": 100
}

List current asset locations

Snapshot of each asset's most recent location, filterable by natural key.

Authorizations:
APIKey
query Parameters
limit
integer
Default: 50

max 200

offset
integer
Default: 0

min 0

location
string

filter by location identifier (may repeat)

q
string

substring search (case-insensitive) on asset name, identifier, and active identifier values

sort
string

comma-separated sort fields; prefix '-' for DESC

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "limit": 50,
  • "offset": 0,
  • "total_count": 100
}

inventory

Save inventory scans

Persist scanned RFID assets to the asset_scans hypertable

Authorizations:
APIKey
Request Body schema: application/json
required

Save request with location and asset IDs

asset_identifiers
Array of strings non-empty
location_identifier
string [ 1 .. 255 ] characters

Responses

Request samples

Content type
application/json
{
  • "asset_identifiers": [
    ],
  • "location_identifier": "WH-01"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

locations

List locations

Authorizations:
APIKey
query Parameters
limit
integer
Default: 50

max 200

offset
integer
Default: 0

min 0

parent
string

filter by parent identifier (may repeat)

is_active
boolean

filter by active flag

q
string

substring search (case-insensitive) on name, identifier, description, and active identifier values

sort
string

comma-separated, prefix '-' for DESC

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "limit": 50,
  • "offset": 0,
  • "total_count": 100
}

Create a location

Create a new location in the hierarchy, optionally with one or more tag identifiers. Set ParentLocationID to nest the location under an existing parent. The Location response header contains the canonical URL.

Authorizations:
APIKey
Request Body schema: application/json
required

Location to create with optional identifiers

description
string <= 1024 characters
identifier
required
string [ 1 .. 255 ] characters
Array of objects (github_com_trakrf_platform_backend_internal_models_shared.TagIdentifierRequest)
is_active
boolean
name
required
string [ 1 .. 255 ] characters
parent_identifier
string [ 1 .. 255 ] characters
valid_from
string <date-time>
valid_to
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "description": "Main warehouse location",
  • "identifier": "wh1",
  • "identifiers": [
    ],
  • "is_active": true,
  • "name": "Warehouse 1",
  • "parent_identifier": "wh1",
  • "valid_from": "2025-12-14T00:00:00Z",
  • "valid_to": "2026-12-14T00:00:00Z"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete location

Delete a location by its natural identifier. The location is removed from all subsequent queries and its identifier becomes immediately available for reuse. Returns 204 on success, 404 if the location does not exist or has already been deleted.

Authorizations:
APIKey
path Parameters
identifier
required
string

Location identifier

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Get location by natural identifier

Retrieve a location by its natural identifier. Returns 404 if the location does not exist.

Authorizations:
APIKey
path Parameters
identifier
required
string

Location identifier (natural key)

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update a location

Update mutable fields on an existing location. Only fields included in the request body are changed.

Authorizations:
APIKey
path Parameters
identifier
required
string

Location identifier

Request Body schema: application/json
required

Fields to update

description
string <= 1024 characters
identifier
string [ 1 .. 255 ] characters
is_active
boolean
name
string [ 1 .. 255 ] characters
parent_identifier
string [ 1 .. 255 ] characters
valid_from
string <date-time>
valid_to
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "description": "Updated description",
  • "identifier": "wh1",
  • "is_active": true,
  • "name": "Warehouse 1",
  • "parent_identifier": "wh1",
  • "valid_from": "2025-12-14T00:00:00Z",
  • "valid_to": "2026-12-14T00:00:00Z"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

List location ancestors

Return all ancestor locations from the root of the hierarchy down to the immediate parent of the specified location.

Authorizations:
APIKey
path Parameters
identifier
required
string

Location identifier

query Parameters
limit
integer
Default: 50

max 200

offset
integer
Default: 0

min 0

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "limit": 50,
  • "offset": 0,
  • "total_count": 100
}

List location children

Return the immediate child locations of the specified location (one level deep only).

Authorizations:
APIKey
path Parameters
identifier
required
string

Location identifier

query Parameters
limit
integer
Default: 50

max 200

offset
integer
Default: 0

min 0

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "limit": 50,
  • "offset": 0,
  • "total_count": 100
}

List location descendants

Return all descendant locations (children, grandchildren, etc.) beneath the specified location in the hierarchy.

Authorizations:
APIKey
path Parameters
identifier
required
string

Location identifier

query Parameters
limit
integer
Default: 50

max 200

offset
integer
Default: 0

min 0

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "limit": 50,
  • "offset": 0,
  • "total_count": 100
}

Add an identifier to a location

Attach a tag identifier (RFID EPC, BLE beacon ID, barcode, etc.) to an existing location. The identifier must be unique within the organization.

Authorizations:
APIKey
path Parameters
identifier
required
string

Location identifier

Request Body schema: application/json
required

Tag identifier to attach

type
string
Enum: "rfid" "ble" "barcode"
value
required
string [ 1 .. 255 ] characters

Responses

Request samples

Content type
application/json
{
  • "type": "rfid",
  • "value": "string"
}

Response samples

Content type
application/json
{ }

Remove an identifier from a location

Detach a tag identifier from a location by its identifier record ID.

Authorizations:
APIKey
path Parameters
identifier
required
string

Location identifier

identifierId
required
integer

Identifier ID

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

api-keys

List active API keys for an organization

Authorizations:
BearerAuthAPIKey
path Parameters
id
required
integer

Organization id

query Parameters
limit
integer
Default: 50

max 200

offset
integer
Default: 0

min 0

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "limit": 50,
  • "offset": 0,
  • "total_count": 100
}

Create a new API key for an organization

Mints an API-key JWT scoped to the target org. Accepts either session-admin or an API key with the keys:admin scope.

Authorizations:
BearerAuthAPIKey
path Parameters
id
required
integer

Organization id

Request Body schema: application/json
required

Key creation payload

expires_at
string <date-time>
name
required
string [ 1 .. 255 ] characters
scopes
required
Array of strings non-empty

Responses

Request samples

Content type
application/json
{
  • "expires_at": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "scopes": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Revoke an API key

Authorizations:
BearerAuthAPIKey
path Parameters
id
required
integer

Organization id

key_id
required
string

Either the integer surrogate id or the UUID jti

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

orgs

Get the org associated with the authenticated API key

Returns the organization scoped by the API key presented in Authorization. Intended as a lightweight health-check primitive for integrators verifying a key works end-to-end.

Authorizations:
APIKey

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}