Create JSON offer in Target using API

danc13675873 30-07-2018

Is it possible to create a JSON offer in Target using the Target API. I have tested using the documentation provided here - Target API v1.0 ​, but there isn't an option documented to provide the offer type e.g. HTML, JSON.

Documentation example - Target API v1.0 :

curl -X POST \<your-tenant-name>/target/offers/content \
  -H 'authorization: Bearer <your-bearer-token>' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/' \
  -H 'x-api-key: <your-api-token>'
  -d ' {
  "name": "My new offer",
  "content": "<div>The content of the offer</div>"

Accepted Solutions (1)

Accepted Solutions (1)



Thanks for your question, for the API in question '' Create Offer '' the content attribute is of type string. Whereas JSON offers are delivered as native JSON objects rather than strings.

JSON offers are not applied automatically as opposed to other offers (i.e like HTML) because JSON offers are non-visual offers.

Please see here for further information

Hope this helps!


Joshua Eisikovits | Global Lead, Platform Support | Customer Experience | Adobe


Answers (2)

Answers (2)