Skip to main content
GET
/
orders
/
{id}
Get Order
curl --request GET \
  --url https://api.example.com/orders/{id}
{
  "id": "<string>",
  "items": [
    {
      "productId": "<string>",
      "count": 123,
      "itemPrice": 123
    }
  ],
  "totalPrice": 123,
  "status": "<string>",
  "address": {
    "province": "<string>",
    "city": "<string>",
    "detail": "<string>"
  },
  "createdAt": {}
}
Retrieves detailed information about a specific order.

Path Parameters

id
string
required
The unique identifier of the order to retrieve.

Response

id
string
The unique identifier of the order.
items
array
List of items in the order.
productId
string
The ID of the product.
count
integer
The quantity ordered.
itemPrice
decimal
The unit price of the product.
totalPrice
decimal
The total price of the order.
status
string
The current status of the order (e.g., CREATED, PAID, SHIPPED).
address
object
The delivery address for the order.
province
string
Province or state.
city
string
City name.
detail
string
Detailed address information.
createdAt
timestamp
The timestamp when the order was created (ISO 8601 format).

Status Codes

  • 200 OK - Order retrieved successfully
  • 404 Not Found - Order not found

Error Responses

Order Not Found (404)

{
  "code": "ORDER_NOT_FOUND",
  "message": "没有找到订单",
  "orderId": "order_123"
}

Example Request

curl -X GET https://api.example.com/orders/order_abc123def456 \
  

Example Response

{
  "id": "order_abc123def456",
  "items": [
    {
      "productId": "prod_123456",
      "count": 2,
      "itemPrice": 29.99
    },
    {
      "productId": "prod_789012",
      "count": 1,
      "itemPrice": 49.99
    }
  ],
  "totalPrice": 109.97,
  "status": "CREATED",
  "address": {
    "province": "California",
    "city": "San Francisco",
    "detail": "123 Market St, Suite 400"
  },
  "createdAt": "2026-03-04T10:30:00Z"
}

Build docs developers (and LLMs) love