Specific Rules
API Endpoints
The Cart API provides the following key endpoints:
-
POST /validate-cart - Validate cart before placing order
-
POST /purchase-order - Place an order
-
GET /purchase-order/{orderId} - Retrieve order status
-
Why Validate the Cart
Validate the cart to retrieve shipping information and associated prices. Customer information must be provided to perform validation.
-
Order IDs
Use POST /purchase-order to place an order.
If the products are supplied by different suppliers, the API will return one or more logistical-orders. Consequently, one Logistic Order is created for each supplier, delivery methods, etc.
Order IDs are generated automatically.
You must wait for our API response indicating an OK status before persisting the order locally, as the order creation can be rejected by our system.
-
Price calculation
Based on the offer, the quantity, and the Mega code, the price will be calculated. For example, some offers may have a fixed price, while others may have quantity-based pricing. Some offers may have a Mega code-based discount (price per customer group).
-
Order Types
There are two types of orders in the system:
-
Purchase Order (PO): The order placed by buyers/hotels/companies for products
-
Logistic Order: An individual order created for each supplier when a Purchase Order contains products from multiple suppliers. Each Logistic Order is shipped independently by its respective supplier.
-