Create/ Add a new contract
post
/spms/v1/contracts
This is to create/ add a new contract
Request
Supported Media Types
- application/json
Required fields to create Contract
Root Schema : Contract
Type:
object
Title:
Contract
Legal document for guest to sign/ acknowledge
Show Source
-
category:
integer
Minimum Value:
1
Maximum Value:1
This value is the id value obtained from Contract CategoryExample:1
-
content(optional):
string
Minimum Value:
0
Maximum Value:50000
Pattern:^[a-zA-Z0-9 _,\\?/\\.\\-\\\\+\\*\n~!@#$%&{}\\[\\]()=<>\\|\\^\\":;@`]*$
This is the content of the contractExample:Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
-
enabled(optional):
boolean
Indicates whether this contract is enabledExample:
true
-
id(optional):
integer
This value is id of the contractExample:
1
-
name:
string
Minimum Value:
1
Maximum Value:100
Pattern:^[a-zA-Z0-9 ]*$
Example:Oracle Cruise Contract
-
remarks(optional):
boolean
Indicates whether the remarks textbox should be displayed or notExample:
true
-
signature(optional):
boolean
Indicates whether the signature is required or not. True indicates required, false indicates not required.Example:
true
-
termsAndCondition(optional):
string
Minimum Value:
0
Maximum Value:500
Pattern:^[a-zA-Z0-9 _,\\?/\\.\\-\\\\+\\*\n~!@#$%&{}\\[\\]()=<>\\|\\^\\":;@`]*$
This is the actual terms and condition for this contractExample:Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
-
termsAndConditionStatus(optional):
boolean
Indicates whether the terms and condition is mandatory or optional. True indicates mandatory, false indicates optional.Example:
true
Response
Supported Media Types
- application/json
201 Response
Created
Root Schema : Contract
Type:
object
Title:
Contract
Legal document for guest to sign/ acknowledge
Show Source
-
category:
integer
Minimum Value:
1
Maximum Value:1
This value is the id value obtained from Contract CategoryExample:1
-
content(optional):
string
Minimum Value:
0
Maximum Value:50000
Pattern:^[a-zA-Z0-9 _,\\?/\\.\\-\\\\+\\*\n~!@#$%&{}\\[\\]()=<>\\|\\^\\":;@`]*$
This is the content of the contractExample:Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
-
enabled(optional):
boolean
Indicates whether this contract is enabledExample:
true
-
id(optional):
integer
This value is the primary key for Contract
-
name:
string
Minimum Value:
1
Maximum Value:100
Pattern:^[a-zA-Z0-9 ]*$
Example:Oracle Cruise Contract
-
remarks(optional):
boolean
Indicates whether the remarks textbox should be displayed or notExample:
true
-
signature(optional):
boolean
Indicates whether the signature is required or not. True indicates required, false indicates not required.Example:
true
-
termsAndCondition(optional):
string
Minimum Value:
0
Maximum Value:500
Pattern:^[a-zA-Z0-9 _,\\?/\\.\\-\\\\+\\*\n~!@#$%&{}\\[\\]()=<>\\|\\^\\":;@`]*$
This is the actual terms and condition for this contractExample:Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
-
termsAndConditionStatus(optional):
boolean
Indicates whether the terms and condition is mandatory or optional. True indicates mandatory, false indicates optional.Example:
true
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":"The parameter id has incorrect format"
}
Nested Schema : Error Response
Type:
object
Title:
Error Response
Error Response returned when encountered error
Show Source
401 Response
Unauthorized
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":"HTTP://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4",
"title":"Forbidden",
"detail":"Access to this resource was 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:
{
"type":"https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6",
"title":"Method Not Supported",
"detail":"HTTP method not supported for this resource"
}
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":"Conflict",
"detail":"Contract name duplicate"
}
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:
{
"type":"HTTP://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.16",
"title":"Invalid content",
"detail":"Content type Not supported"
}
Nested Schema : Error Response
Type:
object
Title:
Error Response
Error Response returned when encountered error
Show Source
500 Response
Internal Server Error
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.5.1",
"title":"Internal Server Error",
"detail":"Issue fulfilling request. Please retry or contact support"
}
Nested Schema : Error Response
Type:
object
Title:
Error Response
Error Response returned when encountered error
Show Source
503 Response
Service Unavailable
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.5.4",
"title":"Service Unavailable",
"detail":"Service not available"
}
Nested Schema : Error Response
Type:
object
Title:
Error Response
Error Response returned when encountered error
Show Source