Starkode API

The Starkode API lets you integrate your own systems with the data your team manages in the Starkode apps: inventory items, customers, vendors, categories and invoices.

The API is organized around REST. It has predictable resource-oriented URLs, accepts JSON request bodies, returns JSON responses, and uses standard HTTP verbs and response codes.

Base URL

All requests are served over HTTPS from:

https://api.starkode.com/v1

Versioning

The version is part of the path (/v1). Backwards-incompatible changes will only ever ship under a new version prefix.

QUICK START
curl https://api.starkode.com/v1/items?limit=2 \
  -H "X-Api-Key: YOUR_API_KEY"
RESPONSE
{
  "status": "success",
  "meta": { "total": 2, "next": "71M0f72mquB" },
  "data": [ /* ... */ ]
}

Authentication

The API supports two authentication methods. Both identify your company account and carry per-method permissions (read, create, update, delete) configured for your key.

1. API key (server-to-server)

Send your API key on every request in the X-Api-Key header. Keys are 64-character strings issued by Starkode. Keep them secret: do not embed them in client-side code or mobile apps.

2. Bearer token (short-lived)

Exchange your API key and secret for a token that expires after 3600 seconds. Send it in the Authorization: Bearer header. Use this when you prefer not to keep the long-lived key in the requesting process.

EndpointDescription
POST /v1/token Returns access_token and expires_in. Requires the X-Api-Key header and a JSON body with your secret.
Requests without valid credentials return 401 Unauthorized. Requests with a method your key does not allow return 403 Forbidden.
API KEY
curl https://api.starkode.com/v1/items \
  -H "X-Api-Key: YOUR_API_KEY"
GET A BEARER TOKEN
curl -X POST https://api.starkode.com/v1/token \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"secret": "YOUR_API_SECRET"}'
RESPONSE
{
  "status": "success",
  "data": {
    "token_type": "Bearer",
    "access_token": "8vlTwki8D-yBHop5TO",
    "expires_in": 3600
  }
}
USE THE TOKEN
curl https://api.starkode.com/v1/items \
  -H "Authorization: Bearer 8vlTwki8D-yBHop5TO"

Errors

The API uses conventional HTTP response codes. Every response carries a JSON envelope with status set to success or error; errors add a stable machine-readable code and a human-readable message.

HTTPMeaning
200 / 201Request succeeded / resource created.
400Invalid JSON, unknown attribute or filter, missing required attribute.
401Missing, invalid or expired credentials.
403The method is not allowed for your key or this resource.
404Unknown resource or id.
405Method not supported on this endpoint (see the Allow header).
409Conflict: duplicate value or the row is referenced by other data.
429Rate limit exceeded (see the Retry-After header).
500Something went wrong on our side.

Error codes

CodeDescription
INVALID_TOKENCredentials are missing, invalid or expired.
FORBIDDENYour key does not allow this method on this resource.
INVALID_SERVICEThe resource in the URL does not exist.
NOT_FOUNDNo resource with the given id.
INVALID_ATTRIBAn attribute or filter name is not valid.
REQUIRED_ATTRIBA required attribute is missing.
INVALID_INPUTThe request body is not valid JSON.
METHOD_NOT_ALLOWEDThe endpoint does not support this method.
CONFLICTDuplicate value or referenced by other records.
RATE_LIMITEDToo many requests in the current window.
ERROR RESPONSE
{
  "status": "error",
  "code": "REQUIRED_ATTRIB",
  "message": "A required attribute is missing from your request. [name]"
}

Pagination

List endpoints are cursor-paginated. Pass limit (default 100, max 1000) and follow meta.next: when present, more results exist — repeat the request adding next=<cursor> to get the following page. When meta.next is absent, you reached the end.

ParameterDescription
limitPage size, 1–1000. Default 100.
nextOpaque cursor from the previous page's meta.next.
FIRST PAGE
curl "https://api.starkode.com/v1/items?limit=100" \
  -H "X-Api-Key: YOUR_API_KEY"
NEXT PAGE
curl "https://api.starkode.com/v1/items?limit=100&next=71M0f72mquB" \
  -H "X-Api-Key: YOUR_API_KEY"

Filtering & sorting

List endpoints accept query parameters to filter, sort and shape the response. Each resource documents its own filterable attributes; unknown parameters return 400 INVALID_ATTRIB.

ParameterDescription
<filter> Exact match on a filterable attribute, e.g. ?sku=SX4508-001.
last_updated Returns rows updated after the given timestamp — built for incremental sync: store the highest upd you received and pass it on the next run.
sort Comma-separated attribute list; prefix with - for descending, e.g. ?sort=-last_updated,name. When sorting, meta.next is not returned.
fields Return only the listed attributes, e.g. ?fields=id,name,price.
INCREMENTAL SYNC
curl "https://api.starkode.com/v1/items?last_updated=2026-08-01%2000:00:00" \
  -H "X-Api-Key: YOUR_API_KEY"
SHAPE THE RESPONSE
curl "https://api.starkode.com/v1/items?fields=id,name,price&sort=-last_updated" \
  -H "X-Api-Key: YOUR_API_KEY"

Rate limits

Requests are limited per account per hour (default 3600 requests/hour). The current allowance travels in the response headers. When you exceed it, requests return 429 with a Retry-After header — back off and retry after that many seconds.

HeaderDescription
X-RateLimit-LimitYour requests-per-hour allowance.
X-RateLimit-RemainingRequests left in the current window.
Retry-AfterSeconds until the window resets (on 429 only).
429 RESPONSE
HTTP/1.1 429 Too Many Requests
Retry-After: 1180

{
  "status": "error",
  "code": "RATE_LIMITED",
  "message": "You have exceeded the number of requests allowed for your account."
}

Items

Items are the products and materials tracked in your inventory, including stock by location, pricing and identification codes.

GET/v1/items
GET/v1/items/{id}
POST/v1/items
PUT/v1/items/{id}
PATCH/v1/items/{id}
DELETE/v1/items/{id}

Attributes

AttributeDescription
idread-onlyUnique id, generated on create.
namerequiredDisplay name.
statusItem status (A = active).
categoryCategory id (see Categories). Reads return the category name.
brand / uomBrand and unit of measure.
price / cost / ccySale price, cost and ISO currency.
sku / gtinStock keeping unit and GTIN/EAN/UPC barcode.
serial_nbr / part_nbr / lotSerial, part and lot numbers.
expire_onExpiration date (YYYY-MM-DD).
stockread-onlyTotal stock across locations.
stock_min / stock_maxReorder thresholds.
locationsread-onlyPer-location stock breakdown.
external_idYour own identifier for cross-referencing.
descr / cdataDescription text and custom JSON data.
updread-onlyLast update timestamp.

Filters

id, sku, gtin, status, category (by name), last_updated.

Bulk create

Send a JSON array (1–1000 objects) to POST /v1/items to create many items in one request. The batch is atomic: if any row is invalid, nothing is created. The response returns the created items with meta.total.

THE ITEM OBJECT
{
  "id": "71M0f72mquA",
  "name": "Logitec Tablet 10\" Slim",
  "status": "A",
  "category": "Mobile",
  "brand": "Logitech",
  "uom": "un",
  "price": "99.000",
  "cost": "67.000",
  "ccy": "USD",
  "sku": "00000141",
  "gtin": "770800387128",
  "stock": "2.000",
  "locations": [
    { "name": "Main", "stock": 2 }
  ],
  "upd": "2026-07-22 18:40:12.115"
}
CREATE AN ITEM
curl -X POST https://api.starkode.com/v1/items \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Wireless Mouse",
    "sku": "WM-1000",
    "price": 24.90,
    "ccy": "USD"
  }'
UPDATE THE PRICE
curl -X PATCH https://api.starkode.com/v1/items/71M0f72mquA \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"price": 94.90}'
FIND BY BARCODE
curl "https://api.starkode.com/v1/items?gtin=770800387128" \
  -H "X-Api-Key: YOUR_API_KEY"
BULK CREATE
curl -X POST https://api.starkode.com/v1/items \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {"name": "Wireless Mouse",    "sku": "WM-1000", "price": 24.90},
    {"name": "Wireless Keyboard", "sku": "WK-2000", "price": 49.90},
    {"name": "USB-C Hub",         "sku": "UH-3000", "price": 34.50}
  ]'

Customers

The organizations you sell to. Customers appear on invoices, orders and other sales documents.

GET/v1/customers
GET/v1/customers/{id}
POST/v1/customers
PUT/v1/customers/{id}
PATCH/v1/customers/{id}
DELETE/v1/customers/{id}

Attributes

AttributeDescription
idread-onlyUnique id, generated on create.
namerequiredCompany or person name.
typeO organization, P person.
active1 active, 0 inactive.
pay_term / pay_methodDefault payment term / method ids.
website / ccyWebsite URL and default ISO currency.
lead_timeLead time in days.
external_idYour own identifier for cross-referencing.
cdataCustom JSON data.
idsread-onlyTax/legal identifiers: type and number.
contactsread-onlyContact people: name, phone, cell, email.
addressesread-onlyAddresses: street, city, state, postal code, country, coordinates.
updread-onlyLast update timestamp.

Filters

id, name, active, external_id, last_updated.

THE CUSTOMER OBJECT
{
  "id": "7TfhmBvkE-dM",
  "name": "Warehouse Solutions",
  "type": "O",
  "active": "1",
  "ccy": "USD",
  "upd": "2025-07-22 18:52:40.220"
}
CREATE A CUSTOMER
curl -X POST https://api.starkode.com/v1/customers \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "ACME Corp",
    "ccy": "USD",
    "website": "https://acme.example"
  }'
SYNC CHANGED CUSTOMERS
curl "https://api.starkode.com/v1/customers?last_updated=2026-08-01%2000:00:00" \
  -H "X-Api-Key: YOUR_API_KEY"

Vendors

The organizations you buy from. Vendors share the same attribute set as Customers but live in a separate collection: a vendor id is not reachable through the customers endpoints and vice versa.

GET/v1/vendors
GET/v1/vendors/{id}
POST/v1/vendors
PUT/v1/vendors/{id}
PATCH/v1/vendors/{id}
DELETE/v1/vendors/{id}

Attributes & filters

Same as Customers.

LIST VENDORS
curl "https://api.starkode.com/v1/vendors?fields=id,name" \
  -H "X-Api-Key: YOUR_API_KEY"
RESPONSE
{
  "status": "success",
  "meta": { "total": 4 },
  "data": [
    { "id": "8TffRzBgbVnz", "name": "East Market" },
    { "id": "8TfhMY4fqVkO", "name": "Newtech" },
    { "id": "8Tfha-H7yV_v", "name": "Rain Inc" },
    { "id": "8TfhmBvkE-dM", "name": "Car Solutions" }
  ]
}

Categories

Categories organize your items in a hierarchy. Assign a category to an item through the item's category attribute.

GET/v1/categories
GET/v1/categories/{id}
POST/v1/categories
PUT/v1/categories/{id}
PATCH/v1/categories/{id}
DELETE/v1/categories/{id}

Attributes

AttributeDescription
idread-onlyUnique id, generated on create.
namerequiredCategory name.
active1 active, 0 inactive.
parentParent category id, for hierarchies.
updread-onlyLast update timestamp.

Filters

id, name, parent, active, last_updated.

Deleting a category that is still assigned to items returns 409 CONFLICT — reassign the items first.
THE CATEGORY OBJECT
{
  "id": "fh1u6zohgh",
  "name": "Mobile",
  "active": "1",
  "upd": "2025-06-30 11:02:18.410"
}
CREATE A SUBCATEGORY
curl -X POST https://api.starkode.com/v1/categories \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Smartphones",
    "parent": "fh1u6zohgh"
  }'

Invoices

The sales invoices issued from the Starkode apps. Invoices are read-only through the API: they are created in the apps, which own numbering, taxes and line items. Use the API to pull them into your accounting or BI systems.

GET/v1/invoices
GET/v1/invoices/{id}

Attributes

AttributeDescription
idUnique document id.
doc_nbrInvoice number as shown to the customer.
statusDocument status.
org / org_nameCustomer id and display name.
doc_dt / due_dtIssue and due dates.
po_nbrCustomer purchase order number.
sub_amt / tax_amt / vat_amtSubtotal and tax amounts.
tot_amt / pay_amtTotal and amount paid.
ship_amt / ccyShipping amount and ISO currency.
notes / cdataNotes and custom JSON data.
linesLine items: item, name, qty, price, amounts per line.
taxesTax breakdown: name, pct, amount.
chargesAdditional charges: name, price, amount.
updLast update timestamp.

Filters

id, doc_nbr, org, status, last_updated.

THE INVOICE OBJECT
{
  "id": "7TfnEi4G6-En",
  "doc_nbr": "0002",
  "status": "O",
  "org": "7TfhmBvkE-dM",
  "org_name": "Warehouse Solutions",
  "doc_dt": "2025-07-22 18:55:33",
  "due_dt": "2025-08-21",
  "sub_amt": "1990.000",
  "tax_amt": "0.000",
  "tot_amt": "1990.000",
  "pay_amt": "0.000",
  "ccy": "USD",
  "lines": [
    { "seq": 0, "item": "71M0f72mquA", "name": "Logitec Tablet 10\" Slim",
      "qty": 20, "price": 99, "amt": 1980 },
    { "seq": 1, "item": "71M0f72mquB", "name": "Logitec Wireless Keyboard",
      "qty": 1, "price": 10, "amt": 10 }
  ],
  "taxes": [
    { "name": "Sales Tax", "pct": 0, "amt": 0 }
  ],
  "upd": "2025-07-22 18:55:41.812"
}
INVOICES FOR ONE CUSTOMER
curl "https://api.starkode.com/v1/invoices?org=7TfhmBvkE-dM" \
  -H "X-Api-Key: YOUR_API_KEY"
PULL RECENT INVOICES
curl "https://api.starkode.com/v1/invoices?last_updated=2026-08-01%2000:00:00&fields=id,doc_nbr,org_name,tot_amt,ccy" \
  -H "X-Api-Key: YOUR_API_KEY"