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.
curl https://api.starkode.com/v1/items?limit=2 \ -H "X-Api-Key: YOUR_API_KEY"
{
"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.
| Endpoint | Description |
|---|---|
POST /v1/token |
Returns access_token and expires_in. Requires the
X-Api-Key header and a JSON body with your secret. |
curl https://api.starkode.com/v1/items \ -H "X-Api-Key: YOUR_API_KEY"
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"}'
{
"status": "success",
"data": {
"token_type": "Bearer",
"access_token": "8vlTwki8D-yBHop5TO",
"expires_in": 3600
}
}
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.
| HTTP | Meaning |
|---|---|
200 / 201 | Request succeeded / resource created. |
400 | Invalid JSON, unknown attribute or filter, missing required attribute. |
401 | Missing, invalid or expired credentials. |
403 | The method is not allowed for your key or this resource. |
404 | Unknown resource or id. |
405 | Method not supported on this endpoint (see the Allow header). |
409 | Conflict: duplicate value or the row is referenced by other data. |
429 | Rate limit exceeded (see the Retry-After header). |
500 | Something went wrong on our side. |
Error codes
| Code | Description |
|---|---|
INVALID_TOKEN | Credentials are missing, invalid or expired. |
FORBIDDEN | Your key does not allow this method on this resource. |
INVALID_SERVICE | The resource in the URL does not exist. |
NOT_FOUND | No resource with the given id. |
INVALID_ATTRIB | An attribute or filter name is not valid. |
REQUIRED_ATTRIB | A required attribute is missing. |
INVALID_INPUT | The request body is not valid JSON. |
METHOD_NOT_ALLOWED | The endpoint does not support this method. |
CONFLICT | Duplicate value or referenced by other records. |
RATE_LIMITED | Too many requests in the current window. |
{
"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.
| Parameter | Description |
|---|---|
| limit | Page size, 1–1000. Default 100. |
| next | Opaque cursor from the previous page's meta.next. |
curl "https://api.starkode.com/v1/items?limit=100" \ -H "X-Api-Key: YOUR_API_KEY"
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.
| Parameter | Description |
|---|---|
| <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. |
curl "https://api.starkode.com/v1/items?last_updated=2026-08-01%2000:00:00" \ -H "X-Api-Key: YOUR_API_KEY"
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.
| Header | Description |
|---|---|
X-RateLimit-Limit | Your requests-per-hour allowance. |
X-RateLimit-Remaining | Requests left in the current window. |
Retry-After | Seconds until the window resets (on 429 only). |
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.
/v1/items/v1/items/{id}/v1/items/v1/items/{id}/v1/items/{id}/v1/items/{id}Attributes
| Attribute | Description |
|---|---|
| idread-only | Unique id, generated on create. |
| namerequired | Display name. |
| status | Item status (A = active). |
| category | Category id (see Categories). Reads return the category name. |
| brand / uom | Brand and unit of measure. |
| price / cost / ccy | Sale price, cost and ISO currency. |
| sku / gtin | Stock keeping unit and GTIN/EAN/UPC barcode. |
| serial_nbr / part_nbr / lot | Serial, part and lot numbers. |
| expire_on | Expiration date (YYYY-MM-DD). |
| stockread-only | Total stock across locations. |
| stock_min / stock_max | Reorder thresholds. |
| locationsread-only | Per-location stock breakdown. |
| external_id | Your own identifier for cross-referencing. |
| descr / cdata | Description text and custom JSON data. |
| updread-only | Last 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.
{
"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"
}
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" }'
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}'
curl "https://api.starkode.com/v1/items?gtin=770800387128" \ -H "X-Api-Key: YOUR_API_KEY"
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.
/v1/customers/v1/customers/{id}/v1/customers/v1/customers/{id}/v1/customers/{id}/v1/customers/{id}Attributes
| Attribute | Description |
|---|---|
| idread-only | Unique id, generated on create. |
| namerequired | Company or person name. |
| type | O organization, P person. |
| active | 1 active, 0 inactive. |
| pay_term / pay_method | Default payment term / method ids. |
| website / ccy | Website URL and default ISO currency. |
| lead_time | Lead time in days. |
| external_id | Your own identifier for cross-referencing. |
| cdata | Custom JSON data. |
| idsread-only | Tax/legal identifiers: type and number. |
| contactsread-only | Contact people: name, phone, cell, email. |
| addressesread-only | Addresses: street, city, state, postal code, country, coordinates. |
| updread-only | Last update timestamp. |
Filters
id, name, active, external_id,
last_updated.
{
"id": "7TfhmBvkE-dM",
"name": "Warehouse Solutions",
"type": "O",
"active": "1",
"ccy": "USD",
"upd": "2025-07-22 18:52:40.220"
}
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" }'
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.
/v1/vendors/v1/vendors/{id}/v1/vendors/v1/vendors/{id}/v1/vendors/{id}/v1/vendors/{id}Attributes & filters
Same as Customers.
curl "https://api.starkode.com/v1/vendors?fields=id,name" \ -H "X-Api-Key: YOUR_API_KEY"
{
"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.
/v1/categories/v1/categories/{id}/v1/categories/v1/categories/{id}/v1/categories/{id}/v1/categories/{id}Attributes
| Attribute | Description |
|---|---|
| idread-only | Unique id, generated on create. |
| namerequired | Category name. |
| active | 1 active, 0 inactive. |
| parent | Parent category id, for hierarchies. |
| updread-only | Last update timestamp. |
Filters
id, name, parent, active,
last_updated.
{
"id": "fh1u6zohgh",
"name": "Mobile",
"active": "1",
"upd": "2025-06-30 11:02:18.410"
}
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.
/v1/invoices/v1/invoices/{id}Attributes
| Attribute | Description |
|---|---|
| id | Unique document id. |
| doc_nbr | Invoice number as shown to the customer. |
| status | Document status. |
| org / org_name | Customer id and display name. |
| doc_dt / due_dt | Issue and due dates. |
| po_nbr | Customer purchase order number. |
| sub_amt / tax_amt / vat_amt | Subtotal and tax amounts. |
| tot_amt / pay_amt | Total and amount paid. |
| ship_amt / ccy | Shipping amount and ISO currency. |
| notes / cdata | Notes and custom JSON data. |
| lines | Line items: item, name, qty, price, amounts per line. |
| taxes | Tax breakdown: name, pct, amount. |
| charges | Additional charges: name, price, amount. |
| upd | Last update timestamp. |
Filters
id, doc_nbr, org,
status, last_updated.
{
"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"
}
curl "https://api.starkode.com/v1/invoices?org=7TfhmBvkE-dM" \ -H "X-Api-Key: YOUR_API_KEY"
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"