Programs

Create program member

Enrolls a customer as a member of the loyalty program. The program must be in the ACTIVE status (returns a 423 error otherwise) and the customer must exist in Voucherify. A customer can be a member of a given program only once - creating a second member for the same customer ID returns 409 error (member_already_exists).

Loyalty cards are created automatically for all card definitions assigned to the program and returned in the cards array. Card code generation is asynchronous: code may be null immediately after creation.

post/v2/loyalties/programs/{programId}/members

Request body

status'ACTIVE' | 'INACTIVE' nullable

Initial member status. Defaults to ACTIVE when omitted or null.

metadataobject nullable

Free-form metadata attached to the member. Validated against the metadata schema defined for the vl_member related object (when one is configured). Defaults to an empty object.

Response

The created member with its automatically created cards.

idstring required

Identifies the member.

customer_idstring required

Identifies the enrolled customer.

program_idstring required

Identifies the loyalty program.

status'ACTIVE' | 'INACTIVE' | 'DELETED' required

Current member status. Allowed values: ACTIVE, INACTIVE, DELETED. INACTIVE members cannot earn points or redeem rewards.

metadataobject required

Stores custom member metadata. Empty object when none is set.

created_atstring date-time required

Records when the member was created (ISO 8601).

updated_atstring date-time nullable required

Records the last update (ISO 8601). null if the member has never been updated.

object'member' required

Object type. Always member.

Changes

Changed in 7 of the 62 revisions of this API.251621

    • deleted the path request parameter programId

      request-parameter-removed

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • v2dde32dd225f411See the full diff
    • the response's body type changed from no type to object for status

      response-body-type-changed

    • added to the response body allOf list for the response status

      response-body-all-of-added

    This revision also has 63 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • v29bde8832a02711See the full diff
    • removed the request property ////

      request-property-removed

    • added the new optional request property ////

      new-optional-request-property

  • v2703a0a42ea43131See the full diff
    • added to the request body allOf list

      request-body-all-of-added

    • removed the request property

      request-property-removed

    • removed the request property

      request-property-removed

    • removed the request property

      request-property-removed

    • removed subschema #2 from the response body allOf list for the response status

      response-body-all-of-removed

    This revision also has 10 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • response property allOf[subschema #2]/cards list-of-types was narrowed by removing types null from media type application/json of response 200

      response-property-list-of-types-narrowed

    • removed the required property //// from the response with the status

      response-required-property-removed

  • v2341403eb19e522117See the full diff
    • added the pattern ^lprg_[a-f0-9]+$ to the path request parameter programId

      request-parameter-pattern-added

    • the request property became not nullable

      request-property-became-not-nullable

    • removed the enum value ACTIVE of the request property

      request-property-enum-value-removed

    • removed the enum value INACTIVE of the request property

      request-property-enum-value-removed

    • removed the enum value undefined of the request property

      request-property-enum-value-removed

    • removed from the request property oneOf list

      request-property-one-of-removed

    • the response property became optional for the status

      response-property-became-optional

    • the response property became optional for the status

      response-property-became-optional

    • the response property became optional for the status

      response-property-became-optional

    • the response property became optional for the status

      response-property-became-optional

    • the response property became optional for the status

      response-property-became-optional

    • the response property became optional for the status

      response-property-became-optional

    • the response property became optional for the status

      response-property-became-optional

    • the response property became optional for the status

      response-property-became-optional

    • the response property became optional for the status

      response-property-became-optional

    • the response property became optional for the status

      response-property-became-optional

    • the response property became optional for the status

      response-property-became-optional

    • the response property became optional for the status

      response-property-became-optional

    • the response property became optional for the status

      response-property-became-optional

    • the response property became optional for the status

      response-property-became-optional

    • the response property became optional for the status

      response-property-became-optional

    • response property allOf[subschema #2]/cards list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • changed the pattern of the request property from ^cust_[A-Za-z0-9]+$ to ^cust_[a-zA-Z0-9]+

      request-property-pattern-changed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • api operation id createMember removed and replaced with createProgramMember

      api-operation-id-removed

    • the request property default value {} was added

      request-property-default-value-added

    • request property list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • added subschema #1 to the request property oneOf list

      request-property-one-of-added

    • added to the response body allOf list for the response status

      response-body-all-of-added

    • removed from the response body allOf list for the response status

      response-body-all-of-removed

    • the response property / became required for the status

      response-property-became-required

    This revision also has 292 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog