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.
organizationIdlong
Unique identifier of the organization.
loyaltyProgramIdstringformat: "uuid"
Unique identifier of the loyalty program.
versionIdinteger
Version number of the subscription.
contactIdlong
Unique identifier of the contact.
loyaltySubscriptionIdstring
Unique identifier of the subscription.
metamap from strings to any
Metadata associated with the subscription.
createdAtdatetime
Timestamp when the subscription was created.
updatedAtdatetime
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