Skip to main content

Base URL

All API requests should be made to:
https://olp-api.nipuntheekshana.com

Versioning

The API is versioned via URL path prefix. The current version is v1.
https://olp-api.nipuntheekshana.com/v1/{resource}

Content Type

All requests and responses use JSON. Set the following header on every request:
Content-Type: application/json

Authentication

Most endpoints require a Bearer token obtained via the Login or Register endpoints. Include the token in the Authorization header:
Authorization: Bearer <your_token>
For server-to-server integrations, you can authenticate using API keys created through the Manage API Keys endpoint. Pass the API key in the X-API-Key header:
X-API-Key: <your_api_key>
X-API-Secret: <your_api_secret>

Rate Limits

API requests are rate-limited to protect the platform from abuse.
TierLimitWindow
Default100 requests1 minute
Auth20 requests1 minute
Checkout50 requests1 minute
When you exceed a rate limit, the API returns a 429 Too Many Requests response with the following headers:
HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the window resets

Error Format

All errors follow a consistent structure:
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "email is required",
    "details": {}
  }
}

Common Error Codes

HTTP StatusCodeDescription
400VALIDATION_ERRORRequest body or params are invalid
401UNAUTHORIZEDMissing or expired token
403FORBIDDENInsufficient permissions
404NOT_FOUNDResource does not exist
409CONFLICTResource already exists
429RATE_LIMITEDToo many requests
500INTERNAL_ERRORUnexpected server error

Pagination

List endpoints support cursor-based pagination with the following query parameters:
ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger20Items per page (max 100)
Paginated responses include:
{
  "data": [],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 85,
    "totalPages": 5
  }
}