Follow

Consumer Loyalty Cards - Create Points

Creates loyalty card points for a consumer.

 

Attributes 

Attribute

Value

Path

/v3/consumerLoyaltyCards/{accessToken}/points

Support Formats

JSON, XML

HTTP Method

POST

Secure

Yes

Rate Limited

No

HTTP Codes

·        201 - Created

·        400 - Bad Request

·        403 - Forbidden

·        409 - Conflict

·        500 - Internal Server Error

 

Request

The following table contains the details of a typical HTTP request for this service:

Type

Value

Header

POST /v3/consumerLoyaltyCards/XYZ1...1DSD/points HTTP/1.1

Host: merchant.api.vmob.co

Content-Type: application/json

Accept-Language: en-US

x-vmob-authorization: dm1vYi53aW5kb3dzLjE6

Body

{

    "loyaltyCardId"        : 53,

    "pointsRequested"         : 2,

    "transactionId"          : "2014262323105945135",

    "autoActivateReward" : false,

    "fillMultipleCards" : false

}

Notes:

  • Loyalty Card ID must be a valid, published and active loyalty card.
  • Access Token must be a valid access token of a consumer.
  • Transaction ID must be a unique string (any custom Transaction ID validator will be skipped). 
  • Points Requested must be an integer. Indicates the number of loyalty card points to be submitted.
  • autoActivateReward is a boolean (defaults to false). When set to true, will auto activate the reward when the loyalty card is complete.
  • fillMultipleCards is a boolean (defaults to false). When set to true, will create a new loyalty card instance when the loyalty card is complete.

 

Successful Response

The following table contains the details of a typical successful HTTP request for this service.

Type

Value

Header

HTTP/1.1 201 Created

Content-Type: application/json

Cache-Control: no-store

Pragma: no-cache

Body

{

  "loyaltyCardId": 2236,

  "pointsBalance": 5,

  "pointsAllocated": 25,

  "pointCreationSummary": [

    {

      "offerInstanceUniqueId": null,

      "pointsBalance": 10,

      "pointsAllocated": 10,

      "instanceId": "a2a16033-aed5-49b8-b497-fd4be4669df2",

      "outcomeCode": 0,

      "outcomeDescription": "Points issued successfuly"

    },

    {

      "offerInstanceUniqueId": null,

      "pointsBalance": 10,

      "pointsAllocated": 10,

      "instanceId": "49a7a7f6-cdff-46da-930c-205c431063d9",

      "outcomeCode": 0,

      "outcomeDescription": "Points issued successfuly"

    },

    {

      "offerInstanceUniqueId": null,

      "pointsBalance": 5,

      "pointsAllocated": 5,

      "instanceId": "c1f8508a-4668-4632-8ec4-d8fb958288b4",

      "outcomeCode": 0,

      "outcomeDescription": "Points issued successfuly"

    }

  ]

}

Notes:

  • loyaltyCardId: The Id of the loyaltyCard (not the instance).
  • pointsBalance: The amount of points that are now allocated to this points balance (account or loyalty card). 
  • pointsAllocated: The number of points that were accepted to be allocated to this account or loyalty card by the server. If over the maximum allowable points then the account will be filled and the remaining points rejected. 
  • fillMultipleCards: by default this is false. When set to true, if the point request exceeds the number of points required to fill the card, the system will automatically create a new card instance and continue issuing points. For example if a card has a 10 point limit and a request comes in for 15 points, the system will issue 10 points after which it will create a new instance and issue the remaining 5 points to it
  • When the request has fillMultipleCards set to true, the 'pointCreationSummary' will contain information about each card instance that got filled as part of this transaction
  • outcomeCode: 

Success = 0,
DailyPointLimitExceeded = 1,
TransactionIdInvalid = 2,
CardInactive = 3,
DailyRequestLimitExceeded = 4,
AutoCardActivationFailed = 5,
UnableToAutoActivateReward = 6

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.