Campaigns
Update Question
Changed onReplace a single question.
-
Restricted to campaigns of type mission.
-
If there's a conflict in the question_number the request takes priority. If you add a question in position 1 in page 1 and there is already a question 1 in the page 1, the new question will be placed in position 1 and the one that already existed is moved to position 2 in page 1
-
The page_number and question_number are adjusted to the current state. If i.e. the page_number does not exist, a new subsequent number will be given regardless of the input.
put/public/api/campaigns/{id}/questions/{question_id}
Request
- Base URLhttps://<base_url>
- AuthHTTP bearer
Path parameters
question_idstring required
The id of the question
Headers
Acceptstring
e.g. application/json
Request body
Example request
{
"question": "Photo 2",
"question_type": "photo",
"page_number": 1,
"question_number": 2,
"question_attributes": {
"allow_library": true,
"hide_mobile": false,
"mandatory": false
}
}Response
OK
Example response
{
"campaign_id": "54ab03c6546847ee0d30086a",
"created_date": "2021-05-23T04:45:02.020Z",
"updated_date": "2021-05-23T04:51:40.862Z",
"title": "Rockets campaign 1",
"description": "campaign description here",
"tags": [
"tag1",
"tag2"
],
"type": "mission",
"page_titles": [
"Page 1"
],
"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": "e8345f6d-108d-445f-b90b-123ce6876bc9",
"question": "Photo 2",
"question_type": "photo",
"page_number": 1,
"question_number": 2,
"question_attributes": {
"allow_library": true,
"hide_mobile": false,
"mandatory": false
}
},
{
"question_id": "e8335f8d-109d-475f-b10b-113ce6876dc8",
"question_type": "text",
"question": "ice-cream flavors",
"page_number": 1,
"question_number": 3
}
]
}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