Skip to main content

Load All Offers

POST 

/client/users/:correlation_id/offers

Loads all unaccepted offers that are currently ongoing as determined by their display date, start date and end date. This API accepts the same reply options as the single Respond to offer API, thereby allowing the following acceptance states: "ACCEPTED", "DECLINED", and "UNACCEPTED".

Request

Body

AttributeDefinitionFormatNotes
acceptanceStateWhether or not the offer has been acceptedEnum: "ACCEPTED", "DECLINED", or "UNACCEPTED"

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 RequestInvalid business unit(s) provided.INVALID_BUSINESS_UNIT
400 Bad RequestCurrent date is after expiry date.INVALID_REQUESTCannot load expired offer(s).

Request

Responses

200 - All Accepted Offers Loaded

Response Headers
    Date
    Example: Fri, 18 Dec 2020 19:44:16 GMT
    Content-Length
    Example: 1751
    Connection
    Example: keep-alive
    x-amzn-RequestId
    Example: 8f25feb6-0c79-4191-b685-cedde313655b
    Referrer-Policy
    Example: no-referrer
    X-XSS-Protection
    Example: 1;mode=block
    Access-Control-Allow-Origin
    Example: *
    APPID
    Example: ES-CB-V1
    MSGID
    Example: 66040025-2ea2-4782-bec1-466da63d35ce
    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
    MSGTIMESTAMP
    Example: December 18th 2020, 7:44:16
    x-amz-apigw-id
    Example: Xw32kFMwoAMFo7g=
    cache-control
    Example: no-cache, no-store, must-revalidate
    CORRELATIONID
    Example: cd4e126a-f0fa-c00e-f1e3-fc2d319203c7
    X-Content-Type-Options
    Example: nosniff
    X-Amzn-Trace-Id
    Example: Root=1-5fdd0690-2c344d38125d335a5507c936;Sampled=0