Skip to content

Update Question

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

Replaces a question in place. The Options list is the new canonical set: existing options keep their Id, omitted ones are archived, entries with no Id are inserted. Display order is taken from list position.

productId
required
string format: uuid
id
required
string format: uuid
object
id
string format: uuid
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
id
string format: uuid
nullable

OK

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"
}