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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Adobe Target API | Upate Activitiy - Invalid Json

perrin_ennen
Level 2
Level 2

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
1 Accepted Solution
nzchris
Correct answer by
Level 3
Level 3

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"
      }'

View solution in original post

4 Replies
mikewebguy
Employee
Employee

@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

nzchris
Level 3
Level 3
Instead of trying to use the update activity request, are you able to use the 'Update activity name' request instead?
nzchris
Correct answer by
Level 3
Level 3

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"
      }'

View solution in original post