Retail and Restaurant POS API

POST Enroll member to loyalty program

POST /members

Enrolls a member to the Loyalty program.

Parameters

  • Authorization (header, string, required) Access token, which is used to make requests to secure resources.

Request body

Media type: application/json. Schema: member-enrollment-request.

Example

enrollmentDate: 2021-01-01T00:00:00
membershipNumber: Member1
associatedContactDetails:
  firstName: Name1
  lastName: Name2
  email: ab@email.com
  allowDuplicateRecords: "false"
  additionalContactFieldValues:
    attributes:
      PersonMailingCity: Delhi
      CustomNumber__c: "20.0"
memberStatus: Active
referredBy: Member2
referredByMemberReferralCode: MPX12adf
createTransactionJournals: "true"
transactionJournalStatementFrequency: Monthly
transactionJournalStatementMethod: Mail
enrollmentChannel: Email
canReceivePromotions: "true"
canReceivePartnerPromotions: "true"
membershipEndDate: 2022-01-01T00:00:00
relatedCorporateMembershipNumber: Member3
additionalMemberFieldValues:
  attributes:
    CustomBoolean__c: "true"
    posName__c: RetailAndEcommerce
    posMemMobile__c: 123456
    posMemId__c: 1234567
    posOrderCount__c: "10"

Responses

  • 201

    Media type: application/json. Schema: object.

    • contactId (string, required) The contactId generated in Salesforce.
    • loyaltyProgramMemberId (string, required) Members ID generated while enrolling in the program.
    • loyaltyProgramName (string, required) Name of the loyalty program.
    • membershipNumber (string, required) Membership number provided by the POS.
    • transactionJournals (array of object, required)
      Minimum items: 0.
      • activityDate (datetime, required) Timestamp of the transaction.
      • journalSubType (string, required) The sub type of the journal.
      • loyaltyProgram (string, required) Name of the loyatly program corresponding to the transaction
      • loyaltyProgramMember (string, required) The POS provided memebership ID associated with the member.
      • referredMember (boolean | any, required) Value indicating if the member is referred or not.

        One of: boolean, any.

      • status (string, required) Stratus of the transaction.
      • transactionJournalId (string, required) The Id of the transaction journal.

    Example

    contactId: 003Dn00000OVHwc
    loyaltyProgramMemberId: 0lMDn000001qkDa
    loyaltyProgramName: NTO Insider
    membershipNumber: Member 1
    transactionJournals:
      -
        activityDate: 2023-09-01T17:30:34.000Z
        journalSubType: Member Enrollment
        journalType: Accrual
        loyaltyProgram: Cloud Kicks Inner Circle
        loyaltyProgramMember: SANEUSER1234
        referredMember: null
        status: Pending
        transactionJournalId: 0lV1Q0000008PXM
  • 400 Bad Request

    Media type: application/json. Schema: object.

    • errorCode (string, required) The error code corresponding to the error.
    • message (string, required) A short description of the error.

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported
  • 404 Resource not found

    Media type: application/json. Schema: object.

    • errorCode (string, required) The error code corresponding to the error.
    • message (string, required) A short description of the error.

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported
  • 405 Method Not Allowed

    Media type: application/json. Schema: object.

    • errorCode (string, required) The error code corresponding to the error.
    • message (string, required) A short description of the error.

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported
  • 415 Un supported media type

    Media type: application/json. Schema: object.

    • errorCode (string, required) The error code corresponding to the error.
    • message (string, required) A short description of the error.

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported

    Example

    errorCode: INVALID_API_INPUT
    message: The membership number M123456789 is already taken. Specify a unique membership number and try again

    Example

    errorCode: NOT_FOUND
    message: Resource Not Found

    Example

    errorCode: NOT_ALLOWED
    message: Method Not Allowed

    Example

    errorCode: UNSUPPORTED_MEDIA_TYPE
    message: Media Type Not Supported