Order Line
An OrderLine is one thing sold on an order: a membership, a ticket, an event ticket, a product, a gift card or a donation. Order lines show what the museum sold and what it brought in. Add up amount per type to see how much the museum made on each kind of thing, as shown in List Order Lines.
How the money is written:
- Amounts are in minor units (øre/cents) and include VAT, unless the name says otherwise.
- A refund doesn't change the lines it refunds. It adds a negative copy of each line on the order, dated when the refund was made and carrying the refund's
refundId. The original line keeps its date and getsrefundedAt. - A return at the till is a line of its own, with negative amounts and
isReturnset. - So the sum of
amountover a period is what that period brought in, with the period's refunds and returns already taken off.
| Property | Type | Default | Description | Example |
|---|---|---|---|---|
id* | string (UUIDv4) | Unique identifier | "9b1c2d3e-4f5a-4b6c-8d7e-0f1a2b3c4d5e" | |
orderId* | string (UUIDv4) | The order the line was sold on | "f0a52c7e-9e04-4bb4-bd38-1bb88e1dd0e4" | |
date* | string | When the order was completed. On a refund line: when the refund was made | "2026-10-15T10:30:00.000Z" | |
type* | string | What was sold: MEMBERSHIP, TICKET, EVENT_TICKET, PRODUCT, GIFTCARD or DONATION. See Types below | "MEMBERSHIP" | |
grossAmount | number | null | The full price incl. VAT, before discounts | 50000 |
discountAmount | number | null | The discount given on the line | 10000 |
amount | number | null | What the customer paid for the line incl. VAT, after discounts and credits. Add this up for revenue | 40000 |
vatAmount | number | null | The VAT in amount | 8000 |
bookingFeeAmount | number | null | Event tickets only: the booking fee paid on top of the ticket, incl. VAT. Not part of amount. See Booking fees below | 1300 |
bookingFeeVatAmount | number | null | The VAT in bookingFeeAmount | 300 |
isReturn | boolean | false | Whether the line is a return at the till. Its amounts are negative | false |
refundId | string (UUIDv4) | null | Set on the negative copy a refund adds: the refund it belongs to. null on sold lines | null |
refundedAt | string | null | Set on a sold line once its order has been refunded: when the refund was made | "2026-10-20T08:12:00.000Z" |
membershipTypeId | string (UUIDv4) | null | The membership type, on MEMBERSHIP lines and on GIFTCARD lines for a membership gift card | "0c1de555-6f74-4a83-91b0-0f6594306ac1" |
ticketTypeId | string (UUIDv4) | null | The ticket type, on TICKET lines | null |
timeSlotId | string (UUIDv4) | null | The time slot a ticket is for, on TICKET lines with a time slot | null |
eventId | string (UUIDv4) | null | The event, or the date of an event series, on EVENT_TICKET lines | null |
eventTicketTypeId | string (UUIDv4) | null | The event ticket type, on EVENT_TICKET lines | null |
productId | string (UUIDv4) | null | The product, on PRODUCT lines | null |
cashRegisterId | string (UUIDv4) | null | The till the line was sold at. null when it wasn't sold at a till, such as online | null |
testMode | boolean | Whether the line is a test record. Only included when the request is made with a test mode API key | true |
{ "id": "9b1c2d3e-4f5a-4b6c-8d7e-0f1a2b3c4d5e", "orderId": "f0a52c7e-9e04-4bb4-bd38-1bb88e1dd0e4", "date": "2026-10-15T10:30:00.000Z", "type": "MEMBERSHIP", "grossAmount": 50000, "discountAmount": 10000, "amount": 40000, "vatAmount": 8000, "bookingFeeAmount": null, "bookingFeeVatAmount": null, "isReturn": false, "refundId": null, "refundedAt": null, "membershipTypeId": "0c1de555-6f74-4a83-91b0-0f6594306ac1", "ticketTypeId": null, "timeSlotId": null, "eventId": null, "eventTicketTypeId": null, "productId": null, "cashRegisterId": null }
Types
type | What was sold | Points at |
|---|---|---|
MEMBERSHIP | A membership: a new one, a renewal or a change | membershipTypeId |
TICKET | An admission ticket | ticketTypeId, timeSlotId |
EVENT_TICKET | A ticket for an event | eventId, eventTicketTypeId |
PRODUCT | A product, such as one sold in the shop | productId |
GIFTCARD | A gift card: a membership gift card (membershipTypeId is set) or a value gift card | membershipTypeId |
DONATION | A donation |
Gift cards and credits
- Value gift cards count as revenue when they're spent, not when they're sold. Selling one adds a
GIFTCARDline without amembershipTypeId. What the card is later spent on shows up as ordinary lines, paid with aGIFTCARDpayment. Adding up every type counts that money twice, so leave theseGIFTCARDlines out of revenue. - Membership gift cards carry their money on the
GIFTCARDline from when the card was sold, which has the card'smembershipTypeId. The membership it's later redeemed for comes through as aMEMBERSHIPline with anamountof 0. - Credits:
grossAmount − discountAmount − amountis the credit a line got: a membership gift card, a ticket upgraded to a membership, or what was left of a membership that was changed.
Booking fees
On event tickets the guest can pay a booking fee on top of the ticket. It's in bookingFeeAmount, not in amount, because it's Loby's fee and not the museum's revenue. The order's payments include it.
Order lines and payments
An order's payments add up to its lines' amount plus any booking fees. Cash payments can differ by cash rounding. Match lines and payments on orderId.