API Authentication
All protected endpoints require authentication. This page covers the authentication methods available.Authentication Methods
| Method | Header(s) | Use Case |
|---|---|---|
| Bearer token | Authorization: Bearer ... | Admin and standard protected API routes |
| POS HMAC | X-API-Key-ID, X-Timestamp, X-Signature | POS terminal integrations |
| Partner HMAC | X-API-Key-ID, X-Partner-ID, X-Timestamp, X-Signature | Partner API routes |
| Service Auth | X-Service-Name, X-Service-Timestamp, X-Service-Signature | Internal services |
Bearer Authentication
Used by admin users and other bearer-protected routes.Request Format
API Key Prefixes
| Prefix | Environment |
|---|---|
olive_live_ | Production |
olive_test_ | Staging/Testing |
POS HMAC Authentication
POS routes under/api/v1/pos/* are protected by HMAC, not bearer tokens.
Mintlify’s manual endpoint playground cannot generate these HMAC headers automatically, so POS pages use playground: "simple" and provide copy-paste cURL examples.
Request Format
JWT Authentication
For admin operations and protected dashboard endpoints.Obtaining a Token
Using the Token
Error Responses
401 Unauthorized
Missing or invalid authentication:403 Forbidden
Authenticated but lacking permission:Service Authentication
Internal service routes use dedicated service headers, notX-Service-Auth.
Headers
Signature Format
The canonical string is pipe-delimited:HMAC Routes In Docs
- Partner and POS pages use
playground: "simple"because their signatures must be computed from the exact raw request body. - Bearer-protected and public routes can keep the interactive playground.
Best Practices
Secure Storage
Secure Storage
Store API keys securely; never expose in client-side code or version control.
Key Rotation
Key Rotation
Rotate API keys periodically and immediately after any suspected compromise.
Minimum Scope
Minimum Scope
Request only the scopes needed for your integration.
HTTPS Only
HTTPS Only
Always use HTTPS in production to protect credentials in transit.