SIRVA.Relocation.Services.InitiationGateway

<back to all web services

TransfereeInitiationRequest

Requires Authentication
The following routes are available for this service:
POST/Initiation/TransfereeInitiates a transferee.
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 TransfereeInitiationResponse:
    response_status: Optional[ResponseStatus] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CustomField:
    # @ApiMember(Description="Custom field name", IsRequired=true)
    field_name: Optional[str] = None
    """
    Custom field name
    """


    # @ApiMember(Description="Custom field value")
    field_value: Optional[str] = None
    """
    Custom field value
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Location:
    title: Optional[str] = None
    city: Optional[str] = None
    state_code: Optional[str] = None
    country_code: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Address(Location):
    line1: Optional[str] = None
    line2: Optional[str] = None
    line3: Optional[str] = None
    postal_code: Optional[str] = None


class MaritalStatus(str, Enum):
    SINGLE = 'Single'
    MARRIED = 'Married'
    DOMESTIC_PARTNER = 'DomesticPartner'
    DIVORCEE = 'Divorcee'
    DEFACTO = 'Defacto'
    OTHER = 'Other'
    SEPARATED = 'Separated'
    INTERDEPENDENT = 'Interdependent'
    WIDOWED = 'Widowed'
    DIVORCED = 'Divorced'


class HomeOwnerStatus(str, Enum):
    HOMEOWNER = 'Homeowner'
    RENTER = 'Renter'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SpousePartner:
    first_name: Optional[str] = None
    last_name: Optional[str] = None
    birth_date: Optional[datetime.datetime] = None


class DependentAssigneeRelationship(str, Enum):
    CHILD = 'Child'
    OTHER = 'Other'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Dependent:
    first_name: Optional[str] = None
    last_name: Optional[str] = None
    birth_date: Optional[datetime.datetime] = None
    # @ApiMember(IsRequired=true, Name="RelationshipToAssignee")
    relationship_to_assignee: Optional[DependentAssigneeRelationship] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ServiceData:
    # @ApiMember(Description="Service data field name", IsRequired=true)
    field_name: Optional[str] = None
    """
    Service data field name
    """


    # @ApiMember(Description="Service data field value", IsRequired=true)
    field_value: Optional[str] = None
    """
    Service data field value
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Service:
    # @ApiMember(Description="Service name", IsRequired=true)
    name: Optional[str] = None
    """
    Service name
    """


    # @ApiMember(Description="Service data")
    data: Optional[List[ServiceData]] = None
    """
    Service data
    """


    # @ApiMember(Description="Cancel")
    cancel: Optional[str] = None
    """
    Cancel
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TransfereeInitiation:
    # @ApiMember(Description="Client ID")
    client_id: Optional[str] = None
    """
    Client ID
    """


    # @ApiMember(Description="External ID. This must be unique to the intiation's parent client", IsRequired=true)
    external_id: Optional[str] = None
    """
    External ID. This must be unique to the intiation's parent client
    """


    # @ApiMember(Description="Transferee first name", IsRequired=true)
    first_name: Optional[str] = None
    """
    Transferee first name
    """


    # @ApiMember(Description="Transferee last name", IsRequired=true)
    last_name: Optional[str] = None
    """
    Transferee last name
    """


    # @ApiMember(Description="Assignment type")
    assignment_type: Optional[str] = None
    """
    Assignment type
    """


    # @ApiMember(Description="Is this transferee pre-decision")
    pre_decision: Optional[bool] = None
    """
    Is this transferee pre-decision
    """


    # @ApiMember(Description="Is this transferee a VIP")
    vip: Optional[bool] = None
    """
    Is this transferee a VIP
    """


    # @ApiMember(Description="Custom fields")
    custom_fields: Optional[List[CustomField]] = None
    """
    Custom fields
    """


    # @ApiMember(Description="Employee ID")
    employee_id: Optional[str] = None
    """
    Employee ID
    """


    # @ApiMember(Description="Start date")
    start_date: Optional[datetime.datetime] = None
    """
    Start date
    """


    # @ApiMember(Description="End date")
    end_date: Optional[datetime.datetime] = None
    """
    End date
    """


    # @ApiMember(Description="Origin work location", IsRequired=true)
    origin_work_location: Optional[Location] = None
    """
    Origin work location
    """


    # @ApiMember(Description="Origin home address", IsRequired=true)
    origin_home_address: Optional[Address] = None
    """
    Origin home address
    """


    # @ApiMember(Description="Destination work location", IsRequired=true)
    destination_work_location: Optional[Location] = None
    """
    Destination work location
    """


    # @ApiMember(Description="Repat")
    repat: Optional[str] = None
    """
    Repat
    """


    # @ApiMember(Description="Repat From City")
    repat_from_city: Optional[str] = None
    """
    Repat From City
    """


    # @ApiMember(Description="Repat From State code")
    repat_from_state_code: Optional[str] = None
    """
    Repat From State code
    """


    # @ApiMember(Description="Repat From Country Code")
    repat_from_country_code: Optional[str] = None
    """
    Repat From Country Code
    """


    # @ApiMember(Description="Repat To City")
    repat_to_city: Optional[str] = None
    """
    Repat To City
    """


    # @ApiMember(Description="Repat To State Code")
    repat_to_state_code: Optional[str] = None
    """
    Repat To State Code
    """


    # @ApiMember(Description="Repat To Country Code")
    repat_to_country_code: Optional[str] = None
    """
    Repat To Country Code
    """


    # @ApiMember(Description="Transferee citizenship country")
    citizenship_country: Optional[str] = None
    """
    Transferee citizenship country
    """


    # @ApiMember(Description="Transferee dual citizenship country")
    dual_citizenship_country: Optional[str] = None
    """
    Transferee dual citizenship country
    """


    # @ApiMember(Description="Policy", IsRequired=true)
    policy: Optional[str] = None
    """
    Policy
    """


    # @ApiMember(Description="Job title")
    job_title: Optional[str] = None
    """
    Job title
    """


    # @ApiMember(Description="Marital status", Name="MaritalStatus")
    marital_status: Optional[MaritalStatus] = None
    """
    Marital status
    """


    # @ApiMember(Description="Pay grade")
    pay_grade: Optional[str] = None
    """
    Pay grade
    """


    # @ApiMember(Description="Assignment family size")
    assignment_family_size: Optional[int] = None
    """
    Assignment family size
    """


    # @ApiMember(Description="Home owner status", Name="HomeOwnerStatus")
    home_owner_status: Optional[HomeOwnerStatus] = None
    """
    Home owner status
    """


    # @ApiMember(Description="Line of business", IsRequired=true)
    line_of_business: Optional[str] = None
    """
    Line of business
    """


    # @ApiMember(Description="HostCurrency")
    host_currency: Optional[str] = None
    """
    HostCurrency
    """


    # @ApiMember(Description="ServiceLevel")
    service_level: Optional[str] = None
    """
    ServiceLevel
    """


    # @ApiMember(Description="CompanyCodePrimary")
    company_code_primary: Optional[str] = None
    """
    CompanyCodePrimary
    """


    # @ApiMember(Description="CompanyCodeSecondary")
    company_code_secondary: Optional[str] = None
    """
    CompanyCodeSecondary
    """


    # @ApiMember(Description="CostCenterPrimary")
    cost_center_primary: Optional[str] = None
    """
    CostCenterPrimary
    """


    # @ApiMember(Description="CostCenterSecondary")
    cost_center_secondary: Optional[str] = None
    """
    CostCenterSecondary
    """


    # @ApiMember(Description="CostCenterTertiary")
    cost_center_tertiary: Optional[str] = None
    """
    CostCenterTertiary
    """


    # @ApiMember(Description="Is the assignment confidential")
    confidential: Optional[bool] = None
    """
    Is the assignment confidential
    """


    # @ApiMember(Description="Special Instructions")
    special_instructions: Optional[str] = None
    """
    Special Instructions
    """


    # @ApiMember(Description="Destination entity legal name")
    destination_entity_legal_name: Optional[str] = None
    """
    Destination entity legal name
    """


    # @ApiMember(Description="Transferee mobile phone number", IsRequired=true)
    mobile_phone_number: Optional[str] = None
    """
    Transferee mobile phone number
    """


    # @ApiMember(Description="Transferee work phone number")
    work_phone_number: Optional[str] = None
    """
    Transferee work phone number
    """


    # @ApiMember(Description="Transferee home phone number")
    home_phone_number: Optional[str] = None
    """
    Transferee home phone number
    """


    # @ApiMember(Description="Transferee primary email", IsRequired=true)
    primary_email: Optional[str] = None
    """
    Transferee primary email
    """


    # @ApiMember(Description="Transferee secondary email")
    secondary_email: Optional[str] = None
    """
    Transferee secondary email
    """


    # @ApiMember(Description="HR Contact First Name")
    hr_contact_first_name: Optional[str] = None
    """
    HR Contact First Name
    """


    # @ApiMember(Description="HR Contact Last Name")
    hr_contact_last_name: Optional[str] = None
    """
    HR Contact Last Name
    """


    # @ApiMember(Description="HR contact full name")
    hr_contact_full_name: Optional[str] = None
    """
    HR contact full name
    """


    # @ApiMember(Description="Transferee annual salary")
    annual_salary: Optional[str] = None
    """
    Transferee annual salary
    """


    # @ApiMember(Description="Transferee spouse/partner")
    spouse_partner: Optional[SpousePartner] = None
    """
    Transferee spouse/partner
    """


    # @ApiMember(Description="Transferee dependents")
    dependents: Optional[List[Dependent]] = None
    """
    Transferee dependents
    """


    # @ApiMember(Description="Assignment Services")
    services: Optional[List[Service]] = None
    """
    Assignment Services
    """


    # @ApiMember(Description="Relocation Status")
    relocation_status: Optional[str] = None
    """
    Relocation Status
    """


    # @ApiMember(Description="Cancel")
    cancel: Optional[str] = None
    """
    Cancel
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TransfereeInitiationRequest(IRequireClientScoped, IPost):
    # @ApiMember(Description="Transferee initiation info needed for creation.", IsRequired=true, ParameterType="body")
    initiation_info: Optional[TransfereeInitiation] = None
    """
    Transferee initiation info needed for creation.
    """

Python TransfereeInitiationRequest 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 /Initiation/Transferee HTTP/1.1 
Host: initiation-api-test.sirva.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	initiationInfo: 
	{
		clientId: String,
		externalId: String,
		firstName: String,
		lastName: String,
		assignmentType: String,
		preDecision: False,
		vip: False,
		customFields: 
		[
			{
				fieldName: String,
				fieldValue: String
			}
		],
		employeeId: String,
		startDate: 0001-01-01,
		endDate: 0001-01-01,
		originWorkLocation: 
		{
			title: String,
			city: String,
			stateCode: String,
			countryCode: String
		},
		originHomeAddress: 
		{
			line1: String,
			line2: String,
			line3: String,
			postalCode: String,
			title: String,
			city: String,
			stateCode: String,
			countryCode: String
		},
		destinationWorkLocation: 
		{
			title: String,
			city: String,
			stateCode: String,
			countryCode: String
		},
		repat: String,
		repatFromCity: String,
		repatFromStateCode: String,
		repatFromCountryCode: String,
		repatToCity: String,
		repatToStateCode: String,
		repatToCountryCode: String,
		citizenshipCountry: String,
		dualCitizenshipCountry: String,
		policy: String,
		jobTitle: String,
		maritalStatus: Single,
		payGrade: String,
		assignmentFamilySize: 0,
		homeOwnerStatus: Homeowner,
		lineOfBusiness: String,
		hostCurrency: String,
		serviceLevel: String,
		companyCodePrimary: String,
		companyCodeSecondary: String,
		costCenterPrimary: String,
		costCenterSecondary: String,
		costCenterTertiary: String,
		confidential: False,
		specialInstructions: String,
		destinationEntityLegalName: String,
		mobilePhoneNumber: String,
		workPhoneNumber: String,
		homePhoneNumber: String,
		primaryEmail: String,
		secondaryEmail: String,
		hrContactFirstName: String,
		hrContactLastName: String,
		hrContactFullName: String,
		annualSalary: String,
		spousePartner: 
		{
			firstName: String,
			lastName: String,
			birthDate: 0001-01-01
		},
		dependents: 
		[
			{
				firstName: String,
				lastName: String,
				birthDate: 0001-01-01,
				relationshipToAssignee: Child
			}
		],
		services: 
		[
			{
				name: String,
				data: 
				[
					{
						fieldName: String,
						fieldValue: String
					}
				],
				cancel: String
			}
		],
		relocationStatus: String,
		cancel: 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
		}
	}
}