regis

<back to all web services

AddressAndBioRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/person/{uuid}/addressAndBio
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PersonExtendedResponse:
    response_status: Optional[ResponseStatus] = None
    regent_id: int = 0
    ubc_id: Optional[int] = None
    spouse_regent_id: Optional[int] = None
    uuid: Optional[str] = None
    regent_login: Optional[str] = None
    spouse_rwl: Optional[str] = None
    first_name: Optional[str] = None
    middle_name: Optional[str] = None
    last_name: Optional[str] = None
    preferred_name: Optional[str] = None
    birth_name: Optional[str] = None
    override_transcript_name: Optional[str] = None
    spouse_name: Optional[str] = None
    addr1: Optional[str] = None
    addr2: Optional[str] = None
    country: Optional[str] = None
    state: Optional[str] = None
    city: Optional[str] = None
    code: Optional[str] = None
    phone_home: Optional[str] = None
    phone_cell: Optional[str] = None
    phone_bus: Optional[str] = None
    email: Optional[str] = None
    prefix: Optional[str] = None
    dob: Optional[datetime.datetime] = None
    citizenship: Optional[str] = None
    citizenship_other: Optional[str] = None
    permanent_resident: Optional[str] = None
    denomination: Optional[str] = None
    occupation: Optional[str] = None
    ethnicity: Optional[str] = None
    gender: Optional[str] = None
    marital_status: Optional[str] = None
    deceased_date: Optional[datetime.datetime] = None
    is_donor: bool = False
    is_vendor: bool = False
    is_gp_customer: bool = False
    crm_student_status: Optional[str] = None
    crm_assigned: Optional[str] = None
    last_registered_term: Optional[str] = None
    is_regent_staff: bool = False
    regent_title: Optional[str] = None
    regent_department: Optional[str] = None
    regent_faculty_profile_url: Optional[str] = None
    regent_image_url: Optional[str] = None
    include_on_website: bool = False
    added_by: Optional[str] = None
    added_date: Optional[datetime.datetime] = None
    last_changed_by: Optional[str] = None
    last_changed_date: Optional[datetime.datetime] = None
    addr_last_changed_by: Optional[str] = None
    addr_last_changed_date: Optional[datetime.datetime] = None
    tax_number: Optional[str] = None
    regent_current_program: Optional[str] = None
    regent_degrees: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PersonPictureResponse:
    response_status: Optional[ResponseStatus] = None
    image_base64: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CountriesAndStatesResponse:
    country_code: Optional[str] = None
    country_name: Optional[str] = None
    states: Optional[Dict[str, str]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PrefixResponse:
    prefix_code: Optional[str] = None
    prefix_name: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Occupation:
    id: int = 0
    code: Optional[str] = None
    occupation_name: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Denomination:
    id: int = 0
    code: Optional[str] = None
    denomination_name: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Ethnicity:
    id: int = 0
    code: Optional[str] = None
    ethnicity_name: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AddressAndBioResponse:
    response_status: Optional[ResponseStatus] = None
    person: Optional[PersonExtendedResponse] = None
    picture: Optional[PersonPictureResponse] = None
    countries_and_states: Optional[List[CountriesAndStatesResponse]] = None
    prefixes: Optional[List[PrefixResponse]] = None
    marital_statuses: Optional[Dict[str, str]] = None
    occupations: Optional[List[Occupation]] = None
    denominations: Optional[List[Denomination]] = None
    ethnicities: Optional[List[Ethnicity]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AddressAndBioRequest:
    uuid: Optional[str] = None

Python AddressAndBioRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /person/{uuid}/addressAndBio 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
		}
	},
	person: 
	{
		responseStatus: 
		{
			errorCode: String,
			message: String,
			stackTrace: String,
			errors: 
			[
				{
					errorCode: String,
					fieldName: String,
					message: String,
					meta: 
					{
						String: String
					}
				}
			],
			meta: 
			{
				String: String
			}
		},
		regent_id: 0,
		ubc_id: 0,
		spouse_regent_id: 0,
		uuid: String,
		regent_login: String,
		spouse_rwl: String,
		first_name: String,
		middle_name: String,
		last_name: String,
		preferred_name: String,
		birth_name: String,
		override_transcript_name: String,
		spouse_name: String,
		addr1: String,
		addr2: String,
		country: String,
		state: String,
		city: String,
		code: String,
		phone_home: String,
		phone_cell: String,
		phone_bus: String,
		email: String,
		prefix: String,
		dob: 0001-01-01,
		citizenship: String,
		citizenship_other: String,
		permanent_resident: String,
		denomination: String,
		occupation: String,
		ethnicity: String,
		gender: String,
		marital_status: String,
		deceased_date: 0001-01-01,
		is_donor: False,
		is_vendor: False,
		is_gp_customer: False,
		crm_student_status: String,
		crm_assigned: String,
		last_registered_term: String,
		is_regent_staff: False,
		regent_title: String,
		regent_department: String,
		regent_faculty_profile_url: String,
		regent_image_url: String,
		include_on_website: False,
		added_by: String,
		added_date: 0001-01-01,
		last_changed_by: String,
		last_changed_date: 0001-01-01,
		addr_last_changed_by: String,
		addr_last_changed_date: 0001-01-01,
		tax_number: String,
		regent_current_program: String,
		regent_degrees: String
	},
	picture: 
	{
		responseStatus: 
		{
			errorCode: String,
			message: String,
			stackTrace: String,
			errors: 
			[
				{
					errorCode: String,
					fieldName: String,
					message: String,
					meta: 
					{
						String: String
					}
				}
			],
			meta: 
			{
				String: String
			}
		},
		imageBase64: String
	},
	countriesAndStates: 
	[
		{
			country_code: String,
			country_name: String,
			states: 
			{
				String: String
			}
		}
	],
	prefixes: 
	[
		{
			prefix_code: String,
			prefix_name: String
		}
	],
	maritalStatuses: 
	{
		String: String
	},
	occupations: 
	[
		{
			id: 0,
			code: String,
			occupation_name: String
		}
	],
	denominations: 
	[
		{
			id: 0,
			code: String,
			denomination_name: String
		}
	],
	ethnicities: 
	[
		{
			id: 0,
			code: String,
			ethnicity_name: String
		}
	]
}