Create a new order (Current Implementation)
Creates a new order containing a customer ID and a list of items to be processed by the microservices backend.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| customerId | string | Yes * | Unique identifier of the customer placing the order. Example: "cust-12345" |
| items | array | Yes * | List of order items containing product ID and quantity. |
{
"customerId": "cust-12345",
"items": [
{
"productId": "9",
"quantity": 2
}
]
}
Responses
Order created successfully. Returns the UUID of the newly generated order.
"123e4567-e89b-12d3-a456-426614174000"
Place Order (v1 Planned)
Endpoint defined in locust load tests. Expects idempotency key and JWT authentication. Utilizes distributed locking and caching mechanisms.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| userId | integer | Yes * | Numeric user identifier. Example: 1234 |
| items | array | Yes * | List of order items. |
| idempotencyKey | string | Yes * | Idempotency key to prevent duplicate processing. Example: "idemp-key-1234-567890" |
{
"userId": 1234,
"items": [
{
"productId": "1",
"quantity": 3
},
{
"productId": "11",
"quantity": 1
}
],
"idempotencyKey": "idemp-key-1234-567890"
}
Responses
Order successfully placed.
Data conflict or Optimistic lock failure under high load.
"Data conflict / Optimistic lock failure under load"
View Inventory (v1 Planned)
Endpoint defined in locust load tests to fetch current inventory status across all catalog items.
Responses
Successfully fetched trending catalog inventory details.
[
{
"productId": "1",
"quantity": 100,
"reservedQty": 10
},
{
"productId": "2",
"quantity": 45,
"reservedQty": 0
}
]