Slyk
  • Introduction
  • Understanding Slyk
    • Before you Start
    • Core Concepts
    • Funding/Withdrawal Methods
  • Developing with Slyk
    • Step-by-step development guide
      • Authentication
      • Wallet
      • Catalog
      • Checkout (coming soon)
      • Growth tools (coming soon)
    • SDKs
      • Server SDK (Node.js)
        • Methods
      • Third party SDK's
  • API Reference
    • Using your API Key
    • Endpoints
      • Wallet
      • Transaction
      • Address
      • Asset
      • Rate
      • PaymentMethod
      • Movement
      • User
      • Invite
      • Category
      • Order
      • Product
      • Question
      • Task
      • TaxRate
    • Webhooks
      • Store
      • Transaction
      • User
    • Models
  • Setup Guides
    • PayPal Configuration
      • Verifying webhook
      • Webhook configuration
    • Stripe Configuration
      • Verifying endpoints
    • Coinbase Configuration
Powered by GitBook
On this page
  • Module endpoints
  • DELETE /questions/:id
  • GET /questions
  • GET /questions/:id
  • GET /question-types
  • PATCH /questions/:id
  • POST /questions

Was this helpful?

  1. API Reference
  2. Endpoints

Question

PreviousProductNextTask

Last updated 2 years ago

Was this helpful?

Module endpoints

  • ​

  • ​​

  • ​​

  • ​

  • ​​

  • ​​

DELETE /questions/:id

DELETE http://api.slyk.io/questions/:id

Deletes the question with given id.

204 No Content

GET /questions

GET https://api.slyk.io/questions

Returns a paginated list of questions.

Name

Type

Example

id

= in nin

filter[id]=7938e446-1c77-4513-8cb0-8b1f2e9f47b9

productTypeCode

ilike

filter[productTypeCode]=bar

title

ilike

filter[title]=foo

typeCode

= in nin

filter[typeCode]=nin:foo

Name

Example

createdAt

sort=createdAt sort=-createdAt

typeCode

sort=typeCode sort=-typeCode

title

sort=title sort=-title

Name

Description

Example

size

Defines the number of results per page. Default = 30.

page[size]=2

number

Defines the number of the page to retrieve. Default = 1

page[number]=2

{
  "data": [
    {
      "configurations": { "values": ["XL", "M"] },
      "createdAt": "2020-08-10T10:00:00.000Z",
      "customData": {},
      "description": "Clothes size by nomenclature",
      "id": "fc78d28f-a8dd-49de-a22f-722fe3bd26c2",
      "jsonSchema": {},
      "metadata": {},
      "productTypeCode": "physical",
      "required": true,
      "title": "Clothes size",
      "typeCode": "single",
      "updatedAt": "2020-08-10T10:00:00.000Z"
    },
    {
      "configurations": { "values": ["39-40", "40-41"] },
      "createdAt": "2020-08-10T11:00:00.000Z",
      "customData": {},
      "description": "Boot size by number",
      "id": "ec78d28f-a8dd-49de-a22f-722fe3bd26c5",
      "jsonSchema": {},
      "metadata": {},
      "productTypeCode": "physical",
      "required": false,
      "title": "Boot size",
      "typeCode": "multiple",
      "updatedAt": "2020-08-10T11:00:00.000Z"
    }
  ],
  "total": 2
}

GET /questions/:id

GET https://api.slyk.io/questions/:id‌

Gets the question details of the given id.

{
  "data": {
      "configurations": { "values": ["39-40", "40-41"] },
      "createdAt": "2020-08-10T10:00:00.000Z",
      "customData": {},
      "description": "Boot size by number",
      "id": "fc78d28f-a8dd-49de-a22f-722fe3bd26c2",
      "metadata": {},
      "productTypeCode": "physical",
      "required": true,
      "title": "Boot size",
      "typeCode": "single",
      "updatedAt": "2020-08-10T10:00:00.000Z"
    }
}

GET /question-types

GET https://api.slyk.io/question-types

Returns a paginated list of question types.

Name

Type

Example

code

= in nin

filter[code]=foo

Name

Example

code

sort=code sort=-code

createdAt

sort=createdAt sort=-createdAt

Name

Description

Example

size

Defines the number of results per page. Default = 30.

page[size]=2

number

Defines the number of the page to retrieve. Default = 1

page[number]=2

{
  "data": [
    {
      "code": "date",
      "dashboardJsonSchema": {},
      "jsonSchemaTemplate": {
        "format": "date",
        "type": "string"
      }
    },
    {
      "code": "single",
      "dashboardJsonSchema": {
        "properties": {
          "values": {
            "items": { "type": "string" },
            "minItems": 1,
            "type": "array"
          }
        },
        "required": ["values"]
      },
      "jsonSchemaTemplate": {
        "enum": ["{{values}}"],
        "type": "string"
      }
    }
  ],
  "total": 2
}

PATCH /questions/:id

PATCH https://api.slyk.io/questions/:id

Patches the questions details of the given id.

Field

Type

Required

Description

configurations

object

false

Question configurations that contains possible values.

customData

object

false

Can store any additional information about the question.

description

string

false

Question description.

productTypeCode

string

false

Associated product type code.

required

boolean

false

Require indicator.

title

string

false

Question title.

typeCode

string

false

Associated question type code. One of date, multiple, single, text, time

{
  "configurations": {
    "values": [
      "39-40",
      "40-41",
      "41-42"
    ]
  },
  "customData": {},
  "description": "Boot size by number",
  "productTypeCode": "physical",
  "required": true,
  "title": "Boot size",
  "typeCode": "single"
}
{
  "data": {
    "configurations": {
      "values": [
        "39-40",
        "40-41",
        "41-42"
      ]
    },
    "createdAt": "2020-08-10T10:00:00.000Z",
    "customData": {},
    "description": "Boot size by number",
    "id": "fc78d28f-a8dd-49de-a22f-722fe3bd26c2",
    "metadata": {},
    "productTypeCode": "physical",
    "required": true,
    "title": "Boot size",
    "typeCode": "single",
    "updatedAt": "2020-08-10T10:00:00.000Z"
  }
}

POST /questions

POST https://api.slyk.io/questions

Creates a new question.

Field

Type

Required

Description

configurations

object

false

Question configurations that contains possible values.

customData

object

false

Can store any additional information about the question.

description

string

false

Question description.

productTypeCode

string

true

Associated product type code.

required

boolean

false

Require indicator.

title

string

true

Question title.

typeCode

string

true

Associated question type code. One of date, multiple, single, text, time

{
  "configurations": {
    "values": [
      "39-40",
      "40-41",
      "41-42"
    ]
  },
  "customData": {},
  "description": "Boot size by number",
  "productTypeCode": "digital",
  "required": true,
  "title": "Boot size",
  "typeCode": "single"
}
{
  "data": {
    "configurations": {
      "values": [
        "39-40",
        "40-41",
        "41-42"
      ]
    },
    "createdAt": "2020-08-10T10:00:00.000Z",
    "customData": {},
    "description": "Boot size by number",
    "id": "fc78d28f-a8dd-49de-a22f-722fe3bd26c2",
    "metadata": {},
    "productTypeCode": "physical",
    "required": true,
    "title": "Boot size",
    "typeCode": "single",
    "updatedAt": "2020-08-10T10:00:00.000Z"
  }
}
DELETE /questions/:id
GET /questions
GET /questions/:id
GET /question-types
PATCH /questions/:id
POST /questions