Create Questionnaire Template
post
/spms/v1/questionnaires/templates
Creates questionnaire template
Request
Supported Media Types
- application/json
Required to create questionnaire template
Root Schema : questionnaireTemplate
Type:
object
Questionnaire template
Show Source
-
categoryId:
number
Minimum Value:
1
Pattern:^[0-9]*$
Questionnaire category IdExample:1
-
enabled(optional):
boolean
Activation status of questionnaire template: * `true` - Questionnaire template is active * `false` - Questionnaire template is inactive
-
templateName:
string
Minimum Length:
1
Maximum Length:4000
The name of questionnaire templateExample:China Embarkation Questionnaire
Response
Supported Media Types
- application/json
201 Response
Created
Root Schema : questionnaireTemplateWithId
Type:
object
Questionnaire template
Show Source
-
enabled:
boolean
Activation status of questionnaire template: * `true` - Questionnaire template is active * `false` - Questionnaire template is inactive
-
id:
number
Minimum Value:
1
Pattern:^[0-9]*$
Questionnaire template IdExample:1001
-
questionnaireCategory:
object questionnaireCategory
Questionnaire Categorye
-
templateName:
string
Minimum Length:
1
Maximum Length:4000
The name of questionnaire templateExample:China Embarkation Questionnaire
-
viewOnly(optional):
boolean
Read Only:
true
The flag which indicates whether or not questionnaire template is view-only (i.e. unmodifiable and unremovable): * false - Questionnaire template is modifiable. It can be updated or deleted. * true - Questionnaire template is unmodifiable. It cannot be updated or deleted.
Nested Schema : questionnaireCategory
Type:
object
Questionnaire Categorye
Show Source
-
categoryName(optional):
string
Minimum Value:
1
Maximum Value:255
Example:Chinese
-
enabled(optional):
boolean
Example:
true
-
id(optional):
number
Minimum Value:
1
Maximum Value:12
Pattern:^[0-9_]*$
Example:2.1548485562E10
-
viewOnly(optional):
boolean
Example:
false
400 Response
Bad Request
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error Response
Error Response returned when encountered error
Example:
{
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
"title":"Bad Request",
"detail":"categoryId must not be null,enabled must not be null,templateName must not be null"
}
Nested Schema : Error Response
Type:
object
Title:
Error Response
Error Response returned when encountered error
Show Source
401 Response
You are not authorized to use this API
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error Response
Error Response returned when encountered error
Example:
{
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2",
"title":"Unauthorized",
"detail":"Valid token is required to access this resource"
}
Nested Schema : Error Response
Type:
object
Title:
Error Response
Error Response returned when encountered error
Show Source
403 Response
Forbidden
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error Response
Error Response returned when encountered error
Example:
{
"type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4\"",
"title":"Forbidden",
"detail":"Access to this resource is forbidden"
}
Nested Schema : Error Response
Type:
object
Title:
Error Response
Error Response returned when encountered error
Show Source
405 Response
Method Not Allowed
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error Response
Error Response returned when encountered error
Example:
{
"title":"Method Not Supported",
"detail":"HTTP method not supported for this resource",
"type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6"
}
Nested Schema : Error Response
Type:
object
Title:
Error Response
Error Response returned when encountered error
Show Source
406 Response
Not Acceptable
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error Response
Error Response returned when encountered error
Example:
{
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7",
"title":"Not Acceptable",
"detail":"Request a Mime type that is supported for this Resource"
}
Nested Schema : Error Response
Type:
object
Title:
Error Response
Error Response returned when encountered error
Show Source
409 Response
Conflict
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error Response
Error Response returned when encountered error
Example:
{
"type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10",
"title":"Method Not Allowed",
"detail":"Resource ID already exists. Use an alternative ID"
}
Nested Schema : Error Response
Type:
object
Title:
Error Response
Error Response returned when encountered error
Show Source
415 Response
Unsupported Media Type
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error Response
Error Response returned when encountered error
Example:
{
"title":"Invalid content",
"detail":"Content type not supported",
"type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.16"
}
Nested Schema : Error Response
Type:
object
Title:
Error Response
Error Response returned when encountered error
Show Source
500 Response
Error occured while processing this request
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error Response
Error Response returned when encountered error
Example:
{
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1",
"title":"Internal Server Error",
"detail":""
}
Nested Schema : Error Response
Type:
object
Title:
Error Response
Error Response returned when encountered error
Show Source
503 Response
Service not available
Root Schema : schema
Match All
Show Source
-
object
Error Response
Title:
Error Response
Error Response returned when encountered error
Example:
{
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4",
"title":"Service not available",
"detail":""
}
Nested Schema : Error Response
Type:
object
Title:
Error Response
Error Response returned when encountered error
Show Source