POST
/api/Products/{productId}/questions
const url = 'https://example.com/api/Products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/questions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"productId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","label":"example","helpText":"example","type":"FreeText","isRequired":true,"maxLength":1,"options":[{"value":"example","label":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” productId
required
string format: uuid
Request Body
Section titled “Request Body ”object
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
object
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
object
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
Responses
Section titled “ Responses ”Created
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"}