Attributes
| Name | Type | Description |
|---|---|---|
| id | Integer | Automatically set |
| created_at | Datetime | Automatically set |
| updated_at | Datetime | Automatically set |
| person_id | Integer | |
| state | String | pending, confirmed or cancelled |
| total | Decimal | Total amount before discount |
| discount_amount | Decimal | Discount from applied coupon |
| coupon_id | Integer | Applied coupon |
| paid_amount | Decimal | Total amount paid |
| settled_at | Datetime | Set when order is fully paid |
| balance | Decimal | Calculated. payable_amount - paid_amount |
| payable_amount | Decimal | Calculated. total - discount_amount |
The response includes nested person and order_line_items.
Person
| Name | Type | Description |
|---|---|---|
| id | Integer | |
| name | String | |
| String |
Order line items
| Name | Type | Description |
|---|---|---|
| id | Integer | |
| service_id | Integer | |
| quantity | Integer | |
| amount | Decimal | Unit price |
| gift_card_id | Integer | Associated gift card if applicable |
| booking_id | Integer | Associated booking if applicable |
Listing
GET /orders will return all orders. Orders are read-only via the API.
Response
[
{
"order": {
"id": 1,
"person_id": 38,
"state": "confirmed",
"total": "1000.0",
"discount_amount": "0.0",
"coupon_id": null,
"paid_amount": "0.0",
"settled_at": null,
"created_at": "2026-03-26T10:00:00+02:00",
"updated_at": "2026-03-26T10:00:00+02:00",
"balance": "1000.0",
"payable_amount": "1000.0",
"person": {
"id": 38,
"name": "Espen Antonsen",
"email": "espen@example.com"
},
"order_line_items": [
{
"id": 1,
"service_id": 37,
"quantity": 1,
"amount": "1000.0",
"gift_card_id": null,
"booking_id": null
}
]
}
}
]
Query Parameters
| Name | Type | Description |
|---|---|---|
| state | String | Filter by state: pending, confirmed or cancelled |
| person_id | Integer | Filter by person |
Get order
GET /orders/{order_id} will get an order with id {order_id}.