API Reference

REST API Documentation

Crate exposes its full capability set through REST APIs. All endpoints accept and return JSON. Resource URLs are scoped by organization — tenant context is derived automatically from your session token.

78
Endpoints
8
Resource Groups
JSON
Request & Response
JWT
Authentication

Getting Started

Base URL

https://api.cratewms.com

All endpoint paths below are relative to this base URL.

Authentication

Authorization: Bearer <token>

Get a JWT token from /auth/login and include it in every request header.

Response Envelope

{
  "data": {
    "id": 1,
    "name": "Acme Corp",
    "status": "active"
  }
}

Every successful response wraps the result in a data key. Examples below show the contents of data.

Error Responses

{
  "errors": [
    {
      "reason": "invalid parameter",
      "message": "email is required"
    }
  ]
}

Errors return an errors array. Common codes: 400 invalid input, 401 unauthorized, 404 not found, 409 conflict.

Conventions

Timestamps — UTC, ISO 8601 format
IDs — auto-incrementing integers
Soft-delete — sets status to inactive
Org scoping — automatic via JWT token

Authentication

Register organizations, authenticate users, and manage sessions. All other endpoints require the JWT token returned by login or register.

Catalog

Manage your product catalog — SKUs, barcodes, tax classification, and bulk imports from external platforms.

Suppliers

Supplier master data with contact info, payment terms, lead times, and per-item pricing. Supplier-item links define the price and MOQ for each product a supplier offers.

Purchase Orders

Full PO lifecycle — draft, approve, send to supplier, track receiving. A PO starts in draft status where you add line items, then moves through approval, sending, and finally receiving via GRN.

Goods Receipt (GRN)

Record the physical arrival of goods at your warehouse. A Goods Receipt Note captures what was received, the quality-check outcome (accepted vs rejected), and where the goods were stored. Accepting a GRN automatically updates inventory.

Invoices & Documents

Record supplier invoices and run 3-way matching — compare invoice quantities and prices against the PO (what you ordered) and GRN (what you received) to catch discrepancies before payment.

Inventory

Real-time stock visibility — positions track inventory at each bin location by item, lot, and batch. Every stock movement is recorded in an immutable transaction log.

Warehouse Structure

Define your physical warehouse layout as a hierarchy: Warehouse → Zone → Aisle → Rack → Bin. Every inventory position is tracked down to the bin level. Zones let you separate storage by type (ambient, cold, hazardous), while the full path (zone/aisle/rack/bin) maps directly to your physical layout.

Ready to integrate?

Get API access and start building. Our team can help with custom integration requirements.