Body
-
acknowledge boolean
-
start_date string | null
-
end_date string | null
-
descriptions array[object]
-
questions array[object]
-
callback_text array[object]
POST /manager/quiz
curl \
-X POST https://domain.tld/api/v2/manager/quiz \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"active":true,"acknowledge":true,"start_date":"string","end_date":"string","type_answer":"string","type_callback":"string","titles":[{"lang":"en_GB","content":"Hello"}],"descriptions":[{"lang":"en_GB","content":"Hello"}],"questions":[{"lang":"en_GB","content":"Hello"}],"callback_text":[{"lang":"en_GB","content":"Hello"}]}'
Request examples
{
"active": true,
"acknowledge": true,
"start_date": "string",
"end_date": "string",
"type_answer": "string",
"type_callback": "string",
"titles": [
{
"lang": "en_GB",
"content": "Hello"
}
],
"descriptions": [
{
"lang": "en_GB",
"content": "Hello"
}
],
"questions": [
{
"lang": "en_GB",
"content": "Hello"
}
],
"callback_text": [
{
"lang": "en_GB",
"content": "Hello"
}
]
}
Response examples (201)
{
"id_quiz": 42,
"active": true,
"date_insert": "2024-05-04T09:42:00+00:00",
"date_update": "string",
"start_date": "string",
"end_date": "string",
"acknowledge": true,
"type_answer": "string",
"type_callback": "string",
"titles": [
{
"id_i18n_content": 42,
"lang": "en_GB",
"content": "Hello"
}
],
"descriptions": [
{
"id_i18n_content": 42,
"lang": "en_GB",
"content": "Hello"
}
],
"questions": [
{
"id_i18n_content": 42,
"lang": "en_GB",
"content": "Hello"
}
],
"callback_texts": [
{
"id_i18n_content": 42,
"lang": "en_GB",
"content": "Hello"
}
],
"answers": {
"id_quiz_answer": 42,
"images": [
{
"id_i18n_content": 42,
"lang": "en_GB",
"content": "Hello"
}
],
"texts": [
{
"id_i18n_content": 42,
"lang": "en_GB",
"content": "Hello"
}
],
"is_correct": "true",
"nb_votes": 42
},
"ambassador_quiz_answer": {
"id_ambassador_quiz_answer": 42,
"date_insert": "2024-05-04T09:42:00+00:00",
"ambassador": {
"id_ambassador": 42,
"image": "string",
"firstname": "string",
"lastname": "string",
"username": "string",
"email": "string",
"email_tmp": "string",
"active": 42,
"status": 42,
"online": true,
"last_action_date": "2024-05-04T09:42:00+00:00",
"customer_id": "string",
"anonymized": true
},
"answer": [
{
"id_i18n_content": 42,
"lang": "en_GB",
"content": "Hello"
}
]
},
"answers_count": 42
}
Response examples (401)
{
"message": "Unauthorized."
}
Response examples (422)
{
"message": "field is required! (and 3 more error)",
"errors": {
"field": [
"Error message details here"
],
"additionalProperty1": [
"Error message details here"
],
"additionalProperty2": [
"Error message details here"
]
}
}