Download OpenAPI specification:
Order REST API Documentation
Place an order
the order data
| customerId required | integer |
required | Array of objects (PurchaseOrderItem) |
{- "customerId": 215,
- "items": [
- {
- "isbn": "0764574833",
- "quantity": 1
}
]
}{- "id": 5028,
- "date": "2025-06-01T08:20:00",
- "amount": 57.5,
- "status": "ACCEPTED",
- "customer": {
- "id": 215,
- "firstName": "Alice",
- "lastName": "Smith",
- "email": "smith@example.org"
}, - "address": {
- "street": "123 Maple Street",
- "city": "Mill Valley",
- "stateProvince": "CA",
- "postalCode": "90952",
- "country": "US"
}, - "payment": {
- "date": "2025-06-01T08:20:00",
- "amount": 57.5,
- "creditCardNumber": "5400000000000005",
- "transactionId": "550e8400-e29b-11d4-a716-446655440000"
}, - "items": [
- {
- "book": {
- "isbn": "0764574833",
- "title": "Professional Java Development with the Spring Framework",
- "authors": "Rod Johnson, Juergen Hoeller, et al.",
- "publisher": "Wrox",
- "price": 57.5
}, - "quantity": 1
}
]
}Search for orders
| customerId required | integer Example: customerId=215 the customer identifier |
| year required | integer >= 2000 Example: year=2025 the year of the orders |
[- {
- "id": 5014,
- "date": "2025-06-01T08:19:50",
- "amount": 57.5,
- "status": "CANCELED"
}, - {
- "id": 5028,
- "date": "2025-06-01T08:20:00",
- "amount": 57.5,
- "status": "SHIPPED"
}
]Find an order
| id required | integer Example: 5028 the order identifier |
{- "id": 5028,
- "date": "2025-06-01T08:20:00",
- "amount": 57.5,
- "status": "SHIPPED",
- "customer": {
- "id": 215,
- "firstName": "Alice",
- "lastName": "Smith",
- "email": "smith@example.org"
}, - "address": {
- "street": "123 Maple Street",
- "city": "Mill Valley",
- "stateProvince": "CA",
- "postalCode": "90952",
- "country": "US"
}, - "payment": {
- "date": "2025-06-01T08:20:00",
- "amount": 57.5,
- "creditCardNumber": "5400000000000005",
- "transactionId": "550e8400-e29b-11d4-a716-446655440000"
}, - "items": [
- {
- "book": {
- "isbn": "0764574833",
- "title": "Professional Java Development with the Spring Framework",
- "authors": "Rod Johnson, Juergen Hoeller, et al.",
- "publisher": "Wrox",
- "price": 57.5
}, - "quantity": 1
}
]
}