Campaigns
Partial Update
Changed onUpdate a subset of properties of a campaign.
If questions are passed, they will replace the existing.
patch/public/api/campaigns/{id}
Request
- Base URLhttps://<base_url>
- AuthHTTP bearer
Path parameters
idstring required
The id of the campaign
Headers
Acceptstring
e.g. application/json
Request body
Example request
{
"title": "<p>campaign title here updated</p>",
"description": "campaign description here updated",
"questions": [
{
"question_type": "number",
"question": "number of ice-cream flavors",
"page_number": 1,
"question_number": 1
},
{
"question_type": "text",
"question": "ice-cream flavors",
"page_number": 1,
"question_number": 2
},
{
"question": "Photo 2",
"question_type": "photo",
"page_number": 2,
"question_number": 1,
"question_attributes": {
"allow_library": true,
"hide_mobile": false,
"mandatory": false
}
}
]
}Response
OK
Example response
{
"campaign_id": "5dc18578883086880887175e",
"title": "<p>campaign title here updated</p>",
"description": "campaign description here updated",
"type": "mission",
"group_ids": [
"staff"
],
"page_titles": [
"My first page title"
],
"icon_url": "https://res.cloudinary.com/www-yoobic-com/image/upload/a_exif/v1569401814/ji2yhtw926naemtsj6xr.png",
"background_url": "https://res.cloudinary.com/www-yoobic-com/image/upload/a_exif/v1569401827/seuuqjbry1e4uusi0nta.png",
"questions": [
{
"question_id": "e8335f8d-109d-475f-b10b-113ce6876dc7",
"question_type": "number",
"question": "number of ice-cream flavors",
"page_number": 1,
"question_number": 1
},
{
"question_id": "e8335f8d-109d-475f-b10b-113ce6876dc8",
"question_type": "text",
"question": "ice-cream flavors",
"page_number": 1,
"question_number": 2
},
{
"question_id": "e8345f6d-108d-445f-b90b-123ce6876bc9",
"question": "Photo 2",
"question_type": "photo",
"page_number": 2,
"question_number": 1,
"question_attributes": {
"allow_library": true,
"hide_mobile": false,
"mandatory": false
}
}
],
"created_date": "2019-11-05T14:21:44.361Z",
"updated_date": "2019-11-05T14:25:20.831Z"
}Changes
- info
added the media type
application/jsonfor the response with the status
- info
- info
the endpoint scheme security
oauth2was removed from the API
- info