Skip to content

Create Question

POST
/api/Products/{productId}/questions
curl --request POST \
--url https://example.com/api/Products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/questions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "productId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "label": "example", "helpText": "example", "type": "FreeText", "isRequired": true, "maxLength": 1, "options": [ { "value": "example", "label": "example" } ] }'

Adds a new question to a product. The question is appended to the bottom of the existing list — call /reorder afterwards to move it.

productId
required
string format: uuid
object
productId
string format: uuid
label
required
string
>= 1 characters <= 500 characters
helpText
string
nullable <= 2000 characters
type
required
string
Allowed values: FreeText SingleChoice MultipleChoice
isRequired
boolean
maxLength
integer format: int32
nullable >= 1 <= 10000
options
Array<object>
nullable
object
value
required
string
>= 1 characters <= 200 characters
label
required
string
>= 1 characters <= 500 characters

Created

Media type application/json
object
id
string format: uuid
order
integer format: int32
label
string
nullable
helpText
string
nullable
type
string
Allowed values: FreeText SingleChoice MultipleChoice
isRequired
boolean
maxLength
integer format: int32
nullable
options
Array<object>
nullable
object
id
string format: uuid
order
integer format: int32
value
string
nullable
label
string
nullable
Example
{
"type": "FreeText"
}

Bad Request

Media type application/json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties
Example generated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Not Found

Media type application/json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties
Example generated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}