Accept offer

This PUT operation indicates that the subscriber has accepted the offer. If successful, you receive an HTTP response code of 200 and a JSON response containing the offer that was accepted by the subscriber with information such as the ID, the status, and the campaign of which it is a part.

See HTTP response codes for other response codes.

PUT /rte/marketplace/subscribers/<msisdn>/offers/<offerId>/accept + JSON request

content-type: application/JSON

accept: application/JSON

authorisation: HTTP Basic Auth

URL parameters

There are two mandatory parameters.

Parameter Type Description

msisdn

string

The subscriber’s MSISDN in international format.

offerId

string

The external offer ID used to identify a specific offer instance.


JSON request

The JSON request contains the clientId and the channel through which the offer was accepted by the subscriber. You might also receive metadata if applicable.

See client request fields for more information.
{
    "clientId": "portal123",
    "channel": "Web",
    "metadata": "policyName=insure123&policyNum=1980AS098UO9",
    "productExpiryDate":"20/04/2021 17:00:00",
    "price": "42.00",
    "notifications": [
        {
            "message": "Thanks for accepting the offer."
        },
        {
            "message": "You will be charged $42.00 on your next invoice."
        }
    ]
}


JSON response

The JSON response includes the offer information.

See RTEM data type descriptions for more information.
{
    "offerId" : "2WeeksTravelTime",
    "status" : "ACCEPTED",
    "offerSuspensionDate" : "11/07/2020 14:24:11",
    "campaignName" : "InsuranceForEveryone"
}

RTE Marketplace JSON data type descriptions

Client request fields

Field Type Description

clientId

string

An arbitrary string used to identify the client.

channel

string

Identifies the channel through which the offer was consumed such as Web, App, or SMS.

metadata

string

Optional data to include with the request.

This data is logged for audit and reporting purposes.

price

string

Optional string that specifies the price of the offer.

This must be in the following format: "nn.nn". This is for reporting purposes only.
This is not an integer.

productExpiryDate

string

An optional expiry date for the offer expressed in DD-MM-YYYY format.

This is only relevant for the Accept an Offer request.

notifications

array

An optional array containing messages to the subscriber.

Offer fields

Field Type Description

offerId

string

The external offer ID used to identify a specific offer instance.

status

string

The current status of the offer.

possible values
  • ISSUED

  • ACKNOWLEDGED

  • ACCEPTED

  • REJECTED

  • CANCELLED

  • EXPIRED

offerExpiryDate

string

The offer expiry timestamp after which the offer is no longer valid. In other words, the offer must be accepted or rejected before this date and time. Format: DD/MM/YYYY HH:MM:SS.

This field is only present when the status is ISSUED or ACKNOWLEDGED.

offerSuspensionDate

string

Indicates that the offer will not be sent to the subscriber again until after this offerSuspensionDate. Format: DD/MM/YYYY HH:MM:SS.

This field is only present when the status is ACCEPTED or REJECTED.

campaignName

string

The name of the campaign of which the offer is apart.

HTTP response codes

Code Description

200 OK

success!

400 Bad Request

wrong input parameter or URL

401 Unauthorized

user authentication failed; incorrect credentials

403 Forbidden

user authorisation failed; operation not permitted for user

404 Not Found

The resource was not found.

  • subscriber = <msisdn>

  • offer = <offerId>

409 Conflict

Invalid operation due to current offer state.

500 Internal Server Error

A server side error occurred while processing the request.