Create subscription

Subscribes to a loyalty program

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Path parameters

pidstringRequiredformat: "uuid"
Loyalty Program ID. A unique identifier for the loyalty program.

Request

Create Subscription Payload
contactIdlongRequired>=1

Required contact ID; must be greater than 0.

loyaltySubscriptionIdstringOptional<=64 characters

Optional subscription ID (max length 64).

creationDatedatetimeOptional

Optional creation date in ISO 8601 format (YYYY-MM-DDThh:mm:ss.ffffff+HH:MM). Must be in the past.

metamap from strings to anyOptional
Optional metadata associated with the subscription.

Response

Successfully created subscription.
organizationIdlongOptional
Unique identifier of the organization.
loyaltyProgramIdstringOptionalformat: "uuid"
Unique identifier of the loyalty program.
versionIdintegerOptional
Version number of the subscription.
contactIdlongOptional
Unique identifier of the contact.
loyaltySubscriptionIdstringOptional
Unique identifier of the subscription.
metamap from strings to anyOptional
Metadata associated with the subscription.
createdAtdatetimeOptional
Timestamp when the subscription was created.
updatedAtdatetimeOptional
Timestamp when the subscription was last updated.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error