Preview the membership switch

Deprecated

Required Scopes: `MEMBERSHIP_READ` Returns information about an impact of a membership switch of a given contract.

Endpoint

POST /v1/memberships/{customerId}/membership-switch/preview

Path Parameters

customerId required integer (int64)

The ID of the customer to preview the membership switch for

Query Parameters

studioId integer (int64)

An optional studio ID to retrieve studio-specific offer information for, such as pricing

Request Body application/json

required

The contract information used for the membership switch

configId integer(int64) required

Unique ID of the membership switch configuration

Example:  1234567890
membershipOfferTermId integer(int64) required

Unique ID of the membership switch offer term

Example:  1234567890
sourceContractId integer(int64) required

Unique ID of the contract which is being switched from

Example:  1234567890
startDate string(date) required

The start date of the contract

Example:  "2025-08-24"
notes

The notes related to the membership switch

Example:  "Some notes"
thirdPartyId

Unique ID of the third party contract in the third party system

Example:  "1000a"
selectedSelectableModuleIds array[integer(int64)]

The selected modules from the available selectable modules

selectedOptionalModuleIds array[integer(int64)]

The selected modules from the available optional modules

initialPaymentRequestToken

This token identifies a pre-authorized payment request. It acts as a reference to the payment session initiated by the user. It's not needed for preview endpoints.

Example:  "3JtyH5sakfn2V22vB0napNC2zWMlpFwS9gPQawuk7Jw1F00atOD0BA"

Responses

OK

Response Body application/json

Preview of the impact of a membership switch

contractVolumeInformation

Contains the total amount to be paid during the initial runtime of the contract and the average amounts per month and per the rate's payment frequency (e.g. 1 week)

totalContractVolume

Represents a financial data

amount required

Amount of the finance data tuple

Example:  20
currency string(ISO 4217) required

Currency of the finance data tuple

Example:  "EUR"
averagePaymentVolumePerMonth

Represents a financial data

amount required

Amount of the finance data tuple

Example:  20
currency string(ISO 4217) required

Currency of the finance data tuple

Example:  "EUR"
averagePaymentVolumePerPaymentFrequencyTerm

Represents a financial data

amount required

Amount of the finance data tuple

Example:  20
currency string(ISO 4217) required

Currency of the finance data tuple

Example:  "EUR"
ageAdjustedPrice

Represents a financial data

amount required

Amount of the finance data tuple

Example:  20
currency string(ISO 4217) required

Currency of the finance data tuple

Example:  "EUR"
moduleConsentTextBlocks array[object]

List of contract text blocks that are part of this membership switch.

id integer(int64)

The unique identifier of the text block

Example:  1234567890
title

The title of the text block

Example:  "Title of 1. text block"
text

The text of the text block

Example:  "Text of 1. text block"
order integer(int32)

The order of the text block in the contract

Example:  1
hasSignature

Text block configuration has a signature field. You have the option to show a signature input field and it will be added in the contract document. It is not a required field in magicline. It is up to your implementation if you add this field.

showCommunicationPrivacyOptions

Text block contains information about the communication privacy options. You are advised to show a matrix with communication settings in combination with this text block.

attachmentType

Indicates the type of attachment for this block

Allowed values:
NONE No text block
FILE File information available in `attachedDocument`
URL Url information available in `attachedExternalUrlDto`
CONTRACT_PDF_PREVIEW Contract PDF preview
Example:  "CONTRACT_PDF_PREVIEW"
attachedExternalUrlDto

Represents url information.

title required

Url title

Example:  "Example Resource"
url required

Url to access the resource

Example:  "https://some-url.com"
attachedDocument

Represents document information.

fileName required

Name of the file to download

Example:  "contract.pdf"
url required

Temporary valid download link. Expires after 5 hours.

Example:  "https://some-url.com"
rateBundleModuleId integer(int64)

The ID of the associated rate bundle module. Only set if this is a module consent text block.

Example:  1234567890
confirmationRequired
paymentPreview

Represents a preview of the payment schedule for a signup process.

paymentSchedule array[object]

Payment schedule entries in chronological order

dueDate string(date)

Due date of the payment in ISO-8601 format

Example:  "2025-12-31"
description

Description of the charge

Example:  "Contract Basic"
type

Type of membership payment

Allowed values:
CONTRACT_FEE Membership contract fee
STARTER_PACKAGE Membership starter package
FLAT_FEE Flat fee
MODULE_FEE Membership module fee
BONUS_PERIOD Bonus period
Example:  "MEMBERSHIP_FEE"
amount

Represents a financial data

amount required

Amount of the finance data tuple

Example:  20
currency string(ISO 4217) required

Currency of the finance data tuple

Example:  "EUR"
mandatoryOnSigning

Indicates if the payment is mandatory on signing

Example:  true
dueOnSigningAmount

Represents a financial data

amount required

Amount of the finance data tuple

Example:  20
currency string(ISO 4217) required

Currency of the finance data tuple

Example:  "EUR"
Validation of the request failed.

Response Body application/json

Error data

errorMessage required

Resolved message in the context-specific default locale

errorCode

Key for translation files

traceId

Datadog trace id

args array[object] deprecated

Arguments referenced by format specifiers while resolving the message from translation files

typedArgs array[object] deprecated

Same as `args` but with type information

value
type
Allowed values:
TIMESTAMP BOOLEAN DATE MONTH_DAY TIME TERM TERM_LIST INTEGER DECIMAL STRING MONEY LIMITABLE_CONFIG_PROPERTY I18N_KEY I18N_KEY_LIST PERMISSION_LIST ENUM AVAILABILITY_LIST
reference

Reference to validation error

Example:  "parent.child"
Authentication failed. No api-key, wrong api-key or wrong header name.

Response Body application/json

Error data

errorMessage required

Resolved message in the context-specific default locale

errorCode

Key for translation files

traceId

Datadog trace id

args array[object] deprecated

Arguments referenced by format specifiers while resolving the message from translation files

typedArgs array[object] deprecated

Same as `args` but with type information

value
type
Allowed values:
TIMESTAMP BOOLEAN DATE MONTH_DAY TIME TERM TERM_LIST INTEGER DECIMAL STRING MONEY LIMITABLE_CONFIG_PROPERTY I18N_KEY I18N_KEY_LIST PERMISSION_LIST ENUM AVAILABILITY_LIST
reference

Reference to validation error

Example:  "parent.child"
Authorization failed. The caller has no privilege to the given resource.

Response Body application/json

Error data

errorMessage required

Resolved message in the context-specific default locale

errorCode

Key for translation files

traceId

Datadog trace id

args array[object] deprecated

Arguments referenced by format specifiers while resolving the message from translation files

typedArgs array[object] deprecated

Same as `args` but with type information

value
type
Allowed values:
TIMESTAMP BOOLEAN DATE MONTH_DAY TIME TERM TERM_LIST INTEGER DECIMAL STRING MONEY LIMITABLE_CONFIG_PROPERTY I18N_KEY I18N_KEY_LIST PERMISSION_LIST ENUM AVAILABILITY_LIST
reference

Reference to validation error

Example:  "parent.child"
Entity does not exists.

Response Body application/json

Error data

errorMessage required

Resolved message in the context-specific default locale

errorCode

Key for translation files

traceId

Datadog trace id

args array[object] deprecated

Arguments referenced by format specifiers while resolving the message from translation files

typedArgs array[object] deprecated

Same as `args` but with type information

value
type
Allowed values:
TIMESTAMP BOOLEAN DATE MONTH_DAY TIME TERM TERM_LIST INTEGER DECIMAL STRING MONEY LIMITABLE_CONFIG_PROPERTY I18N_KEY I18N_KEY_LIST PERMISSION_LIST ENUM AVAILABILITY_LIST
reference

Reference to validation error

Example:  "parent.child"
Concurrent modification detected. The entity was modified by another request.

Response Body application/json

Error data

errorMessage required

Resolved message in the context-specific default locale

errorCode

Key for translation files

traceId

Datadog trace id

args array[object] deprecated

Arguments referenced by format specifiers while resolving the message from translation files

typedArgs array[object] deprecated

Same as `args` but with type information

value
type
Allowed values:
TIMESTAMP BOOLEAN DATE MONTH_DAY TIME TERM TERM_LIST INTEGER DECIMAL STRING MONEY LIMITABLE_CONFIG_PROPERTY I18N_KEY I18N_KEY_LIST PERMISSION_LIST ENUM AVAILABILITY_LIST
reference

Reference to validation error

Example:  "parent.child"
Access denied - rate limit is exceeded.

Response Body application/json

Error data

errorMessage required

Resolved message in the context-specific default locale

errorCode

Key for translation files

traceId

Datadog trace id

args array[object] deprecated

Arguments referenced by format specifiers while resolving the message from translation files

typedArgs array[object] deprecated

Same as `args` but with type information

value
type
Allowed values:
TIMESTAMP BOOLEAN DATE MONTH_DAY TIME TERM TERM_LIST INTEGER DECIMAL STRING MONEY LIMITABLE_CONFIG_PROPERTY I18N_KEY I18N_KEY_LIST PERMISSION_LIST ENUM AVAILABILITY_LIST
reference

Reference to validation error

Example:  "parent.child"
Unexpected system error.

Response Body application/json

Error data

errorMessage required

Resolved message in the context-specific default locale

errorCode

Key for translation files

traceId

Datadog trace id

args array[object] deprecated

Arguments referenced by format specifiers while resolving the message from translation files

typedArgs array[object] deprecated

Same as `args` but with type information

value
type
Allowed values:
TIMESTAMP BOOLEAN DATE MONTH_DAY TIME TERM TERM_LIST INTEGER DECIMAL STRING MONEY LIMITABLE_CONFIG_PROPERTY I18N_KEY I18N_KEY_LIST PERMISSION_LIST ENUM AVAILABILITY_LIST
reference

Reference to validation error

Example:  "parent.child"