The orders API manages the complete transaction flow on ECHO: creating an order for a listed item, tracking its progress through status changes, and communicating between buyer and seller via order messages. All order endpoints require a valid JWT token. A user may only access orders in which they are either the buyer or the seller, unless they hold theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/HelenaLM32/ECHO/llms.txt
Use this file to discover all available pages before exploring further.
ADMIN role.
The base URL for all endpoints on a local development server is
http://localhost:8084. Replace this with your deployed API URL in production.Get current user’s orders
Authentication
Requires a valid JWT token.Example
Response fields
Unique identifier for the order.
The ID of the user who placed the order.
The ID of the marketplace item being purchased.
The agreed price for the order.
Current order status. Starts as
PENDING on creation.Get order by ID
ADMIN role.
Authentication
Requires a valid JWT token.Path parameters
The numeric ID of the order to retrieve.
Example
Response fields
Unique identifier for the order.
The ID of the buyer.
The ID of the purchased item.
The agreed price for the order.
Current order status.
Error codes
| Status | Meaning |
|---|---|
403 | You are not the buyer or seller on this order. |
404 | No order exists with the given ID. |
Create order
PENDING.
Authentication
Requires a valid JWT token.Request body
The ID of the item to order.
The agreed price for the transaction.
Example
Response fields
The newly created order’s ID.
The ID of the authenticated user who placed the order.
The ID of the ordered item.
The price recorded for this order.
Always
PENDING on a newly created order.Error codes
| Status | Meaning |
|---|---|
400 | Missing or invalid request body fields. |
404 | No item exists with the given itemId. |
Update order status
Authentication
Requires a valid JWT token.Path parameters
The numeric ID of the order to update.
Query parameters
The new status value to set on the order (e.g.,
COMPLETED, CANCELLED).Example
Error codes
| Status | Meaning |
|---|---|
403 | You are not a party to this order. |
404 | No order exists with the given ID. |
Order messages
Buyers and sellers can exchange messages within an order using the nested/orders/{orderId}/messages endpoints. All requests require authentication.
Get messages for an order
The numeric ID of the order whose messages to retrieve.
Send a message
The numeric ID of the order to message on.
The message text to send.
Unique identifier for the message.
The ID of the order this message belongs to.
The ID of the user who sent the message.
The message text.
ISO 8601 timestamp of when the message was sent.