Tags are user-defined fields for programs. Each tag may apply to one or more program types and can be either required or optional, depending on the how the tag was defined. Tags may also provide a list of allowable values which must be selected from for use.
Query
Tags are queried with the standard asset pattern, but do not have an endpoint for By Id. The list of allowable values for a tag is only returned when the tag is queried by name.
Get Tags
1 |
GET /rest/asset/v1/tagTypes.json |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
{ "success": true, "warnings": [], "errors": [], "requestId": "1488a#1504ecfccf8", "result": [ { "tagType": "AAA1 Required Tag Type", "applicableProgramTypes": "[program,email_batch,nurture,event,webinar]", "required": true }, { "tagType": "AAA2 Required Event Tag Type", "applicableProgramTypes": "[event]", "required": true }, { "tagType": "AAA3 Not Required Tag Type", "applicableProgramTypes": "[program,email_batch,nurture,event,webinar]", "required": false } ] } |
By Name
1 |
GET /rest/asset/v1/tagType/byName.json?name=AAA1 Required Tag Type |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
{ "success": true, "warnings": [], "errors": [], "requestId": "8a44#1504ed0da2f", "result": [ { "tagType": "AAA1 Required Tag Type", "applicableProgramTypes": "[program,email_batch,nurture,event,webinar]", "required": true, "allowableValues": "[AAA1 RT1, AAA1 RT2, AAA1 RT3, AAA1 RT4]" } ] } |
Update
Tags are updated using the Update Program Metadata endpoint. An example of that can be found here.