PUT
/api/Products/{productId}/questions/{id}
const url = 'https://example.com/api/Products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/questions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” productId
required
string format: uuid
id
required
string format: uuid
Request Body
Section titled “Request Body ”object
id
string format: uuid
productId
string format: uuid
label
required
string
helpText
string
type
required
string
isRequired
boolean
maxLength
integer format: int32
options
Array<object>
object
value
required
string
label
required
string
id
string format: uuid
object
id
string format: uuid
productId
string format: uuid
label
required
string
helpText
string
type
required
string
isRequired
boolean
maxLength
integer format: int32
options
Array<object>
object
value
required
string
label
required
string
id
string format: uuid
object
id
string format: uuid
productId
string format: uuid
label
required
string
helpText
string
type
required
string
isRequired
boolean
maxLength
integer format: int32
options
Array<object>
object
value
required
string
label
required
string
id
string format: uuid
Responses
Section titled “ Responses ”OK
Media type application/json
object
id
string format: uuid
order
integer format: int32
label
string
helpText
string
type
string
isRequired
boolean
maxLength
integer format: int32
options
Array<object>
object
id
string format: uuid
order
integer format: int32
value
string
label
string
Example
{ "type": "FreeText"}Bad Request
Media type application/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
Media type application/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}