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:
| Method | Best For | Requirements |
|---|---|---|
| REST API | Full CRUD operations, data sync | API token (Starter+ plan) |
| Webhooks | Real-time event notifications | Professional+ plan |
| QR Code Scanning | Kiosk/scanner apps | Kiosk token ability |
| CSV/Excel Import | Bulk data migration | Web 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.js —
fetch,axios - Python —
requests,httpx - PHP —
Guzzle,Laravel Http - Ruby —
httparty,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:
- Initial sync — Use the Items API to fetch all items
- Ongoing sync — Set up webhooks for
item.created,item.updated,item.deleted - Conflict resolution — Use
external_idto map between systems
Kiosk Application
Build a check-in/check-out station:
- Create a token with
kiosk:scanability - Use the Kiosk Scan endpoint to identify scanned codes
- Display item/rental information
- Use the Rentals API to update status
Reporting Dashboard
Build custom analytics:
- Periodically fetch rentals with status filters
- Aggregate item rental history
- 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_pageto control response size - Handle rate limits by respecting
Retry-Afterheaders - Store
external_idon items and renters for cross-system mapping