Snag Docs logo

Create a new question

This endpoint allows you to create a new question.

POSThttps://admin.snagsolutions.io/api/loyalty/questions

This endpoint allows you to create a new question.

Loading code example
Loading code example

Authorizations

apiKeyAuthstringheaderrequired

API key passed in the header.

Body

Body

loyaltyRuleIdstring<uuid>required

UUID of the loyalty rule

questionTextstringrequired

The text of the question

allowMultipleAttemptsboolean

Whether the question allows multiple attempts

Default: false
loyaltyQuestionAnswersarray<object>required

Array of choices for the question

loyaltyQuestionAnswers.idstring<uuid>

UUID of the choice (optional for new choices)

loyaltyQuestionAnswers.textstringrequired

The text of the choice

loyaltyQuestionAnswers.isCorrectbooleanrequired

Whether this choice is correct

loyaltyQuestionAnswers.sortIdentifiernumberrequired

The order in which to display the choice

Response

application/json

201

idstring<uuid>required
textstringrequired
loyaltyQuestionChoicesarray<object>required
loyaltyQuestionChoices.idstring<uuid>required
loyaltyQuestionChoices.textstringrequired
loyaltyQuestionChoices.sortIdentifiernumberrequired