API Overview
The API documentation provides a comprehensive guide to integrating your system with our platform. It covers various resources such as content, orders, plans, users, reading permissions, and sessions. This documentation will help you understand how to authenticate, interact with, and manage these resources effectively, ensuring seamless integration and optimal use of our platform's capabilities.
Base URL
All API endpoints operate based on the URL of your store. This base URL serves as the starting point for constructing any API request.
Example: If your store's domain is example.publica.la
, your API requests should use:
https://example.publica.la
Flood Protection with Rate Limiter
To prevent malicious usage, protect the platform from resource exhaustion and ensure all API users receive a great service we implement a number of rate limiting techniques. The standard base rate limiter provides information regarding remaining requests in the current time frame through the usage of the follow headers:
Header Name | Header Description |
---|---|
X-RateLimit-Limit | will let you know the total number of allowed requests per minute. This number will depend on the API endpoint in question, authentication mechanism being used and customer's plan level. |
X-RateLimit-Remaining | will let you know how many requests are left in the current time frame. |
X-RateLimit-Reset | It will let you know when the limits will be renewed. Shown as UNIX timestamp. |
X-RateLimit-Reset will be available once the Limit has been exhausted
# Example with the default rate limit of 100
HTTP/1.1 200 OK
Content-Type: application/json
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 100
X-RateLimit-Reset: 1666897200
# After another request:
HTTP/1.1 200 OK
Content-Type: application/json
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 99
X-RateLimit-Reset: 1666897200
# After window resets
HTTP/1.1 200 OK
Content-Type: application/json
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 100
X-RateLimit-Reset: 1666897260
# If you make more than the allowed requests
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1666897320