Skip to main content

Design Principles

Transaction Model

At the heart of API's architecture is an evolved Transaction Model that caters to dynamic workflows. This model embraces the fluid nature of modern purchase orders, enabling customers to interact with our system in a more flexible and responsive manner.

Purchase Order Lifecycle

  • Customers can initiate a create order request via our API, selecting any number of products with specified quantities – each of these constitutes a single transaction.
  • The backend system checks for an existing purchase order based on the date and time.
  • If an existing purchase order is found on the same day, the products from the new transaction are appended to it.
  • If no purchase order exists, a new one is created for the customer.
  • As a result, a single purchase order can comprise multiple transactions within a day.
  • At the end of the day, an invoice for the API purchase order is generated and sent to the customer.

Key Takeaways for API Customers:

  • Transaction as Primary Interaction: Engagements with our API focus on transactions rather than traditional sales order numbers, streamlining the ordering process.
  • Ease of Order Creation: You have the ability to initiate a create order request for a variety of products at your convenience, treating each request as a distinct transaction for better manageability.

Order Fulfillment Model

Order Processing

In the API ecosystem, the agility of order processing is paramount. After a create order request is made, the backend system demonstrates its flexibility in handling product lists.

Order Post-Processing

  • When a create order request is received, the backend system appends the list of products to an existing purchase order if one is created on the same day. This dynamic list management allows for real-time updates to the order based on customer needs.

  • Upon receiving a get codes request from the client, the system enters a fulfillment phase. The client may receive all the redeemable codes at once or only a portion, depending on availability and processing status.

  • Remaining redeemable codes, if any, will stay in a processing state. Clients are encouraged to make subsequent get codes requests to retrieve the latest status and details of all redeemable codes associated with their particular transaction.

Rate Limit Compliance

  • Clients are required to adhere to the predefined rate limits for data retrieval, currently set at 10 requests per second. Please note that this limit may be subject to change in the future. This policy ensures system stability and equitable resource distribution among all users.

By implementing these principles, API guarantees a seamless, responsive, and adaptable order fulfillment process that meets the dynamic needs of modern e-commerce businesses.

Key Takeaways for API Customers:

Asynchronous Order Processing

  • Immediate Acknowledgment: Upon submitting a create order request, the system quickly acknowledges the receipt but processes the order in an asynchronous manner, enhancing system efficiency and user experience.
  • Customer Initiative Required: After placing an order, it's crucial for customers to proactively use the get codes API to fetch their codes. This step might need to be repeated based on the codes' processing status.