Adobe Target API | Upate Activitiy - Invalid Json

perrin_ennen 14-04-2020

Hello,
if I get an activity e.g. via https://mc.adobe.io/tenant/target/activities/ab/123456 and change only the name of the activity in the JSON and send it to https://mc.adobe.io/tenant/target/activities/ab/123456, then I get the message:

 

"Invalid Json. Unrecognized property name 'options'. Location: line - 7, column - 17."

 

"options": [
{
"optionLocalId": 0,
"offerId": 0
},
{
"optionLocalId": 2,
"name": "Offer2."
"offerId": 596872
}
],

 

If I delete this part, I get another warning. This time under experiences at optionLocations.

 

"experiences": [
{
"experienceLocalId": 0,
"name": "experience A."
"visitorPercentage": 100,
"optionLocations": [
{
"locationLocalId": 0,
"optionLocalId": 0
}
]
},
],

 

Do I pass a wrong format - or can someone tell me what I am doing wrong?

API

Accepted Solutions (1)

Accepted Solutions (1)

christopherc398 14-04-2020

Instead of trying to use update activity API request, are you able to use the update activity request instead?

API documentation: https://developers.adobetarget.com/api/#update-activity-name

curl -X PUT \
  https://mc.adobe.io/<your-tenant-name>/target/activities/168816/name \
  -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": "New Name for Activity"
      }'

Answers (1)

Answers (1)

mikewebguy
Employee
14-04-2020

@perrin_ennen 
I don't know much about this topic but asking some clarifying questions for those who do and woudl be willing to help here is what woudl be good to know:

1. Are you using API v1.0 or API v2.0?
2. What are you trying to accomplish?

Mihnea Docea | Technical Support Consultant | Customer Experience | Adobe | 1 (800) 497-0335