Skip to main content

Response to Offer

PUT 

/client/users/:correlation_id/offer/:offer_id

Accepts or declines a given offer on behalf of a loyalty member; valid acceptance states are "ACCEPTED", "DECLINED", and "UNACCEPTED".

Request

Body

AttributeDefinitionFormatNotes
acceptanceStateWhether or not the offer has been acceptedEnum: "ACCEPTED", "NONE", or "COMPLETED"

Response

AttributeDefinitionFormatNotes
accountIDThe ID of the account associated with the offerString
offerCodePrimary key that identifies the offerStringUnique string value
acceptanceDateISO-compliant date and time stamp when the offer was acceptedString
acceptanceDateEpochEpoch date and time stamp of when the offer was acceptedNumberEpoch date and time are in milliseconds
acceptanceStateWhether or not the offer has been acceptedEnum: "ACCEPTED", "NONE", or "COMPLETED"
effectiveDateStart date/time which the offer becomes liveStringValid ISO date or date-time string
expiryDateDate/time which the offer expiresStringValid ISO date or date-time string. If empty, the offer does not expire.
effectiveDateEpochEpoch date and time stamp of when the offer startedNumberEpoch date and time are in milliseconds
expiryDateEpochEpoch date and time stamp of when the offer expiredNumberEpoch date and time are in milliseconds
versionVersion of the offerNumberIncremented every time the offer is updated

Error Responses

statusCodeerrorMessageerrorCodeDefinition
400 Bad RequestAcceptance state is invalidINVALID_REQUESTacceptanceState value must be 'ACCEPTED' or 'DECLINED'
400 Bad RequestCannot change state of declined offerINVALID_REQUESTIf a user has already decline an offer, the state cannot be changed
400 Bad RequestCannot change state of a completed offerINVALID_REQUESTIf a user has already accepted an offer, the state cannot be changed
400 Bad RequestCannot accept {promoStatus} offerINVALID_REQUESTProvided offer has status different from 'ACTIVE'
400 Bad RequestCurrent date is after expiry dateINVALID_REQUESTProvided offer is expired
400 Bad RequestCurrent date is prior to display dateINVALID_REQUESTProvided offer is not yet displayed
404 Not FoundTargeted offer does not existPROMO_NOT_FOUNDThe account was not targeted by the provider offerId

Request

Responses

200 - Respond to Offer

Response Headers
    Date
    Example: Thu, 21 May 2020 03:55:47 GMT
    Content-Length
    Example: 358
    Connection
    Example: keep-alive
    x-amzn-RequestId
    Example: e1b92cf0-e566-45ee-ab9b-b5c6929986db
    Referrer-Policy
    Example: no-referrer
    X-XSS-Protection
    Example: 1;mode=block
    Access-Control-Allow-Origin
    Example: *
    MCK-APPID
    Example: ES-CB-V1
    MCK-MSGID
    Example: mck-560020bd-786a-4cb8-aa4f-f81a8962ef17
    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
    MCK-MSGTIMESTAMP
    Example: May 21st 2020, 3:55:46
    x-amz-apigw-id
    Example: M3RGdH4EIAMFcwQ=
    cache-control
    Example: no-cache, no-store, must-revalidate
    MCK_CORRELATIONID
    Example: mck-cd4e126a-f0fa-c00e-f1e3-fc2d319203c7
    X-Content-Type-Options
    Example: nosniff
    X-Amzn-Trace-Id
    Example: Root=1-5ec5fbc2-ce1e1bd62d011c221b8ec3b1;Sampled=0