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 |
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 | MembershipType | A reference to a MembershipType | { id: "... } | |
payerId | string (UUIDv4) | null | A reference to a Customer that is the payer of the membership | "bd4a0997-39db-41d9-883a-cdfa83e2101f" |
customerId | string (UUIDv4) | A reference to a Customer that owns the membership | "bd4a0997-39db-41d9-883a-cdfa83e2101f" | |
changeLog | array | [] | A list of MembershipChangeLogItem. This will only be available on /memberships/:membershipId | [] |
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" } |