Sets Email Address for Loyalty ID
PUT/client/users/:correlation_id/profile/email
-
This call captures an email address and associates it with a ghost card.
-
The status parameter in the request indicates the user’s email prompt preference.
-
Valid status in the request includes: deferred, accepted, and declined.
-
If the userStatus in Start Session request is "CLOSED" then the email address cannot be updated.
Request
Body
| Attribute | Definition | Format | Notes |
|---|---|---|---|
| emailAddress | The email address to be associated with a ghost card. | String | |
| status | The email user's prompt preference. | Enum: "deferred", "accepted", or "declined" | "deferred" means "ask me another time" |
Response
| Attribute | Definition | Format | Notes |
|---|---|---|---|
| message | Shows that an email address has been set | String | "Email option updated." |
Error Responses
| statusCode | errorMessage | errorCode | Definition |
|---|---|---|---|
| 400 Bad Request | The document path provided in the update expression is invalid for update | INVALID_REQUEST | Cannot complete update with document path provided |
| 400 Bad Request | Email address is required | INVALID_REQUEST | When body’s status is ‘accepted’ and no email is provided |
| 400 Bad Request | Email address not expected when status is declined | INVALID_REQUEST | When body’s status is ‘declined’ and an email is provided |
| 400 Bad Request | Email address not expected when status is deferred | INVALID_REQUEST | When body’s status is ‘deferred’ and an email is provided |
| 400 Bad Request | Email capture option {status} is not supported! | INVALID_REQUEST | When body’s status is different from the following options: ‘accepted’, ‘deferred’, ‘declined’ |
Request
Responses
- 200
- 400
200 - Email Address Set
Response Headers
Date
Example:
Thu, 21 May 2020 03:22:47 GMTContent-Length
Example:
35Connection
Example:
keep-alivex-amzn-RequestId
Example:
92a892ab-6caa-45a7-8774-65fbfb39d516Referrer-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:
M3MRHH0XIAMFpnA=cache-control
Example:
no-cache, no-store, must-revalidateX-Content-Type-Options
Example:
nosniffX-Amzn-Trace-Id
Example:
Root=1-5ec5f407-5c4e032b32974553017ad727;Sampled=0400 - Email Address is Required