Offer APIs

Access

Methods

[ Jump to Models ]

Table of Contents

  1. get /v2/offers
  2. post /v2/offers
  3. delete /v2/offers
  4. post /v2/offers/duplicate
  5. get /v2/offers/gencode
  6. post /v2/offers/retire
  7. get /v2/offers/search
  8. get /v2/offers/templates
  9. get /v2/offers/validate
  10. get /v2/offers/{offerId}
Up
get /v2/offers
Finds multiple Offers by the specifying multiple offer Ids. (getOffersByIds)
Fetches multiple Offer by specifying the offer IDs. Example: GET /campaign/rest/v2/offers?offerIds=[Id1,Id2]

Query parameters

offerIds (required)
Query Parameter — Offer Ids. Example: [1,2].

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

success

500

Internal Server Error, Please check the logs for more details.

Up
post /v2/offers
Creates one or more offers using the specified parameters. All of the offers are created in the specified folder using the specified template. (createBulkOffers)
This creates offers in bulk.

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body (required)
Body Parameter — Bulk offer JSON. Example: [{\"offerName\":\"RESTNewOffer11\"}]

Query parameters

securityPolicy (optional)
Query Parameter — Security policy for new offers to be created. If not defined, the Global policy is used.
folderid (optional)
Query Parameter — ID of the folder where offers will be created. An exception is thrown if the ID is not valid. Example: 4
templateName (required)
Query Parameter — Name of existing offer template to be used for new offers that are created. Example: NewOfferTemplate

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

success

500

Internal Server Error, Please check the logs for more details.

Up
delete /v2/offers
Deletes one or more existing offers. (deleteOffers)
This deletes offers in bulk. Example, DELETE /campaign/rest/v2/offers?offerIds=[Id1,Id2]

Consumes

This API call consumes the following media types via the Content-Type request header:

Query parameters

offerIds (required)
Query Parameter — IDs of the offers to be deleted. Example: [1,2]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

success

500

Internal Server Error, Please check the logs for more details.

Up
post /v2/offers/duplicate
Creates duplicate offer. (duplicateOffers)
This created the duplicate offer. Example: /campaign/rest/v2/offers/duplicate?offerIds=[{\"componentTypeEnum\":\"OFFER\",\"id\":\"1\"}]

Consumes

This API call consumes the following media types via the Content-Type request header:

Query parameters

offerIds (required)
Query Parameter — Offer Ids. Example: [{\"componentTypeEnum\":\"OFFER\",\"id\":\"1\"}]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

success

500

Internal Server Error, Please check the logs for more details.

Up
get /v2/offers/gencode
Generates one or more unique offer codes. (generateOfferCode)
This gives the list of generated Offer codes. Example: /campaign/rest/v2/offers/gencode?offerName=NewYearOffer&templateId=1

Query parameters

offerName (optional)
Query Parameter — OfferName for which offercodes need to be generated. Example: NewYearOffer
templateId (optional)
Query Parameter — Template Id. Example: 1

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

success

500

Internal Server Error, Please check the logs for more details.

Up
post /v2/offers/retire
Retires one or more offers. (retireOffers)
This retires offers in bulk. Example, POST /campaign/rest/v2/offers/retire?offerIds=[id1,id2]

Consumes

This API call consumes the following media types via the Content-Type request header:

Query parameters

offerIds (optional)
Query Parameter — OfferIds of the offers to be retired. Example: [1,2]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

500

Internal Server Error, Please check the logs for more details.

204

Offers retired succesfully.

Up
get /v2/offers/search
GET a list of all offers. (searchOffers)
Returns a list of details of offers. The number of instances returned is governed by the Range parameter.

Query parameters

search (required)
Query Parameter — Provide the search criteria. Example: NewYearOffer.
sort (optional)
Query Parameter

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Offers found.

500

Internal Server Error, Please check the logs for more details.

Up
get /v2/offers/templates
Returns a list with offer template details for the requested templates. (getOfferTemplate)
This gets the details of the template. Example: /campaign/rest/v2/offers/templates?templateIds=[1,2]

Consumes

This API call consumes the following media types via the Content-Type request header:

Query parameters

templateIds (required)
Query Parameter — List of template IDs. Example: [1,2]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

success

500

Internal Server Error, Please check the logs for more details.

Up
get /v2/offers/validate
Validates a list of offers and returns validation information for each. \"Validation\" consists of checking to see whether only one matching offer exists in the database. The OfferValidationInfo object contains an error message instead of Offer Info if zero offers match the given code or name. An error is also returned instead of a match if the given code or name matches multiple offers. The list is returned in the same order as given. Offer codes and names are validated based on exact match with offers. (validateOffers)
This validates the list of offers. Example: /campaign/rest/v2/offers/validate?offerCodeOrName=[{\"code\":\"true\",\"codeOrName\":\"000000010\"}]

Consumes

This API call consumes the following media types via the Content-Type request header:

Query parameters

offerCodeOrName (required)
Query Parameter — Offer codes or names. Example: [{\"code\":\"true\",\"codeOrName\":\"000000010\"}]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

success

500

Internal Server Error, Please check the logs for more details.

Up
get /v2/offers/{offerId}
Finds an Offer by the specified offer Id. (getOffer)
Fetches an Offer by using the offer ID. Example GET /campaign/rest/v2/offers/Id1

Path parameters

offerId (required)
Path Parameter — Offer Id. Example: 1

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Offer found.

500

Internal Server Error, Please check the logs for more details.

Up

Models

[ Jump to Methods ]

Table of Contents

  1. MailListOfferInfo
  2. OfferTemplateDetails
  3. Reference
  4. BulkOfferInfoResponse
  5. OfferValidationInfo

MailListOfferInfo Up

id
Long
name
String
retired
Boolean

OfferTemplateDetails Up

attributes
Map[string,IAttribute]
name
String
reference
Reference
description
String
offerTemplateID
Long

Reference Up

componentTypeEnum
ComponentTypeEnum
id
Long

BulkOfferInfoResponse Up

reference
Reference
name
String
description
String
offerCode
String
error
Exception

OfferValidationInfo Up

reference
Reference
errorCode
String
errorMessage
String
code
String
name
String