The Logitory API lets another system, such as an ERP, accounting, purchasing or field service tool, read an account's parts, warehouses, vehicles, stock and transfer history, and record stock movements: receipts, transfers, work orders, RMAs and adjustments. Every request is limited to the one Logitory account its key belongs to. Questions: support@logitory.io.
Authentication
An Administrator creates a key in Settings → Integrations. Give it a name that says which system will use it, and choose its access:
- Read only: the
GETendpoints. -
Read and write: also
POST /movements. Movements it records are logged as made by the Administrator who created the key. If that person is no longer an Administrator, the key stops recording movements, so create a new one.
The key is shown once; Logitory keeps only its first characters and a one-way hash. Revoking a key stops it working immediately. Send the key on every request:
Authorization: Bearer lgt_<64 characters>
x-api-key: lgt_… is also accepted. Call the API from your server, never from a web page:
anyone who sees a key has its access to the account.
AI assistants can skip the key: the MCP server supports OAuth sign-in. An Administrator signs in to Logitory, chooses read only or read and write, and approves the connection.
Base URL
Settings → Integrations shows your API address, which ends in /functions/v1/api/v1. The
paths below are relative to it.
Reading data
All reads are GET. Lists answer { "data": [ … ], "next_cursor": "…" | null }.
| Endpoint | Returns |
|---|---|
/account | id, account_code, name (one object, not a list) |
/parts | id, part_number, description, manufacturer, model_number, barcode, low_stock_threshold, vehicle_low_stock_threshold, created_at, updated_at |
/warehouses | id, number, nickname, street_address, is_main, created_at, updated_at |
/vehicles | id, fleet_number, vehicle_type, make_model, driver_name, home_warehouse_id, assigned_user_id, created_at, updated_at |
/warehouses/{id}/stock | Stock at one warehouse: warehouse_id, part_id, quantity, updated_at |
/vehicles/{id}/stock | Stock on one vehicle: vehicle_id, part_id, quantity, updated_at |
/movements | The transfer history, oldest first: id, kind, occurred_at, created_at, the from/to warehouse or vehicle ids and labels, work_order_number, rma_number, tracking_number, reference, notes, total_quantity, and lines: [{ part_id, part_number, description, quantity }] |
A movement's kind is one of the following:
warehouse_to_vehicle,vehicle_to_warehouse,warehouse_to_warehouse,vehicle_to_vehicle: transfers between locations.supplier_receipt: stock received into a warehouse.work_order: parts used from a vehicle on a job.rma: a return. It doesn't change stock.adjustment: a stock correction.
Logs that an Administrator deleted aren't returned. A stock request for a warehouse or vehicle that isn't on your account returns an empty list.
Paging
limit: 1 to 1000, default 100.cursor: the previous answer'snext_cursor, to get the next page. Whennext_cursorisnull, there are no more rows.- A full page always comes with a
next_cursor, so the final page can be empty.
Pages are in a fixed order (by id; movements by created_at, then id), so rows are neither skipped nor repeated.
Keeping in sync
/movements?since=2026-11-01T00:00:00Z returns movements created at or after that time. To follow new activity:
- Remember the
created_atof the last movement you processed. - Ask again with
sinceset to it, paging through the answer. - Ignore any
idyou've already processed: the boundary movement comes back again.
Recording a stock movement
POST /movements with a read and write key, a JSON body, and an Idempotency-Key
header. Stock changes exactly as when someone logs the same movement in the app, and the same checks
apply.
{
"kind": "supplier_receipt",
"to_warehouse_id": "<id from /warehouses>",
"lines": [{ "part_id": "<id from /parts>", "quantity": 12 }],
"reference": "PO-4471",
"notes": "Received from Acme"
}
| Field | Description |
|---|---|
kind | One of the kinds above |
lines | 1 to 5000 of { part_id, quantity }, where quantity is a whole number from 1 to 1000000. An RMA line may give part_number instead of part_id for a part that isn't in the catalog. |
from_warehouse_id, from_vehicle_id, to_warehouse_id, to_vehicle_id | Ids from /warehouses and /vehicles; see below |
work_order_number | Required for work_order |
rma_number | Required for rma; tracking_number is optional |
reference, notes | Optional text |
Which locations each kind takes:
warehouse_to_vehicle: from a warehouse, to a vehicle.vehicle_to_warehouse: from a vehicle, to a warehouse.warehouse_to_warehouse,vehicle_to_vehicle: from one, to a different one.supplier_receipt: to a warehouse only.work_order: from a vehicle only.rma: from a warehouse or a vehicle.adjustment: exactly one location;to_…adds stock andfrom_…removes it.
The answer is the movement, in the same shape as GET /movements, with status 201.
Retries
Send a unique Idempotency-Key with each movement: 1 to 255 characters, such as a UUID or
your own order number. If a request times out, send it again with the same key. If the movement was
already recorded, you get that movement back with status 200 and
Idempotent-Replayed: true, and stock doesn't change twice. Reusing a key for a different
movement returns the first movement and records nothing.
Adding and editing parts
Both need a read and write key and answer the part, in the same shape as GET /parts.
POST /parts adds a part (status 201):
{ "part_number": "ALT-28SI", "description": "Heavy-Duty Alternator", "manufacturer": "Delco Remy", "model_number": "28SI", "barcode": "084729000123", "low_stock_threshold": 4 }
PATCH /parts/{id} changes only the fields you send (status 200),
for example { "description": "Alternator 24V" }. Sending part_number renames the
part; its stock and history stay with it.
| Field | Description |
|---|---|
part_number | Required to create. Up to 100 characters, unique in the account (ignoring case) |
description | Up to 1000 characters |
manufacturer, model_number | Up to 200 characters each |
barcode | Up to 100 characters, unique in the account; all-digit codes match without leading zeros, as in the app. "" for none |
low_stock_threshold, vehicle_low_stock_threshold | Whole numbers 0 or more (new parts default to 10 and 3) |
- A new part has no stock: record a
supplier_receiptoradjustmentwithPOST /movementsto stock it.quantityisn't accepted here, so stock always changes with a history entry. - A P/N or barcode already in the account is refused (
409 part_exists) with the existing part and its id in the message, so a retried create never makes a duplicate. - Parts can't be deleted through the API.
MCP server (AI assistants)
The same API is also an MCP server at
https://logitory.io/mcp, so AI assistants such as Claude, Cursor or your own agents can look up
parts and stock and record movements. Connect it by signing in (OAuth), for example as a claude.ai custom
connector, or with an API key in a header. Rate limits and account scope are those of the REST API.
| Tool | Does |
|---|---|
get_account | GET /account |
list_parts, list_warehouses, list_vehicles | The lists, with limit and cursor |
get_warehouse_stock, get_vehicle_stock | Stock at one warehouse or vehicle |
list_movements | The movement history, with since |
record_movement | POST /movements; idempotency_key is a required argument |
create_part, update_part | POST /parts, PATCH /parts/{id} (part_id plus the fields to change) |
Sign in with OAuth (no API key)
Any MCP client that supports OAuth only needs the address https://logitory.io/mcp. When it
connects, your browser opens Logitory: sign in as an Administrator, choose Read only or
Read and write, and click Allow.
claude.ai:
- Open Settings → Connectors → Add custom connector.
- Enter
https://logitory.io/mcpand click Connect, then sign in and allow as above.
Claude Code:
claude mcp add --scope user --transport http logitory https://logitory.io/mcp
- Start Claude Code, type
/mcp, picklogitoryand choose Authenticate. - Sign in and allow in the browser window that opens, then return to Claude Code.
Each sign-in appears in Settings → Integrations as a connected app; revoke it there to disconnect. Its access token lasts an hour and refreshes itself for up to 90 days of use, so you won't be asked again while it's in use.
With an API key
Claude Code:
claude mcp add --transport http logitory https://logitory.io/mcp --header "Authorization: Bearer lgt_…"
Clients configured with JSON (Cursor and others that take a URL and headers):
{ "mcpServers": { "logitory": { "url": "https://logitory.io/mcp", "headers": { "Authorization": "Bearer lgt_…" } } } }
Clients that only start local servers can connect through
npx mcp-remote https://logitory.io/mcp --header "Authorization: Bearer lgt_…". The server is
stateless Streamable HTTP: one JSON-RPC message per POST, answered as JSON. API errors come
back to the assistant as tool errors it can read; a missing or expired token is an HTTP 401 that points to
the sign-in metadata.
OAuth details
- OAuth 2.1 with PKCE (S256), public clients and dynamic client registration.
- Discovery:
https://logitory.io/.well-known/oauth-protected-resource/mcpandhttps://logitory.io/.well-known/oauth-authorization-server. - Endpoints:
/oauth/register,/oauth/authorize,/oauth/token. Redirect URIs must be https, or http on localhost. - Scopes:
readandwrite. Access tokens last an hour; refresh tokens rotate and last 90 days.
Errors
Errors answer { "error": { "code": "…", "message": "…" } }.
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_limit, invalid_cursor, invalid_since, invalid_id, invalid_parameter | Fix the request |
| 400 | invalid_json, invalid_movement, invalid_idempotency_key, invalid_part | Fix the movement or part; the message says what's wrong |
| 401 | unauthorized | Missing, unknown or revoked key |
| 403 | account_closed | The account is closed until its invoice is paid |
| 403 | forbidden | The key is read-only, or its Administrator no longer is one |
| 404 | not_found | No such endpoint, or a part, warehouse or vehicle that isn't on the account |
| 405 | method_not_allowed | POST is only for /movements and /parts; PATCH only for /parts/{id} |
| 409 | insufficient_stock | The source doesn't hold enough of a part; nothing was recorded |
| 409 | part_exists | That P/N or barcode is already on a part (the message names it) |
| 413 | too_large | The body is over 1 MB |
| 429 | rate_limited | More than 120 requests a minute with this key; wait for Retry-After seconds |
| 500 | internal_error | Contact support@logitory.io with the ref in the message |
Examples
curl -H "Authorization: Bearer $LOGITORY_API_KEY" "$LOGITORY_API/parts?limit=1000"
curl -H "Authorization: Bearer $LOGITORY_API_KEY" "$LOGITORY_API/parts?limit=1000&cursor=<next_cursor>"
curl -H "Authorization: Bearer $LOGITORY_API_KEY" "$LOGITORY_API/movements?since=2026-11-01T00:00:00Z"
curl -X POST "$LOGITORY_API/movements" \
-H "Authorization: Bearer $LOGITORY_API_KEY" \
-H "Idempotency-Key: PO-4471" \
-H "Content-Type: application/json" \
-d '{"kind":"supplier_receipt","to_warehouse_id":"<id>","lines":[{"part_id":"<id>","quantity":12}],"reference":"PO-4471"}'