Add to library
Build / Create/Logic/Option/Design
Add to library
Description
Add a survey item to the library.
Payload
{
"item": {
"type": "string",
"subtype": "string",
"frontendId": number,
"position": number,
"title": "string",
"config": object
},
"name": "string",
"isShared": boolean,
"isDefaultItem": boolean
}
item: Object containing the item configurationtype: Item type. Required.subtype: Item subtype. Required.frontendId: Item frontend id. Required.position: Item position in the survey. Required.title: Item title. Required.config: Object containing item configurations, internal fields depend on the item type. Refer to the auto save functionality for further details.. Required.
name: Item name for library. Optional.isShared: Boolean value to know if the item is shared with other company members. Optional.isDefaultItem: Boolean value to know if the item is default. Required.
Response
200 OK
{
"createdAt": "string",
"updatedAt": "string",
"name": "string",
"isDefaultItem": boolean,
"isShared": boolean,
"item": {
"type": "string",
"subtype": "string",
"frontendId": number,
"position": number,
"title": "string",
"config": object
},
"id": "string"
}
where:
createdAt: Creation date for the library item with the formatYYYY-MM-DDTHH:mm:ss.SSSZ.updatedAt: Last update date for the library item with the formatYYYY-MM-DDTHH:mm:ss.SSSZ.name: Library item name.isDefaultItem: Whether or not the item should be available for all users.isShared: Whether or not the item is shared for all users in the same company as the user that created it.item: Same item passed in the payload.id: Library item identifier.
400 Bad Request
subtype/frontendId/position/title/configare missing from item.
401 Unauthorized
The user doesn’t have permissions.
422 Unprocessable Entity
typeis missing from item.
isDefaultItemis missing.
500 Internal Server Error
Error occurred while processing the request.
POST
Add to library
Description
Add a survey item to the library.Payload
item: Object containing the item configurationtype: Item type. Required.subtype: Item subtype. Required.frontendId: Item frontend id. Required.position: Item position in the survey. Required.title: Item title. Required.config: Object containing item configurations, internal fields depend on the item type. Refer to the auto save functionality for further details.. Required.
name: Item name for library. Optional.isShared: Boolean value to know if the item is shared with other company members. Optional.isDefaultItem: Boolean value to know if the item is default. Required.
Response
200 OK
createdAt: Creation date for the library item with the formatYYYY-MM-DDTHH:mm:ss.SSSZ.updatedAt: Last update date for the library item with the formatYYYY-MM-DDTHH:mm:ss.SSSZ.name: Library item name.isDefaultItem: Whether or not the item should be available for all users.isShared: Whether or not the item is shared for all users in the same company as the user that created it.item: Same item passed in the payload.id: Library item identifier.
400 Bad Request
subtype/frontendId/position/title/configare missing from item.
401 Unauthorized
The user doesn’t have permissions.
422 Unprocessable Entity
type is missing from item.
isDefaultItem is missing.
500 Internal Server Error
Error occurred while processing the request.