Expand my Community achievements bar.

Join us for an upcoming in-person Adobe Target Skill Builders event ~~> We're hosting these live learning opportunities to equip you with the knowledge and skills to leverage Target successfully. Learn more to see if we'll be coming to a city near you!

When trying to create AB-Test from API - Invalid Json. Unrecognized property name 'offerLocations'

Avatar

Level 1

I am trying to create an AB-Test using the ADOBE-API as documented at https://developers.adobetarget.com/api/#create-ab-activity

but I keep getting the following error: 

 

{"httpStatus":400,"requestId":"74yQITxUwTToiaoReIMQinnYYciKGF2e","requestTime":"2021-11-16T09:59:49.745818Z","errors":[{"errorCode":"InvalidProperty.Json","message":"Invalid Json. Unrecognized property name 'offerLocations'. Location: line - 12, column - 32.","meta":{"propertyName":"offerLocations","line":12,"column":32}}]}

 

When I tried to remove the "offerLocations" property from the JSON I get the following error:

{"httpStatus":500,"requestId":"QeSREncBAFbTqweswA4CpS5F4t5yGSiM","requestTime":"2021-11-16T09:51:19.139933Z","errors":[{"errorCode":"INTERNAL_SERVER_ERROR.Service","message":"Internal Server Error","meta":{}}]}

 

My API Call's Json looks as following:

{
"name": "My New Activity",
"startsAt": "2021-11-11T08:00Z",
"endsAt": "2021-12-12T07:59:59Z",
"state": "saved",
"priority": 100,
"experiences": [
{
"experienceLocalId": 0,
"name": "ben0",
"visitorPercentage": 50,
"offerLocations": [ ]
},
{
"experienceLocalId": 1,
"name": "ben1",
"visitorPercentage": 50,
"offerLocations": []
}
],
"metrics": [
{
"metricLocalId": 32767,
"name": "goal",
"conversion": true,
"mboxes": [
{
"name": "order-complete",
"successEvent": "mbox_shown"
}
],
"action": {
"type": "count_once"
}
}
],
"workspace": "api-generated-ab-tests",
"propertyIds": [
1,
2
]
}

 

When I call the listing of existing ab-tests I am able to get a valid answer from ADOBE's API

0 Replies