v1

latestOpenAPI 3.1.0MITraw.githubusercontent.com2024-06-0581319.8 KB
Orders

Get all orders

Returns a list of orders

get/orders

Response

A list of orders

idinteger required
datestring date-time required
status'pending' | 'shipped' | 'delivered' required

Example response

[
  {
    "id": 1,
    "date": "2023-05-17T09:24:00Z",
    "status": "pending",
    "user": {
      "id": 1,
      "email": "user@example.com",
      "name": "John Doe"
    },
    "products": [
      {
        "id": 1,
        "title": "Clean Code",
        "description": "A Handbook of Agile Software Craftsmanship",
        "price": 2999,
        "category": "Programming",
        "author": {
          "id": 1,
          "name": "Robert C. Martin",
          "photo": "https://example.com/photos/robert.jpg",
          "biography": "Robert Cecil Martin, colloquially known as \"Uncle Bob\", is an American software engineer..."
        }
      },
      {
        "id": 2,
        "title": "The Hobbit",
        "description": "A fantasy novel by J.R.R. Tolkien",
        "price": 1599,
        "category": "Fantasy",
        "author": {
          "id": 2,
          "name": "J.R.R. Tolkien",
          "photo": "https://example.com/photos/tolkien.jpg",
          "biography": "John Ronald Reuel Tolkien was an English writer, poet, philologist, and academic..."
        }
      }
    ]
  }
]