Ask AwraIQ about features, pricing, onboarding, login, integrations, security, demos, mobile apps, automation, reports, or support.
Developer API Guide
Connect your existing tools, e-commerce platforms, and internal systems to the AWRA OpsHub ecosystem. Our API provides secure, reliable access to your inventory data and real-time events.
Introduction
The AWRA OpsHub API is designed to allow developers to build powerful integrations on top of our smart inventory and procurement platform. Whether you are looking to sync stock levels with a Shopify store, automate purchase orders from an ERP, or receive real-time notifications via webhooks, our API provides the necessary endpoints to make it happen.
Our API follows RESTful principles and uses standard HTTP methods. All responses are returned in JSON format, ensuring compatibility with modern programming languages and frameworks. We prioritize security and multi-tenancy, meaning your data is always isolated and protected behind robust authentication layers.
Authentication
To interact with the AWRA OpsHub API, you must first obtain a Sanctum API Token. These tokens act as your digital keys and should be kept secure. You can generate a token through your account settings or by using the authentication endpoint for programmatic access.
Once you have your token, you must include it in the header of every request using the Authorization field:
Security Note: Always use HTTPS for all API calls. Never expose your tokens in client-side code (like frontend JavaScript). If you believe a token has been compromised, revoke it immediately via the AWRA OpsHub dashboard.
Core Endpoints
GET Query Stock Level
Retrieve the real-time stock status of a specific item using its SKU or Barcode. This is ideal for external storefronts that need to check availability before confirming a sale.
Example Response:
{
"sku": "ITEM-001",
"name": "Industrial Widget A",
"stock_level": 150
} POST Register Webhook
Stay updated in real-time by registering a Webhook. Instead of polling our API, we will "push" information to your server whenever a specific event occurs (e.g., stock running low or a purchase order being approved).
Request Body (JSON):
{
"url": "https://your-server.com/api/webhooks/awra",
"event_type": "stock.low",
"secret": "your-custom-secret-key"
} GET List Categories
Retrieve a list of all item categories. This is helpful for building filter menus or navigation structures on your storefront.
GET Search Items
Search for items by name, description, or SKU. This endpoint supports pagination to handle large inventories efficiently.
Technical Considerations
Rate Limiting
To ensure system stability, our API is rate-limited. By default, clients are allowed up to 60 requests per minute. If you exceed this, you will receive a 429 Too Many Requests response.
Pagination
Endpoints that return lists (like Search) are paginated. We return 20 items per page by default. Use the page query parameter to navigate through the results.
Error Handling
Errors follow a standard structure, providing a descriptive message and, where applicable, a machine-readable code.
{ "message": "Item not found" } JSON Content-Type
Always ensure your requests include the Accept: application/json header to receive proper error messages.
Integration Examples
PHP (cURL)
cURL (Command Line)
Reference Integration Architecture
Production-grade integrations should separate data ingestion, transformation, and write-back operations. This prevents one failing subsystem from blocking the entire flow and gives teams better observability when incidents occur.
For financial and stock-critical events, we recommend idempotency keys and replay-safe handlers. If a webhook is delivered more than once or a job retries after timeout, your destination state should remain correct.
Use a staging layer where payloads are validated and normalized before committing to business tables. This pattern reduces runtime surprises caused by inconsistent source formatting, missing optional fields, or delayed third-party events.
Security, Compliance, and Operational Readiness
Credential hygiene
Store API tokens in server-side secret managers. Rotate credentials during staff transitions and after any suspected key exposure event.
Observability
Log request IDs, endpoint names, status codes, and response latency for every integration job so root-cause analysis is fast and reliable.
Change control
Version and test mappings before promoting changes to production. Include rollback plans for field-level or schema-level changes.
Need More Technical Details?
The full API reference documents every endpoint, its scopes and parameters, example responses, error codes, and rate limits.
View the full API referenceHelp Center
Need a quick answer while you read?
Run inventory, procurement, assets, sales, and field work with approved AWRA guidance for setup, migration, integrations, security, pricing, and support.