Skip to main content

Developer resources v1

Coilinx API

Read-only inventory sync and signed operational webhooks.

Getting started

This guide creates a read-only API key and retrieves the first page of your company inventory.

1. Create an API key

A Coilinx company admin on Pro or Enterprise can open Account → Integrations → API keys. Give the key a label that identifies the consuming system, such as NetSuite production.

The complete key is displayed once. Copy it directly into your secret manager. Do not place it in source control, browser code, mobile apps, tickets, or logs.

2. Make your first request

curl "https://api.spoolrule.com/inventory/items?limit=100" \
  --header "Authorization: Bearer $COILINX_API_KEY" \
  --header "Accept: application/json"
const response = await fetch(
  "https://api.spoolrule.com/inventory/items?limit=100",
  {
    headers: {
      Authorization: `Bearer ${process.env.COILINX_API_KEY}`,
      Accept: "application/json",
    },
  },
);

if (!response.ok) {
  throw new Error(`Coilinx returned ${response.status}`);
}

const page = await response.json();
console.log(page.data);
import os
import requests

response = requests.get(
    "https://api.spoolrule.com/inventory/items",
    params={"limit": 100},
    headers={
        "Authorization": f"Bearer {os.environ['COILINX_API_KEY']}",
        "Accept": "application/json",
    },
    timeout=30,
)
response.raise_for_status()
page = response.json()
print(page["data"])

Successful responses use a stable envelope:

{
  "data": [
    {
      "id": "itm_01abc",
      "name": "Spool A-12",
      "status": "available",
      "locationId": "wh_01abc",
      "materialTypeId": "mat_01abc",
      "startingLength": 1000,
      "originalLength": 1000,
      "remainingLength": 842.5,
      "weight": 12.4,
      "weightSource": "scale",
      "checkedOutToUserId": null,
      "checkedOutAt": null,
      "archivedAt": null,
      "createdAt": "2026-01-15T10:00:00Z",
      "updatedAt": "2026-03-01T14:22:00Z"
    }
  ],
  "meta": {
    "requestId": "req_01abc",
    "hasMore": false,
    "nextCursor": null
  }
}

3. Handle pagination

If meta.hasMore is true, send meta.nextCursor as the next request's cursor. Treat cursors as opaque strings and never construct or modify them.

4. Add webhooks

Open Account → Integrations → Webhooks, add a public HTTPS endpoint, and select events. Store the signing secret shown during creation, then follow the signature verification guide.