Membership
A Membership represents an entered membership, that has a MembershipType. A Membership can e.g. be used to get benefits or to get access to the museum.
| Property | Type | Default | Description | Example |
|---|---|---|---|---|
id* | string (UUIDv4) | Unique identifier | "bd4a0997-39db-41d9-883a-cdfa83e2101f" | |
createdAt | string | Timestamp when the membership was created | "2024-01-15T09:30:00.000Z" | |
updatedAt | string | Timestamp when the membership was last updated | "2024-01-15T09:30:00.000Z" | |
validFrom | string (YYYY-MM-DD) | null | Date for when the membership starts | 2024-04-05 |
validTo | string (YYYY-MM-DD) | null | Date for when the membership will expire. Including the date | 2025-04-05 |
active | boolean | Whether the membership is valid or not. This is a convenience property that is calculated from validFrom and validTo | true | |
autoRenew | boolean | false | Shows whether the membership will be auto renewed | true |
autoRenewed | boolean | false | Whether this membership was created by an automatic renewal | true |
previousMembershipId | string (UUIDv4) | null | Id of the previous membership this one renews. If set, this membership is a renewal | "bd4a0997-39db-41d9-883a-cdfa83e2101f" |
renewal | boolean | false | Whether this membership is a renewal. Convenience property derived from previousMembershipId | true |
preferredRenewalMembershipTypeId | string (UUIDv4) | null | This field can be used to determine which membership type should be used for the renewal | "bd4a0997-39db-41d9-883a-cdfa83e2101f" |
membershipType | object | Nested membership type. This is a subset: id, title, cycle, price, optional renewalPrice (only when renewal price is enabled), and origin (the membership's origin, not a field on MembershipType itself). | { "id": "...", "title": "Yearly", "cycle": "YEARLY", "price": 54000, "origin": "WEB" } | |
customerId | string (UUIDv4) | A reference to a Customer that owns the membership | "bd4a0997-39db-41d9-883a-cdfa83e2101f" | |
secondaryCustomerId | string (UUIDv4) | null | A reference to a secondary Customer on the membership (e.g. partner memberships) | "bd4a0997-39db-41d9-883a-cdfa83e2101f" |
order | Order | null | The order this membership was purchased on, if any. Includes id and salesChannelType | { "id": "...", "salesChannelType": "WEB" } |
changeLog | array | [] | A list of MembershipChangeLogItem. This will only be available on /memberships/:membershipId | [] |
extensions | array | [] | A list of MembershipExtension: the extensions chosen on this membership, in the membership type's order. Only extensions with at least one chosen product are listed | [] |
payerId is accepted on create only. It is not returned on membership responses.
Membership Extension
A MembershipExtension is an extension on the membership type (for example "Castles") with the products the member chose from it. An extension can include a number of units in the membership price. The cheapest chosen units are the included ones.
| Property | Type | Default | Description | Example |
|---|---|---|---|---|
id* | string (UUIDv4) | Unique identifier of the extension | "8c1f2a3e-5b6d-4e7f-9a0b-1c2d3e4f5a6b" | |
title | string | "" | Title of the extension | "Castles" |
description | string | "" | Description of the extension | "Choose the castles you want access to" |
includedQuantity | number | 0 | How many units the extension includes in the membership price | 1 |
quantity | number | Total units chosen across the extension's products | 2 | |
paidQuantity | number | Chosen units that are not included (quantity minus the included units) | 1 | |
products | array | [] | A list of MembershipExtensionProduct | [] |
Membership Extension Product
| Property | Type | Default | Description | Example |
|---|---|---|---|---|
id* | string (UUIDv4) | Id of the chosen product | "2f6e4b1a-9c3d-4a8e-b7f5-0d1c2e3f4a5b" | |
title | string | "" | Title shown for the product in the extension, falling back to the product name | "Kronborg" |
description | string | "" | Description shown for the product in the extension, falling back to the product description | "" |
quantity | number | Units of this product chosen | 1 | |
includedQuantity | number | Units of this product included in the membership price | 1 | |
paidQuantity | number | Units of this product that are not included | 0 | |
price | number | 0 | The product's current price per unit in lowest unit (cents for EUR, øre for DKK). This is not necessarily what the member paid. Look at the order for that | 5000 |
"extensions": [ { "id": "8c1f2a3e-5b6d-4e7f-9a0b-1c2d3e4f5a6b", "title": "Castles", "description": "", "includedQuantity": 1, "quantity": 2, "paidQuantity": 1, "products": [ { "id": "2f6e4b1a-9c3d-4a8e-b7f5-0d1c2e3f4a5b", "title": "Kronborg", "description": "", "quantity": 1, "includedQuantity": 1, "paidQuantity": 0, "price": 5000 }, { "id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d", "title": "Frederiksborg", "description": "", "quantity": 1, "includedQuantity": 0, "paidQuantity": 1, "price": 5000 } ] } ]
Membership Change Log Item
A MembershipChangeLogItem represents a change log item for a membership.
| Property | Type | Default | Description | Example |
|---|---|---|---|---|
id* | string (UUIDv4) | Unique identifier | "e4ee88c7-c5a1-4cf2-8794-741b7f1e2ad5" | |
date | string (ISO 8601) | Timestamp of when the change occurred | "2025-02-07 12:02:56.048Z" | |
type | string | Type of change that occurred. Can be SET_AUTO_RENEW, SET_ORIGINAL, etc. | "SET_AUTO_RENEW" | |
props | object | {} | Properties that were changed in this log entry | { "autoRenew": false } |
actor | object | null | Information about who made the change | { "customerId": "b4495211-9623-41ae-bd6a-9c5aa67c6344" } |