Skip to main content

Developer Guide

This guide helps developers integrate with Stockaj — whether you're building a custom kiosk app, syncing data with an external system, or automating workflows.

Integration Options

Stockaj offers multiple ways to integrate:

MethodBest ForRequirements
REST APIFull CRUD operations, data syncAPI token (Starter+ plan)
WebhooksReal-time event notificationsProfessional+ plan
QR Code ScanningKiosk/scanner appsKiosk token ability
CSV/Excel ImportBulk data migrationWeb UI access

Quick Start

1. Get an API Token

Create a token in Settings → API Tokens with the abilities your integration needs.

2. Make Your First Request

curl -X GET "https://app.stockaj.com/api/v2/items" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"

3. Explore the API

Browse the full API Reference or use the interactive docs at https://app.stockaj.com/docs/v2.

SDKs & Libraries

Stockaj currently doesn't provide official SDKs, but the API follows REST conventions and works with any HTTP client:

  • JavaScript/Node.jsfetch, axios
  • Pythonrequests, httpx
  • PHPGuzzle, Laravel Http
  • Rubyhttparty, faraday

Architecture Overview

┌─────────────────────────────────────────────┐
│ Your App │
├──────────┬──────────────┬───────────────────┤
│ REST API │ Webhooks │ QR Scanning │
│ (pull) │ (push) │ (scan→lookup) │
└──────┬───┴──────┬───────┴────────┬──────────┘
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────┐
│ Stockaj Platform │
├─────────────────────────────────────────────┤
│ Items │ Rentals │ Renters │ Alerts │ ... │
└─────────────────────────────────────────────┘

Common Integration Patterns

Inventory Sync

Keep an external system in sync with Stockaj:

  1. Initial sync — Use the Items API to fetch all items
  2. Ongoing sync — Set up webhooks for item.created, item.updated, item.deleted
  3. Conflict resolution — Use external_id to map between systems

Kiosk Application

Build a check-in/check-out station:

  1. Create a token with kiosk:scan ability
  2. Use the Kiosk Scan endpoint to identify scanned codes
  3. Display item/rental information
  4. Use the Rentals API to update status

Reporting Dashboard

Build custom analytics:

  1. Periodically fetch rentals with status filters
  2. Aggregate item rental history
  3. Use renter data for customer analytics

Rate Limits & Best Practices

  • Cache responses when possible to reduce API calls
  • Use webhooks instead of polling for real-time updates
  • Paginate through large datasets instead of requesting everything at once
  • Use per_page to control response size
  • Handle rate limits by respecting Retry-After headers
  • Store external_id on items and renters for cross-system mapping