| Required role: | REGISUserRole |
| POST | /Person/{uuid}/Restrictions |
|---|
import Foundation
import ServiceStack
public class PersonRestrictionsRequest : Codable
{
public var uuid:String
required public init(){}
}
public class PersonRestrictionsResponse : Codable
{
public var responseStatus:ResponseStatus
public var regent_id:Int
public var uuid:String
public var restrictions:[PersonRestrictionResponse] = []
public var valid_restrictions:[RestrictionResponse] = []
required public init(){}
}
public class PersonRestrictionResponse : Codable
{
public var id:Int
public var restriction_code:String
public var restriction_description:String
public var start_date:Date?
public var end_date:Date?
required public init(){}
}
public class RestrictionResponse : Codable
{
public var id:Int
public var restriction_code:String
public var restriction_description:String
public var is_active:Bool
required public init(){}
}
Swift PersonRestrictionsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Person/{uuid}/Restrictions HTTP/1.1
Host: data.regent-college.edu
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
uuid: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
},
regent_id: 0,
uuid: String,
restrictions:
[
{
id: 0,
restriction_code: String,
restriction_description: String,
start_date: 0001-01-01,
end_date: 0001-01-01
}
],
valid_restrictions:
[
{
id: 0,
restriction_code: String,
restriction_description: String,
is_active: False
}
]
}