GET
/
api
/
loyalty
/
questions
JavaScript
import SnagSolutions from '@snagsolutions/sdk';

const client = new SnagSolutions({
  apiKey: 'My API Key',
});

const questions = await client.loyalty.questions.list({
  loyaltyRuleIds: '123e4567-e89b-12d3-a456-426614174000',
});

console.log(questions);
[
  {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "text": "<string>",
    "loyaltyQuestionChoices": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "text": "<string>",
        "sortIdentifier": 123
      }
    ]
  }
]

Authorizations

X-API-KEY
string
header
required

Query Parameters

loyaltyRuleIds
required

UUID of the loyalty rule to fetch questions for

Example:

"123e4567-e89b-12d3-a456-426614174000"

websiteId
string<uuid>

UUID of the website to fetch questions for

Example:

"123e4567-e89b-12d3-a456-426614174001"

organizationId
string<uuid>

UUID of the organization to fetch questions for

Example:

"123e4567-e89b-12d3-a456-426614174002"

userId
string<uuid>

UUID of the user to fetch questions for

Example:

"123e4567-e89b-12d3-a456-426614174003"

Response

200
application/json

200

The response is of type Question Response · object[].