Skip to main content

Get Order Details (Customer)

Retrieves complete details for a specific order.

Path Parameters

orderId
string (uuid)
required
Order identifier

Response

id
string (uuid)
Order identifier
orderNumber
string
Human-readable order number
status
string
Order status (Pending, Processing, Shipped, Delivered, Cancelled)
createdAt
string (datetime)
Order creation timestamp
totalAmount
number
Total order amount
deliveryAddress
object
Delivery address details
deliveryMethod
object
Delivery method information
items
array
Array of order items with product details
paymentStatus
string
Payment status (Pending, Paid, Failed, Refunded)

Response Codes

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

Examples

curl -X GET "https://your-server.com/api/orders/order-uuid/details" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Success Response Example

{
  "id": "order-uuid",
  "orderNumber": "WF-2024-00123",
  "status": "Processing",
  "createdAt": "2024-01-15T10:30:00Z",
  "totalAmount": 459.98,
  "paymentStatus": "Paid",
  "deliveryAddress": {
    "street": "123 Main St",
    "city": "New York",
    "state": "NY",
    "zipCode": "10001",
    "country": "USA"
  },
  "deliveryMethod": {
    "id": "delivery-method-uuid",
    "name": "Standard Shipping",
    "estimatedDays": "3-5 business days",
    "cost": 9.99
  },
  "items": [
    {
      "id": "item-1",
      "productId": "product-uuid",
      "productName": "Premium Wireless Headphones",
      "productImage": "https://cdn.example.com/products/headphones.jpg",
      "quantity": 1,
      "unitPrice": 249.99,
      "totalPrice": 249.99,
      "sellerId": "seller-uuid",
      "sellerName": "AudioPro Shop"
    },
    {
      "id": "item-2",
      "productId": "product-uuid-2",
      "productName": "USB-C Cable",
      "productImage": "https://cdn.example.com/products/cable.jpg",
      "quantity": 2,
      "unitPrice": 100.00,
      "totalPrice": 200.00,
      "sellerId": "seller-uuid-2",
      "sellerName": "TechGear Store"
    }
  ]
}

Get Customer Orders (Customer)

Retrieves all orders for a specific customer.

Path Parameters

customerId
string (uuid)
required
Customer identifier (must match authenticated user)

Response

orders
array
Array of customer order objects

Response Codes

  • 200 OK - Orders retrieved
  • 404 Not Found - Customer not found

Examples

curl -X GET "https://your-server.com/api/orders/customer-uuid" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Success Response Example

[
  {
    "id": "order-1",
    "orderNumber": "WF-2024-00123",
    "status": "Delivered",
    "createdAt": "2024-01-15T10:30:00Z",
    "totalAmount": 459.98,
    "itemCount": 3,
    "paymentStatus": "Paid"
  },
  {
    "id": "order-2",
    "orderNumber": "WF-2024-00089",
    "status": "Processing",
    "createdAt": "2024-01-20T14:15:00Z",
    "totalAmount": 129.99,
    "itemCount": 1,
    "paymentStatus": "Paid"
  }
]

Get Seller Orders (Seller)

Retrieves all order items for products belonging to a specific seller.

Path Parameters

sellerId
string (uuid)
required
Seller identifier (must match authenticated seller)

Response

orderItems
array
Array of order items for this seller’s products

Response Codes

  • 200 OK - Order items retrieved
  • 404 Not Found - Seller not found

Examples

curl -X GET "https://your-server.com/api/orders/sellers/seller-uuid" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Success Response Example

[
  {
    "id": "order-item-1",
    "orderId": "order-uuid",
    "orderNumber": "WF-2024-00123",
    "orderDate": "2024-01-15T10:30:00Z",
    "productId": "product-uuid",
    "productName": "Premium Wireless Headphones",
    "quantity": 1,
    "unitPrice": 249.99,
    "totalPrice": 249.99,
    "status": "Processing",
    "customerId": "customer-uuid",
    "customerName": "John Doe",
    "deliveryAddress": {
      "street": "123 Main St",
      "city": "New York",
      "state": "NY",
      "zipCode": "10001"
    }
  }
]

Order Status Values

Orders progress through the following statuses:
  • Pending - Order created, awaiting payment confirmation
  • Processing - Payment confirmed, order being prepared
  • Shipped - Order has been shipped to customer
  • Delivered - Order delivered to customer
  • Cancelled - Order cancelled by customer or seller
  • Refunded - Order refunded to customer

Payment Status Values

  • Pending - Payment not yet completed
  • Paid - Payment successfully received
  • Failed - Payment attempt failed
  • Refunded - Payment refunded to customer

Order Management Tips

For Customers

Track your orders in real-time by checking order status regularly. You’ll receive notifications for status updates.

For Sellers

Process orders promptly to maintain good customer satisfaction. Update order status as items are prepared and shipped.
Sellers are responsible for updating order status and providing tracking information to customers.

Build docs developers (and LLMs) love