API Overview
Authentication, conventions, and caching for the Augur REST API.
Augur API Overview
The Augur API is a collection of REST microservices. Each service runs at its own subdomain of augur-api.com. Check the service directory for the current list.
Base URL Pattern
https://{service-name}.augur-api.comExamples:
https://items.augur-api.com— Product cataloghttps://customers.augur-api.com— Customer datahttps://orders.augur-api.com— Order management
Authentication
All requests require two credentials:
| Header | Description |
|---|---|
Authorization: Bearer {jwt} | Your JWT token |
x-site-id: {siteId} | Your site identifier |
curl -H "Authorization: Bearer YOUR_TOKEN" \
-H "x-site-id: YOUR_SITE_ID" \
https://items.augur-api.com/inv-mast?limit=10Token Types
| Type | Lifespan | Notes |
|---|---|---|
| Site token | Long-lived | Can be revoked by SimpleApps |
| User token | Short-lived | Should be rotated regularly |
Tokens are locked to specific sites. Contact SimpleApps to obtain credentials.
Credential Files
The SDK resolves credentials automatically in this order:
- Environment variables —
AUGUR_TOKEN+AUGUR_SITE_ID - Explicit file —
AUGUR_CREDS_FILEenv var pointing to JSON - Project file —
<cwd>/.simpleapps/augur-api.json - Global file —
~/.simpleapps/augur-api.json
Single-site format:
{
"siteId": "my-site",
"jwt": "my-token"
}Multi-site format:
{
"site-a": { "jwt": "token-a" },
"site-b": { "jwt": "token-b" }
}Response Format
All endpoints return a standard JSON envelope:
{
"status": 200,
"message": "Ok",
"data": [],
"count": 10,
"total": 10,
"totalResults": 542,
"options": {},
"params": {}
}Pagination
List endpoints accept limit and offset query parameters:
GET /inv-mast?limit=25&offset=50API Conventions
- REST only — no GraphQL
- JSON only — no XML
- No breaking changes — new fields are added, old fields are never removed
- Standard HTTP status codes for errors
- No sandbox — test against your configured site
- No formal rate limits — abuse is mitigated at the Cloudflare edge
- Edge caching available — use
edgeCacheparameter on GET requests
Error Handling
Error responses use the same JSON envelope as successful responses. The status field reflects the HTTP status code and message provides a human-readable description.
{
"status": 404,
"message": "Not Found",
"data": [],
"count": 0,
"total": 0,
"totalResults": 0,
"options": {},
"params": {}
}A 500 response may not return a valid JSON envelope — always check the content type before parsing.
Status Codes
| Code | Meaning | Action |
|---|---|---|
200 | Success | — |
400 | Bad request — invalid parameters | Fix the request, do not retry |
401 | Missing or invalid token | Check Authorization header |
403 | Valid token but insufficient access | Verify x-site-id and permissions |
404 | Resource not found | Do not retry |
500 | Internal server error | Retry with backoff |
502 | Bad gateway | Retry with backoff |
503 | Service unavailable | Retry with backoff |
504 | Gateway timeout | Retry with backoff |
Retry Strategy
Retry only on 5xx errors and timeouts. Do not retry 4xx errors — they indicate a problem with the request.
- Wait 1 second after the first failure
- Double the wait on each subsequent retry (1s, 2s, 4s, 8s)
- Stop after 3–4 attempts
- Set a client timeout of 30 seconds per request
Edge Caching
Any GET request can use Cloudflare edge caching via the edgeCache query parameter:
| Value | Duration |
|---|---|
30s | 30 seconds |
1m | 1 minute |
5m | 5 minutes |
1 - 5, 8 | 1-5 or 8 hours |
curl https://items.augur-api.com/inv-mast?limit=10&edgeCache=5mImplement local caching where appropriate. While Cloudflare handles CDN caching, storing frequently accessed data locally (product catalogs, pricing tiers) reduces API calls and improves response times.
Keeping Data in Sync
There is no webhook or event subscription system currently. A real-time event system is in development with no committed timeframe. All data syncs from Prophet 21 run on 5–15 minute intervals, pulling recently created and modified records. The recommended pattern is polling with edge caching.
Recommended Cache Intervals
| Data Type | edgeCache | Rationale |
|---|---|---|
| Inventory quantities | 5m | Syncs every 5–15 min; sub-minute freshness isn't available |
| Pricing | 5m | Price changes propagate on the same sync cycle |
| Product catalog | 1 (1 hour) | Items and categories change infrequently |
| Customer data | 5m | Contacts and addresses may update during business hours |
| Orders | none | Read your own writes — skip cache after submission |
| Reference data (companies, locations) | 8 (8 hours) | Rarely changes |
Polling Pattern
- Set
edgeCacheto match the sync interval for your data type - Poll at or above the cache interval — polling faster returns cached responses with no extra cost
- Use
offsetandlimitfor incremental fetches on large collections - For order submission flows, omit
edgeCacheso you always read the latest state
# Poll inventory every 5 minutes with edge caching
curl https://items.augur-api.com/inv-mast?limit=100&edgeCache=5m
# Read order status without cache after placing an order
curl https://orders.augur-api.com/oe-hdr?order_no=12345Limits & Reliability
Rate Limits
There are no formal per-client rate limits. All traffic passes through Cloudflare, which provides edge-level protection against abuse and anomalous traffic patterns.
Microservices Resilience
Each service maintains its own data store and operates independently. Services like pricing, items, and customers do not make live queries to Prophet 21 — they work from synced data. This means most API operations continue normally even during P21 maintenance windows or upgrades.
P21 downtime affects two operations:
- Data sync — new or changed records in P21 won't propagate until sync resumes
- Order submission — orders queued for P21 will be held until connectivity is restored
Status Page
A public status page is planned (augur-sites#1). In the meantime, contact SimpleApps for service health inquiries.