I am trying to add new tags to an already existing Marketo Program. I am using http://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Programs/updat... as reference. But when I make the REST call, the response is a success (200 OK) along with the Program details, and the new Tags, which I added, DO NOT reflect on the program. Following is my request json:
{
"Tags" : [
{
"tagType" : "newType",
"tagValue" : "newValue"
}
]
}
Solved! Go to Solution.
Hello Thread,
This question was recently answered in a Support case, where the below notes were provided as guidance to resolve the issue.
1) The Tag Type and Value must exist in the Admin > Tags for the update to be successful.
2) The 'Content-Type' should be set to "application/x-www-form-urlencoded"
3) You may run the call with no tags parameter to return existing tags.
4) The Update Program Metadata call is "destructive" in that if you do not include existing non-required tags then those tags will be deleted in the successful call.
Example Call:
POST /rest/asset/v1/program/1091.json?access_token=xxx HTTP/1.1
Host: xxx-xxx-123.mktorest.com
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
Postman-Token: xxx
tags=%5B%7B%22tagType%22+%3A+%22newType%22%2C%22tagValue%22+%3A+%22newValue%22%7D%2C%7B%22tagType%22+%3A+%22TestTag%22%2C%22tagValue%22+%3A+%22TestValue0%22%7D%5D
(tags Decoded:"[{"tagType" : "newType","tagValue" : "newValue"},{"tagType" : "TestTag","tagValue" : "TestValue0"}]")
I hope this was helpful. Thanks!
You have to use tags that already exist as options.
hey Sanford,
have made an api call to fetch tag types using rest/asset/v1/tagTypes.json and below is the result :
"result": [
{
"tagType": "ProgramCreator",
"applicableProgramTypes": "[program,email_batch,nurture,event,webinar]",
"required": false
},
{
"tagType": "Region",
"applicableProgramTypes": "[webinar]",
"required": false
},
{
"tagType": "Region Test Tag",
"applicableProgramTypes": "[program,email_batch,event]",
"required": true
},
{
"tagType": "Test Tag",
"applicableProgramTypes": "[email_batch,program,nurture,event,webinar]",
"required": false
}
]
Now if I make a call to Update Program using /rest/asset/v1/program/1743.json where 1743 is Program Id.
with Body :
{
"Tags": [
{
"tagType": "Region Test Tag",
"tagValue": "Central N"
}
]
}
I am not getting any error. however, still tags are not getting updated. this is the response I am receiving for above call.
{
"success": true,
"warnings": [],
"errors": [],
"requestId": "14b4c#15b7fba7b34",
"result": [
{
"id": 1743,
"name": "Test",
"description": "Test Program",
"createdAt": "2017-04-05T10:39:03Z+0000",
"updatedAt": "2017-04-05T10:39:03Z+0000",
"url": "https://app-ab11.marketo.com/#PG1743A1",
"type": "Default",
"channel": "Email Blast",
"folder": {
"type": "Folder",
"value": 1416,
"folderName": "pughosh"
},
"status": "",
"workspace": "Default",
"tags": [],
"costs": []
}
]
}
tags is still an empty array. please let me know what I am missing here.
Good news! I mean, not the good news you were hoping for. But the good news that I'll stop pushing back, since you're sending a reasonable payload now and this is strange behavior.
Never having used this API in production, I assumed it worked. But maybe it's broken? Even a "name" update doesn't work for me. I'll open a Support case myself and let you know.
Hey Sanford, any updates on this?
Hello Thread,
This question was recently answered in a Support case, where the below notes were provided as guidance to resolve the issue.
1) The Tag Type and Value must exist in the Admin > Tags for the update to be successful.
2) The 'Content-Type' should be set to "application/x-www-form-urlencoded"
3) You may run the call with no tags parameter to return existing tags.
4) The Update Program Metadata call is "destructive" in that if you do not include existing non-required tags then those tags will be deleted in the successful call.
Example Call:
POST /rest/asset/v1/program/1091.json?access_token=xxx HTTP/1.1
Host: xxx-xxx-123.mktorest.com
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
Postman-Token: xxx
tags=%5B%7B%22tagType%22+%3A+%22newType%22%2C%22tagValue%22+%3A+%22newValue%22%7D%2C%7B%22tagType%22+%3A+%22TestTag%22%2C%22tagValue%22+%3A+%22TestValue0%22%7D%5D
(tags Decoded:"[{"tagType" : "newType","tagValue" : "newValue"},{"tagType" : "TestTag","tagValue" : "TestValue0"}]")
I hope this was helpful. Thanks!
If you check out LaunchPoint Partners you will find our team at Salytics did the hard work for you. We built a product Salytics Tag Manager – Marketo LaunchPoint that is currently free for anyone to use. At it's core, it is a mass program tag updater, that allows you to download your programs names into a csv file and assign them with (existing) Program Tags and then upload the csv file back into Marketo. All of the API calls are already setup for you.