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 gets refundedAt.
  • A return at the till is a line of its own, with negative amounts and isReturn set.
  • So the sum of amount over a period is what that period brought in, with the period's refunds and returns already taken off.
PropertyTypeDefaultDescriptionExample
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*stringWhen the order was completed. On a refund line: when the refund was made"2026-10-15T10:30:00.000Z"
type*stringWhat was sold: MEMBERSHIP, TICKET, EVENT_TICKET, PRODUCT, GIFTCARD or DONATION. See Types below"MEMBERSHIP"
grossAmountnumbernullThe full price incl. VAT, before discounts50000
discountAmountnumbernullThe discount given on the line10000
amountnumbernullWhat the customer paid for the line incl. VAT, after discounts and credits. Add this up for revenue40000
vatAmountnumbernullThe VAT in amount8000
bookingFeeAmountnumbernullEvent tickets only: the booking fee paid on top of the ticket, incl. VAT. Not part of amount. See Booking fees below1300
bookingFeeVatAmountnumbernullThe VAT in bookingFeeAmount300
isReturnbooleanfalseWhether the line is a return at the till. Its amounts are negativefalse
refundIdstring (UUIDv4)nullSet on the negative copy a refund adds: the refund it belongs to. null on sold linesnull
refundedAtstringnullSet on a sold line once its order has been refunded: when the refund was made"2026-10-20T08:12:00.000Z"
membershipTypeIdstring (UUIDv4)nullThe membership type, on MEMBERSHIP lines and on GIFTCARD lines for a membership gift card"0c1de555-6f74-4a83-91b0-0f6594306ac1"
ticketTypeIdstring (UUIDv4)nullThe ticket type, on TICKET linesnull
timeSlotIdstring (UUIDv4)nullThe time slot a ticket is for, on TICKET lines with a time slotnull
eventIdstring (UUIDv4)nullThe event, or the date of an event series, on EVENT_TICKET linesnull
eventTicketTypeIdstring (UUIDv4)nullThe event ticket type, on EVENT_TICKET linesnull
productIdstring (UUIDv4)nullThe product, on PRODUCT linesnull
cashRegisterIdstring (UUIDv4)nullThe till the line was sold at. null when it wasn't sold at a till, such as onlinenull
testModebooleanWhether the line is a test record. Only included when the request is made with a test mode API keytrue
Copy
{ "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

typeWhat was soldPoints at
MEMBERSHIPA membership: a new one, a renewal or a changemembershipTypeId
TICKETAn admission ticketticketTypeId, timeSlotId
EVENT_TICKETA ticket for an eventeventId, eventTicketTypeId
PRODUCTA product, such as one sold in the shopproductId
GIFTCARDA gift card: a membership gift card (membershipTypeId is set) or a value gift cardmembershipTypeId
DONATIONA donation

Gift cards and credits

  • Value gift cards count as revenue when they're spent, not when they're sold. Selling one adds a GIFTCARD line without a membershipTypeId. What the card is later spent on shows up as ordinary lines, paid with a GIFTCARD payment. Adding up every type counts that money twice, so leave these GIFTCARD lines out of revenue.
  • Membership gift cards carry their money on the GIFTCARD line from when the card was sold, which has the card's membershipTypeId. The membership it's later redeemed for comes through as a MEMBERSHIP line with an amount of 0.
  • Credits: grossAmount − discountAmount − amount is 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.

‹ Previous
Order
Next ›
Payment