Skip to main content

Award Post Purchase Points

POST 

/client/users/:OriginalCorrelation_id/award

Use to award reward points after a purchase for any one of a number of reasons (for instance, points were not properly awarded during the original transaction). Also:

  • Account and LoyaltyId must be eligible to earn.
  • Awards post-purchase credits based on a historical Correlation Id (within 30 days).
  • The latest transaction in the original transaction chain must be anonymous. The correlationId for the anonymous transaction is passed in the request path.
  • Invalid requests are rejected.
  • When a valid request is processed, the member's balance is increased, the Last Activity Date (LAD) is updated (if earn is set as a tracking activity), and if the member is a household member, the household balance is returned.

Validations:

  • Account must be eligible to earn.
  • PPE must be performed within specified (X) days from transactionDate of the original transaction.
  • The latest transaction in the original transaction chain must be anonymous.

Request

Note that sending the call without the proper "currentCorrelationId" will result in a 400 error.

Body

AttributeDefinitionFormatNotes
currentCorrelationIdCorrelates the session with the external system that is making the call.NumberRecommend using GUID mapped to the value of your Session ID or something directly referenced in your system as long as it is always globally unique. The Correlation ID also becomes the Transaction ID used to log any session transactions.
externalTransactionIDUnique identifier for transaction used by the client.StringOptional.

Response

AttributesDefinitionsFormatNotes
loyaltyIdLoyalty Card number for this session.NumberOptional. If loyaltyId was not provided in the request, then this is the primary card number on the account.
originalTransactionIdUnique identifier for the original transaction.String
pointsEarnedThe number of points earned through this transaction.Number
pointsBalanceTotal number of points currently attributed to this account.Number
transactionIdUnique identifier for the new transaction to add pointsEarned.String
householdObject containing information about the household to which the member belongs.ObjectOnly returned if the member is a member of a household.
idUnique identifier for the household.String
roleThe member's role in the household.Enum: "PRIMARY" or "SECONDARY"
balanceObject containing data about the balances available to the household.Object
totalPointsBalanceThe total points balance of the household.NumberThe sum of all member balances.
totalDollarBalanceThe total dollar balance of the household.NumberThe sum of all member balances.
totalAvailablePointBalanceThe total points available to the household.Number
totalAvailableDollarBalanceThe total dollars available to the household.Number
totalRedeemablePointBalanceThe total number of points that can currently be redeemed by the household members.Number
totalRedeemableDollarBalanceThe total number of dollars that can currently be redeemed by the household members.Number
minRedeemPointsThe minimum number of points that can be redeemed by the household.Number
maxRedeemPointsThe maximum number of points that can be redeemed by the household.Number
minRedeemDollarsThe minimum number of dollars that can be redeemed by the household.Number
maxRedeemDollarsThe maximum number of dollars that can be redeemed by the household.Number

Error Responses

statusCodeerrorMessageerrorCodeDefinition
400 Bad RequestMust provide a session correlation IDINVALID_REQUESTMust provide a valid session correlation ID for this request
400 Bad RequestOriginal session does not existINVALID_REQUESTCannot find session to which to award post-purchase points
400 Bad RequestAccount is not eligible to earnINVALID_REQUESTFor example, when loyalty status is ‘CANCELLED’, or account status is different from ‘ACTIVE’ and ‘UNREGISTERED’
400 Bad RequestAccount is not anonymous or a post purchase award has already been completedPPE_ACCOUNT_NONANON_ALREADY_COMPLETEDWhen original transaction was not anonymous or it was already completed
400 Bad RequestOriginal transaction is older than {maxDays} daysINVALID_REQUESTWhen the maximum days for the post-purchase award are exceeded. See maxDays in configuration ConfigType = ‘PPE’, attribute ‘ppeMaxOTAge’

Request

Responses

200 - PPE Awarded

Response Headers
    Date
    Example: Thu, 21 May 2020 03:48:56 GMT
    Content-Length
    Example: 196
    Connection
    Example: keep-alive
    x-amzn-RequestId
    Example: dd9522d9-c186-467b-9c52-45a9c083aaf1
    Referrer-Policy
    Example: no-referrer
    X-XSS-Protection
    Example: 1;mode=block
    Access-Control-Allow-Origin
    Example: *
    Expect-CT
    Example: max-age=86400
    Strict-Transport-Security
    Example: max-age=31536000
    Feature-Policy
    Example: vibrate 'none'; geolocation 'none'
    X-Frame-Options
    Example: sameorigin
    Content-Security-Policy
    Example: connect-src 'none';object-src https://*.cloudfront.net;script-src https://*.cloudfront.net
    x-amz-apigw-id
    Example: M3QGOGoMoAMFqJg=
    cache-control
    Example: no-cache, no-store, must-revalidate
    X-Content-Type-Options
    Example: nosniff
    X-Amzn-Trace-Id
    Example: Root=1-5ec5fa27-3932c218b29d5ad48c0f7a28;Sampled=0