Back to Home

API Documentation

Build powerful integrations with the Inventory Manager API. RESTful, predictable, and secure.

Introduction

The Inventory Manager API is organized around REST principles. Our API accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL

All API requests should be made to:

Base URL
https://api.modulus-software.com/v1

Content Type

All requests must include the following header:

Header
Content-Type: application/json

Authentication

The Inventory Manager API uses API keys to authenticate requests. You can view and manage your API keys in the dashboard under Settings → API Keys.

Keep your API keys secure

Your API keys carry many privileges. Do not share them in publicly accessible areas such as GitHub or client-side code.

Authentication is performed via the Authorization header using Bearer token format:

HTTP Header
Authorization: Bearer your_api_key_here

Example Request

cURL
curl https://api.modulus-software.com/v1/items \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Content-Type: application/json"

Rate Limits

To ensure fair usage and maintain API performance, requests are rate limited based on your plan:

Plan Requests / Minute Requests / Day
Starter 60 10,000
Professional 300 100,000
Enterprise 1,000 Unlimited

Rate limit information is included in response headers:

Response Headers
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 299
X-RateLimit-Reset: 1640995200

Error Handling

The API uses conventional HTTP response codes to indicate success or failure. Codes in the 2xx range indicate success, 4xx indicate client errors, and 5xx indicate server errors.

200 OK 201 Created 400 Bad Request 401 Unauthorized 403 Forbidden 404 Not Found 429 Rate Limited 500 Server Error

Error Response Format

JSON
{
  "error": {
    "code": "invalid_request",
    "message": "The 'quantity' field must be a positive integer.",
    "field": "quantity"
  }
}

List Items

Returns a paginated list of all inventory items for your company.

GET /items

Retrieve all inventory items with optional filtering and pagination.

Query Parameters

Parameter Type Description
limit integer Number of items to return (default: 50, max: 100)
offset integer Number of items to skip for pagination
search string Search by name, SKU, or barcode
location string Filter by location
low_stock boolean Return only items below reorder point

Response

JSON Response
{
  "data": [
    {
      "id": "item_abc123",
      "name": "Widget Pro X",
      "sku": "WPX-001",
      "quantity": 248,
      "location": "Warehouse A",
      "barcode": "012345678901",
      "reorder_point": 50,
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-20T14:22:00Z"
    }
  ],
  "pagination": {
    "total": 847,
    "limit": 50,
    "offset": 0,
    "has_more": true
  }
}

Get Item

GET /items/{id}

Retrieve a single inventory item by ID.

Path Parameters

Parameter Type Description
idRequired string The unique identifier of the item

Create Item

POST /items

Create a new inventory item.

Request Body

Parameter Type Description
nameRequired string Display name of the item
skuRequired string Stock Keeping Unit (must be unique)
quantity integer Current quantity in stock (default: 0)
location string Storage location
barcode string Barcode or QR code value
reorder_point integer Quantity threshold for low stock alerts

Example Request

cURL
curl -X POST https://api.modulus-software.com/v1/items \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Widget Pro X",
    "sku": "WPX-001",
    "quantity": 100,
    "location": "Warehouse A",
    "reorder_point": 25
  }'

Update Item

PUT /items/{id}

Update an existing inventory item. All fields are optional — only provided fields will be updated.

Quantity adjustments

For inventory transactions (receiving stock, adjustments), use the /transactions endpoint instead of directly updating quantity. This ensures proper audit logging.

Delete Item

DELETE /items/{id}

Soft-delete an inventory item. The item will be moved to trash and can be restored within 30 days.

Response

JSON Response (204 No Content)
// Empty response body on success

List Orders

GET /orders

Retrieve all purchase orders for your company.

Create Order

POST /orders

Create a new purchase order with line items.

Audit Log

GET /audit

Retrieve audit log entries showing all changes to your inventory. Available based on your plan's audit history retention.

Query Parameters

Parameter Type Description
action string Filter by action type: create, update, delete, restore
item_id string Filter by specific item
user_id string Filter by user who performed action
since datetime Return entries after this timestamp (ISO 8601)

Snapshots

GET /snapshots

List all inventory snapshots. Snapshots are point-in-time backups of your entire inventory that can be restored.

Plan limitations

Snapshot creation and restoration frequency depends on your plan. Enterprise plans include daily automatic snapshots.