Start Session Without Loyalty ID (anonymous)
POST/client/users/anonymous/sessions
-
Initiates an anonymous session and captures a correlation ID that will span all the calls during this customer session.
-
Depending on whether or not the POS will remember to skip point prompt for anonymous sessions, we might need to adjust the response to cater to its need.
Request
Path Variables
- None
Body
| Attribute | Description | Format | Notes |
|---|---|---|---|
| correlationId | Unique identifier for the session | String | Recommended format is as GUID. |
| externalIdentifier | Unique identifier of the session for an external system | String | |
| channel | The channel for the transactions. | String | For instance, "STORE", "APP", etc. |
| locale | Locale of the member. | String, values currently supported are: "en-CA", "en-US" and "fr-CA"; "EN" and "FR" can be used as well, but only for the member record (on the account level) | Optional. Priority order: (1) this query parameter; (2) locale set on the account; (3) environment locale. If locale is not provided or is not a valid value, system default ("en-CA") is used. |
| anonymousSessionId | Flag to shown whether the request is made for an anonymous member. | String | Optional. The flag allows a special prompt to be displayed to members not using a loyalty card number to tell them the points they would have earned had they swiped. |
Response
To see the hierarchy, view the Example Response.
| Attribute | Description | Format | Notes |
|---|---|---|---|
| loyaltyId | To show the ID for the loyalty account. Indicates that there is currently no loyaltyId | String: "anonymous" | User is associated with loyaltyId when they register online |
| membershipType | Indicates that user is not yet a member | String: "N" | Always set to "N" for this type of request |
| status | Status of user without loyalty ID | String: Example: "NO_CARD" | |
| prompt | Prompt code | String. Example: "REQUEST_EMAIL" | What type of prompt is being returned. Can be empty. |
| isValid | Valid session | Boolean: true or false | Legacy attribute. |
| promptMessage | First part of Prompt Message | String: Example: "Would the customer like to learn more about our loyalty program?" | First part of message displayed to user or POS agent. Can be empty. |
| receiptMessage | Receipt Message (Prompt) | String: Example: "Join the loyalty program to claim the points you earned on this purchase." | Prompt Message to print on the user's receipt, if applicable. Can be empty. |
| pointsBalance | User's current point balance | Number | This may be a number other than 0 if the card is unregistered. "Ghost cards" can accumulate points. |
| userMaxRedeemDollars | The maximum number of dollar that can be redeemed | Number | For a ghost card, this is set to 0 |
| redemptionRules | Sub-attributes set min and max points to be redeemed and redemption increments | Object | |
| minRedeemPoints | The minimum number of points that can be redeemed at one time | Number | The minimum number of points this user would be able to redeem this session if they were registered. |
| minRedeemAmount | The minimum cash value that can be redeemed at one time | Number | This is the minimum amount of currency the user would be able to redeem this session if they were registered. |
| maxRedeemPoints | The maximum number of points that can be redeemed at one time | Number | The maximum number of points this user would be able to redeem this session if they were registered. |
| maxRedeemAmount | The maximum cash value that can be redeemed at one time | Number | This is the maximum amount of currency the user would be able to redeem this session if they were registered. |
| redeemIncrementPoints | The increments of points that can be redeemed | Number | For instance, if this is set to "25000" then 25000, 50000, or 75000 points could be redeemed, or another 25000 point increment up to the maximum. |
| redeemIncrementAmount | The increments in cash that can be redeemed | Number | For instance, if this is set to "10" then $10, $20, or $30 could be redeemed, or another $10 increment up to the maximum. |
| currency | The currency in which redemption takes place | String | The type of currency used for monetary values |
| sessionCorrelationId | correlationId for the session | String | This will always match the correlationId passed in the request. |
| receiptPreference | The preference of the user for receipt messages | String: "UNKNOWN" | The value is always UNKNOWN for an unregistered user |
Error Responses
| statusCode | errorMessage | errorCode | Definition |
|---|---|---|---|
| 400 Bad Request | Invalid Correlation ID | INVALID_REQUEST | Correlation ID is not a valid value |
Request
Responses
- 200
- 400
200 - Start Session without loyalty id (anonymous session)
Response Headers
Date
Example:
Thu, 21 May 2020 03:47:20 GMTContent-Length
Example:
526Connection
Example:
keep-alivex-amzn-RequestId
Example:
5115314e-2a29-4e5e-af58-258f9f261716Referrer-Policy
Example:
no-referrerX-XSS-Protection
Example:
1;mode=blockAccess-Control-Allow-Origin
Example:
*Expect-CT
Example:
max-age=86400Strict-Transport-Security
Example:
max-age=31536000Feature-Policy
Example:
vibrate 'none'; geolocation 'none'X-Frame-Options
Example:
sameoriginContent-Security-Policy
Example:
connect-src 'none';object-src https://*.cloudfront.net;script-src https://*.cloudfront.netx-amz-apigw-id
Example:
M3P3SE3toAMF85g=cache-control
Example:
no-cache, no-store, must-revalidateX-Content-Type-Options
Example:
nosniffX-Amzn-Trace-Id
Example:
Root=1-5ec5f9c8-4b721db5cad31af8f61a6807;Sampled=0400 - Invalid CorrelationID
Response Headers
Date
Example:
Fri, 11 Jun 2021 01:36:20 GMTContent-Length
Example:
88Connection
Example:
keep-alivex-amzn-RequestId
Example:
3cb52a71-ed24-48f9-834e-58c4ebaeb114Referrer-Policy
Example:
no-referrerX-XSS-Protection
Example:
1;mode=blockAccess-Control-Allow-Origin
Example:
*Expect-CT
Example:
max-age=86400Strict-Transport-Security
Example:
max-age=31536000Feature-Policy
Example:
vibrate 'none'; geolocation 'none'X-Frame-Options
Example:
sameoriginContent-Security-Policy
Example:
connect-src 'none';object-src https://*.cloudfront.net;script-src https://*.cloudfront.netx-amz-apigw-id
Example:
AvKi6G1bIAMF7Sw=cache-control
Example:
no-cache, no-store, must-revalidateX-Content-Type-Options
Example:
nosniffX-Amzn-Trace-Id
Example:
Root=1-60c2be12-7b21746169689aa95a46ed7d;Sampled=0