Create Questionnaire Template

post

/spms/v1/questionnaires/templates

Creates questionnaire template

Request

Supported Media Types
Body ()
Required to create questionnaire template
Root Schema : questionnaireTemplate
Type: object
Questionnaire template
Show Source
  • Minimum Value: 1
    Pattern: ^[0-9]*$
    Questionnaire category Id
    Example: 1
  • Activation status of questionnaire template: * `true` - Questionnaire template is active * `false` - Questionnaire template is inactive
  • Minimum Length: 1
    Maximum Length: 4000
    The name of questionnaire template
    Example: China Embarkation Questionnaire
Back to Top

Response

Supported Media Types

201 Response

Created
Body ()
Root Schema : questionnaireTemplateWithId
Type: object
Questionnaire template
Show Source
  • Activation status of questionnaire template: * `true` - Questionnaire template is active * `false` - Questionnaire template is inactive
  • Minimum Value: 1
    Pattern: ^[0-9]*$
    Questionnaire template Id
    Example: 1001
  • questionnaireCategory
    Title: questionnaireCategory
  • Minimum Length: 1
    Maximum Length: 4000
    The name of questionnaire template
    Example: China Embarkation Questionnaire
  • 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
Title: questionnaireCategory
Show Source
  • Minimum Length: 1
    Maximum Length: 4000
    Example: Embarkation
  • Activation status of questionnaire category: * `true` - Questionnaire category is active * `false` - Questionnaire category is inactive
  • Minimum Value: 1
    Maximum Value: 12
    Pattern: ^[0-9]*$
    Example: 1

400 Response

Bad Request
Body ()
Root Schema : schema
Match All
Show Source
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
Body ()
Root Schema : schema
Match All
Show Source
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
Body ()
Root Schema : schema
Match All
Show Source
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
Body ()
Root Schema : schema
Match All
Show Source
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
Body ()
Root Schema : schema
Match All
Show Source
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
Body ()
Root Schema : schema
Match All
Show Source
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
Body ()
Root Schema : schema
Match All
Show Source
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
Body ()
Root Schema : schema
Match All
Show Source
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
Body ()
Root Schema : schema
Match All
Show Source
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
Back to Top