Promote Creation and Edition - ABO

Back Office Integration Guide

Product
ABO
AFS_Version
7.9
Category
Reference Guides
language
English

This API allows to update the content of a Promote Campaign. For more information, see Promote Application chapter of the AFS Back Office User Guide.

A Promote upload API request takes the following form:

curl -H Expect: -H "Content-Type:application/json" --data "{\"afs:t\":\"bows.promote\",\"replies\":{\"afs:t\":\"collection\",\"x:values\":[{\"afs:t\":\"bows.promote.reply\",\"title\":\"Reply Test\",\"description\":\"This is the reply test.\",\"url\":\"http://www.antidot.net\",\"customData\":{\"afs:t\":\"map\",\"test\":\"test\"}}]},\"status\":\"ACTIVED\",\"tags\":{\"afs:t\":\"collection\",\"x:values\":[\"test\",\"demo\",\"promote\"]},\"keywords\":{\"afs:t\":\"collection\",\"x:values\":[\"for\",\"demonstration\",\"purposes\"]},\"title\":\"For Demonstration Purposes\",\"description\":\"Campaign created for demonstration purposes.\",\"lang\":\"ENGLISH\",\"startDate\":{\"afs:t\":\"date-time\",\"value\":\"2012-03-13T12:00:00\"},\"endDate\":{\"afs:t\":\"date-time\",\"value\":\"2012-03-16T12:00:00\"}}" "http://$HOST/bo-ws/service/$SERVICE_ID/instance/$SERVICE_STATUS/promote?afs:login=login://$SUER:$PASSWORD@$AUTHENTICATION_AUTHORITY"

Method: POST

For a redirection promote, add the following information:

{"afs:t":"bows.promote","promoteType":"REDIRECTION","replies":[
{"afs:t":"bows.promote.redirectionReply","url":"http://www.antidot.net/"}
],

Hereafter, more details about the post data:

{
"afs:t": "bows.promote",

"title": "For Demonstration Purposes", // Title of the Campaign [Mandatory]
"description": "Campaign created for demonstration purposes.", // Description of the Campaign
"lang": "ENGLISH", // Lang of the Campaign
"startDate": {
"afs:t": "date-time",
"value": "2012-03-13T12:00:00" // Start Date of the Campaign
},
"endDate": {
"afs:t": "date-time",
"value": "2012-03-16T12:00:00" // End Date of the Campaign
},

"status": "ACTIVED", // Status (ACTIVED, SUSPENDED) [Mandatory]

"tags": { // [Mandatory even if empty list]
"afs:t": "collection",
"x:values": [
"test", // Tag 1
"demo", // Tag 2
"promote" // Tag 3 (unlimited)
]
},

"keywords": { // [Mandatory even if empty list]
"afs:t": "collection",
"x:values": [
"for", // Keyword 1
"demonstration", // Keyword 2
"purposes" // Keyword 3 (unlimited)
]
},

"replies": { // [Mandatory even if empty list]
"afs:t": "collection",
"x:values": [
{
"afs:t": "bows.promote.reply",
"title": "Reply Test", // Title of the Campaign reply 1
"description": "This is the reply test.", // description of the Campaign reply
"url": "http://www.antidot.net", URL of the Campaign reply
"customData": {
"afs:t": "map",
"test": "test" // Meta Data of the Campaign reply (Unlimited)
}
},

{
"afs:t": "bows.promote.reply",
"title": "Reply Test 2", // Title of the Campaign reply 2 (unlimited)
"description": "This is the reply test 2.", // description of the Campaign reply 2
"url": "http://doc.afs-antidot.net", URL of the Campaign reply 2
"customData": {
"afs:t": "map",
"test": "test 2" // Meta Data of the Campaign reply 2(Unlimited)
}
}
]
},
"viewAssociation": { // Only use this field if a view is wanted for the campaign
"afs:t": "bows.promote.view.association",
"view": {
"afs:t": "bows.view",
"x:reference": "/bo-ws/project/1/service/666/instance/beta/view/85" // View reference to be associated with this promote Campaign
}
}
}

For a permanent Campaign, declare start and end dates with null value as following (null values can also be combined with date values):

"startDate": null,
"endDate": null,

Use POST method the first time in order to create the campaign. Note that in this case, request URL is: http://<host>/bo-ws/service/${Service_Number}/instance/<instance_status>/promote
If the campaign already exists, use PUT method in order to edit it.
A GET request on the POST URL gives the list of existing Promote Campaigns for the instance, including associated <Promote_ID>.
CURL is used for those examples. Any other HTTP client can be used.