Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Create JSON offer in Target using API

danc13675873
Level 2
Level 2

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 \
  https://mc.adobe.io/<your-tenant-name>/target/offers/content \
  -H 'authorization: Bearer <your-bearer-token>' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/vnd.adobe.target.v1+json' \
  -H 'x-api-key: <your-api-token>'
  -d ' {
  "name": "My new offer",
  "content": "<div>The content of the offer</div>"
}
'

1 Accepted Solution
Joshua_Eisikovi
Correct answer by
Employee
Employee

Hi,

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!

Best,

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

1774565_pastedImage_5.png 

View solution in original post

3 Replies
Joshua_Eisikovi
Correct answer by
Employee
Employee

Hi,

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!

Best,

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

1774565_pastedImage_5.png 

View solution in original post

_Lukasz_
Level 3
Level 3

Hi Joshua,

Thank you for your answer. Are you planning to introduce an API method to create a JSON offer?

Best regards

Chad_Gallagher
Level 2
Level 2

HI Lukasz,

That is definitely something that can be added as an idea for future builds. I have submitted it on your behalf. Feel free to add more context to it as well via Create json offer using Target API