LogicTrade API
    LogicTrade API
    • Authentication
    • Pagination
    • Rate limits
    • Error codes
    • Changelog
    • Configuration Service
    • Endpoints
      • Authentication
        • Introspection
      • Customer
        • List all customers
        • Retrieve a customer by id
        • Create a customer
        • Update a customer
        • Remove the customer
      • Supplier
        • List all suppliers
        • Retrieve a supplier by id
        • Create a supplier
        • Update a supplier
        • Remove the supplier
      • Product
        • Product
          • List all products
          • Retrieve a product by id
          • Create a product
          • Remove the products
          • Update a product
          • Search products
        • Groups
          • List all product groups
        • Discount
          • List all discounts for products
          • Get all discounts for product by id
          • List all discounts for customers
          • Get all discounts for a customer by id
        • Stock
          • Get stock for products
          • Search stock for products
        • Prices
          • Get product prices
        • Descriptions
          • Get the descriptions for a product
        • References
          • Get the product references
        • Compositions
          • Get product compositions
      • Quote
        • List all quotes
        • Retrieve a quote by id
        • Create a quote
        • Update a quote
      • Sales order
        • List all orders
        • Retrieve an orders by id
        • Create an order
        • Update an order
      • Invoice
        • List all invoices
        • Retrieve a invoice by id
        • Create a invoice
        • Update a invoice
      • Delivery
        • Get list of orders that can be delivered
        • Update the order with delivery information
      • Purchase order
        • List all purchase orders
        • Retrieve a purchase orders by id
        • Create a purchase order
        • Update a purchase order

    Rate limits

    The RateLimiting functionality in the LogicTrade API is designed to manage and control the number of incoming requests to our API.

    Why do we have rate limits?#

    Rate limiting is an essential aspect of LogicTrade API management and serves several critical purposes:
    1.
    Preventing Server Overload: By limiting the number of requests an API can handle within a certain time frame, we ensure that our server resources are not overwhelmed. This helps maintain optimal performance and stability, especially during periods of high traffic.
    2.
    Ensuring Fair Usage: Rate limiting allows us to distribute access fairly among users. This prevents a single user or client from monopolizing resources and ensures that all clients experience a consistent level of service.
    3.
    Improving User Experience: With rate limiting, we can maintain a high quality of service for all users. By preventing traffic spikes from degrading performance, we ensure that legitimate users receive prompt and reliable access.
    4.
    Resource Management: Rate limiting enables us to allocate and scale our server resources more effectively, ensuring that the infrastructure can handle regular and unexpected surges in traffic without compromising the system’s integrity.
    In summary, rate limiting is crucial for maintaining a reliable, secure, and fair API service. It safeguards against excessive load, protects against abuse, and ensures that all users benefit from consistent performance.

    How do these rate limits work?#

    Request Counting: Every incoming request is counted and stored, enabling the LogicTrade API to track how many requests a particular API key has made within a specific time period.
    Rate Limiting:
    Users who have authenticated (identified through unique API key) are permitted up to 1020 requests per minute.

    Rejecting Requests and Warnings: If a user exceeds the allowed limit, their request is denied with an error message stating, “Too many requests, please try again later”.
    Informative Headers: The LogicTrade API includes headers with each response to provide relevant information:
    Limit: The maximum number of requests allowed per minute.
    Remaining: The number of requests remaining for the user within the current minute.
    Reset: The moment when the rate limit is reset for this API key.

    Example headers
    RateLimit-Limit:     1020
    RateLimit-Remaining: 1014
    RateLimit-Reset:     11/13/2024 10:34:51 +00:00
    Modified at 2024-12-19 09:05:36
    Previous
    Pagination
    Next
    Error codes