Slyk
Search…
Question

Module endpoints

DELETE /questions/:id

DELETE http://api.slyk.io/questions/:id
Deletes the question with given id.
Response
204 No Content

GET /questions

GET https://api.slyk.io/questions
Returns a paginated list of questions.
Available Filters
Available Sorts
Paginate Options
Response
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.
Response
{
"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.
Available Filters
Available Sorts
Paginate Options
Response
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.
Request Parameters
Request
Response
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.
Request Parameters
Request
Response
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"
}
}
Last modified 2mo ago
Copy link
On this page
Module endpoints
DELETE /questions/:id
GET /questions
GET /questions/:id
GET /question-types
PATCH /questions/:id
POST /questions