Skip to content

Latest commit

 

History

History
104 lines (89 loc) · 3.36 KB

File metadata and controls

104 lines (89 loc) · 3.36 KB
title Orders
nav_order 11
description API reference for the Makeplans orders endpoint — attributes and operations for managing orders.

Attributes

NameTypeDescription
idIntegerAutomatically set
created_atDatetimeAutomatically set
updated_atDatetimeAutomatically set
person_idInteger
stateStringpending, confirmed or cancelled
totalDecimalTotal amount before discount
discount_amountDecimalDiscount from applied coupon
coupon_idIntegerApplied coupon
paid_amountDecimalTotal amount paid
settled_atDatetimeSet when order is fully paid
balanceDecimalCalculated. payable_amount - paid_amount
payable_amountDecimalCalculated. total - discount_amount

The response includes nested person and order_line_items.

Person

NameTypeDescription
idInteger
nameString
emailString

Order line items

NameTypeDescription
idInteger
service_idInteger
quantityInteger
amountDecimalUnit price
gift_card_idIntegerAssociated gift card if applicable
pass_idIntegerAssociated pass if applicable
subscription_idIntegerAssociated subscription if applicable
booking_idIntegerAssociated booking if applicable

Listing

GET /orders will return all orders. The listing is paginated. 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,
          "pass_id": null,
          "subscription_id": null,
          "booking_id": null
        }
      ]
    }
  }
]

Query Parameters

NameTypeDescription
stateStringFilter by state: pending, confirmed or cancelled
person_idIntegerFilter by person

Get order

GET /orders/{order_id} will get an order with id {order_id}.