POST | /Initiation/Transferee | Initiates a transferee. |
---|
import Foundation
import ServiceStack
public class TransfereeInitiationRequest : IRequireClientScoped, IPost, Codable
{
/**
* Transferee initiation info needed for creation.
*/
// @ApiMember(Description="Transferee initiation info needed for creation.", IsRequired=true, ParameterType="body")
public var initiationInfo:TransfereeInitiation
required public init(){}
}
public class TransfereeInitiation : Codable
{
/**
* Client ID
*/
// @ApiMember(Description="Client ID")
public var clientId:String
/**
* External ID. This must be unique to the intiation's parent client
*/
// @ApiMember(Description="External ID. This must be unique to the intiation's parent client", IsRequired=true)
public var externalId:String
/**
* Transferee first name
*/
// @ApiMember(Description="Transferee first name", IsRequired=true)
public var firstName:String
/**
* Transferee last name
*/
// @ApiMember(Description="Transferee last name", IsRequired=true)
public var lastName:String
/**
* Assignment type
*/
// @ApiMember(Description="Assignment type")
public var assignmentType:String
/**
* Is this transferee pre-decision
*/
// @ApiMember(Description="Is this transferee pre-decision")
public var preDecision:Bool?
/**
* Is this transferee a VIP
*/
// @ApiMember(Description="Is this transferee a VIP")
public var vip:Bool?
/**
* Custom fields
*/
// @ApiMember(Description="Custom fields")
public var customFields:[CustomField] = []
/**
* Employee ID
*/
// @ApiMember(Description="Employee ID")
public var employeeId:String
/**
* Start date
*/
// @ApiMember(Description="Start date")
public var startDate:Date?
/**
* End date
*/
// @ApiMember(Description="End date")
public var endDate:Date?
/**
* Origin work location
*/
// @ApiMember(Description="Origin work location", IsRequired=true)
public var originWorkLocation:Location
/**
* Origin home address
*/
// @ApiMember(Description="Origin home address", IsRequired=true)
public var originHomeAddress:Address
/**
* Destination work location
*/
// @ApiMember(Description="Destination work location", IsRequired=true)
public var destinationWorkLocation:Location
/**
* Repat
*/
// @ApiMember(Description="Repat")
public var repat:String
/**
* Repat From City
*/
// @ApiMember(Description="Repat From City")
public var repatFromCity:String
/**
* Repat From State code
*/
// @ApiMember(Description="Repat From State code")
public var repatFromStateCode:String
/**
* Repat From Country Code
*/
// @ApiMember(Description="Repat From Country Code")
public var repatFromCountryCode:String
/**
* Repat To City
*/
// @ApiMember(Description="Repat To City")
public var repatToCity:String
/**
* Repat To State Code
*/
// @ApiMember(Description="Repat To State Code")
public var repatToStateCode:String
/**
* Repat To Country Code
*/
// @ApiMember(Description="Repat To Country Code")
public var repatToCountryCode:String
/**
* Transferee citizenship country
*/
// @ApiMember(Description="Transferee citizenship country")
public var citizenshipCountry:String
/**
* Transferee dual citizenship country
*/
// @ApiMember(Description="Transferee dual citizenship country")
public var dualCitizenshipCountry:String
/**
* Policy
*/
// @ApiMember(Description="Policy", IsRequired=true)
public var policy:String
/**
* Job title
*/
// @ApiMember(Description="Job title")
public var jobTitle:String
/**
* Marital status
*/
// @ApiMember(Description="Marital status", Name="MaritalStatus")
public var maritalStatus:MaritalStatus?
/**
* Pay grade
*/
// @ApiMember(Description="Pay grade")
public var payGrade:String
/**
* Assignment family size
*/
// @ApiMember(Description="Assignment family size")
public var assignmentFamilySize:Int?
/**
* Home owner status
*/
// @ApiMember(Description="Home owner status", Name="HomeOwnerStatus")
public var homeOwnerStatus:HomeOwnerStatus?
/**
* Line of business
*/
// @ApiMember(Description="Line of business", IsRequired=true)
public var lineOfBusiness:String
/**
* HostCurrency
*/
// @ApiMember(Description="HostCurrency")
public var hostCurrency:String
/**
* ServiceLevel
*/
// @ApiMember(Description="ServiceLevel")
public var serviceLevel:String
/**
* CompanyCodePrimary
*/
// @ApiMember(Description="CompanyCodePrimary")
public var companyCodePrimary:String
/**
* CompanyCodeSecondary
*/
// @ApiMember(Description="CompanyCodeSecondary")
public var companyCodeSecondary:String
/**
* CostCenterPrimary
*/
// @ApiMember(Description="CostCenterPrimary")
public var costCenterPrimary:String
/**
* CostCenterSecondary
*/
// @ApiMember(Description="CostCenterSecondary")
public var costCenterSecondary:String
/**
* CostCenterTertiary
*/
// @ApiMember(Description="CostCenterTertiary")
public var costCenterTertiary:String
/**
* Is the assignment confidential
*/
// @ApiMember(Description="Is the assignment confidential")
public var confidential:Bool?
/**
* Special Instructions
*/
// @ApiMember(Description="Special Instructions")
public var specialInstructions:String
/**
* Destination entity legal name
*/
// @ApiMember(Description="Destination entity legal name")
public var destinationEntityLegalName:String
/**
* Transferee mobile phone number
*/
// @ApiMember(Description="Transferee mobile phone number", IsRequired=true)
public var mobilePhoneNumber:String
/**
* Transferee work phone number
*/
// @ApiMember(Description="Transferee work phone number")
public var workPhoneNumber:String
/**
* Transferee home phone number
*/
// @ApiMember(Description="Transferee home phone number")
public var homePhoneNumber:String
/**
* Transferee primary email
*/
// @ApiMember(Description="Transferee primary email", IsRequired=true)
public var primaryEmail:String
/**
* Transferee secondary email
*/
// @ApiMember(Description="Transferee secondary email")
public var secondaryEmail:String
/**
* HR Contact First Name
*/
// @ApiMember(Description="HR Contact First Name")
public var hrContactFirstName:String
/**
* HR Contact Last Name
*/
// @ApiMember(Description="HR Contact Last Name")
public var hrContactLastName:String
/**
* HR contact full name
*/
// @ApiMember(Description="HR contact full name")
public var hrContactFullName:String
/**
* Transferee annual salary
*/
// @ApiMember(Description="Transferee annual salary")
public var annualSalary:String
/**
* Transferee spouse/partner
*/
// @ApiMember(Description="Transferee spouse/partner")
public var spousePartner:SpousePartner
/**
* Transferee dependents
*/
// @ApiMember(Description="Transferee dependents")
public var dependents:[Dependent] = []
/**
* Assignment Services
*/
// @ApiMember(Description="Assignment Services")
public var services:[Service] = []
/**
* Relocation Status
*/
// @ApiMember(Description="Relocation Status")
public var relocationStatus:String
/**
* Cancel
*/
// @ApiMember(Description="Cancel")
public var cancel:String
required public init(){}
}
public class CustomField : Codable
{
/**
* Custom field name
*/
// @ApiMember(Description="Custom field name", IsRequired=true)
public var fieldName:String
/**
* Custom field value
*/
// @ApiMember(Description="Custom field value")
public var fieldValue:String
required public init(){}
}
public class Location : Codable
{
public var title:String
public var city:String
public var stateCode:String
public var countryCode:String
required public init(){}
}
public class Address : Location
{
public var line1:String
public var line2:String
public var line3:String
public var postalCode:String
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case line1
case line2
case line3
case postalCode
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
line1 = try container.decodeIfPresent(String.self, forKey: .line1)
line2 = try container.decodeIfPresent(String.self, forKey: .line2)
line3 = try container.decodeIfPresent(String.self, forKey: .line3)
postalCode = try container.decodeIfPresent(String.self, forKey: .postalCode)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if line1 != nil { try container.encode(line1, forKey: .line1) }
if line2 != nil { try container.encode(line2, forKey: .line2) }
if line3 != nil { try container.encode(line3, forKey: .line3) }
if postalCode != nil { try container.encode(postalCode, forKey: .postalCode) }
}
}
public enum MaritalStatus : String, Codable
{
case Single
case Married
case DomesticPartner
case Divorcee
case Defacto
case Other
case Separated
case Interdependent
case Widowed
case Divorced
}
public enum HomeOwnerStatus : String, Codable
{
case Homeowner
case Renter
}
public class SpousePartner : Codable
{
public var firstName:String
public var lastName:String
public var birthDate:Date?
required public init(){}
}
public class Dependent : Codable
{
public var firstName:String
public var lastName:String
public var birthDate:Date?
// @ApiMember(IsRequired=true, Name="RelationshipToAssignee")
public var relationshipToAssignee:DependentAssigneeRelationship?
required public init(){}
}
public enum DependentAssigneeRelationship : String, Codable
{
case Child
case Other
}
public class ServiceData : Codable
{
/**
* Service data field name
*/
// @ApiMember(Description="Service data field name", IsRequired=true)
public var fieldName:String
/**
* Service data field value
*/
// @ApiMember(Description="Service data field value", IsRequired=true)
public var fieldValue:String
required public init(){}
}
public class TransfereeInitiationResponse : Codable
{
public var responseStatus:ResponseStatus
required public init(){}
}
Swift TransfereeInitiationRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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.sirva.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<TransfereeInitiationRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SIRVA.Relocation.Services.InitiationGateway.ServiceModel">
<InitiationInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/SIRVA.Relocation.Services.InitiationGateway.ServiceModel.Types">
<d2p1:AnnualSalary>String</d2p1:AnnualSalary>
<d2p1:AssignmentFamilySize>0</d2p1:AssignmentFamilySize>
<d2p1:AssignmentType>String</d2p1:AssignmentType>
<d2p1:Cancel>String</d2p1:Cancel>
<d2p1:CitizenshipCountry>String</d2p1:CitizenshipCountry>
<d2p1:ClientId>String</d2p1:ClientId>
<d2p1:CompanyCodePrimary>String</d2p1:CompanyCodePrimary>
<d2p1:CompanyCodeSecondary>String</d2p1:CompanyCodeSecondary>
<d2p1:Confidential>false</d2p1:Confidential>
<d2p1:CostCenterPrimary>String</d2p1:CostCenterPrimary>
<d2p1:CostCenterSecondary>String</d2p1:CostCenterSecondary>
<d2p1:CostCenterTertiary>String</d2p1:CostCenterTertiary>
<d2p1:CustomFields>
<d2p1:CustomField>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:FieldValue>String</d2p1:FieldValue>
</d2p1:CustomField>
</d2p1:CustomFields>
<d2p1:Dependents>
<d2p1:Dependent>
<d2p1:BirthDate>0001-01-01T00:00:00</d2p1:BirthDate>
<d2p1:FirstName>String</d2p1:FirstName>
<d2p1:LastName>String</d2p1:LastName>
<d2p1:RelationshipToAssignee>Child</d2p1:RelationshipToAssignee>
</d2p1:Dependent>
</d2p1:Dependents>
<d2p1:DestinationEntityLegalName>String</d2p1:DestinationEntityLegalName>
<d2p1:DestinationWorkLocation>
<d2p1:City>String</d2p1:City>
<d2p1:CountryCode>String</d2p1:CountryCode>
<d2p1:StateCode>String</d2p1:StateCode>
<d2p1:Title>String</d2p1:Title>
</d2p1:DestinationWorkLocation>
<d2p1:DualCitizenshipCountry>String</d2p1:DualCitizenshipCountry>
<d2p1:EmployeeId>String</d2p1:EmployeeId>
<d2p1:EndDate>0001-01-01T00:00:00</d2p1:EndDate>
<d2p1:ExternalId>String</d2p1:ExternalId>
<d2p1:FirstName>String</d2p1:FirstName>
<d2p1:HRContactFirstName>String</d2p1:HRContactFirstName>
<d2p1:HRContactFullName>String</d2p1:HRContactFullName>
<d2p1:HRContactLastName>String</d2p1:HRContactLastName>
<d2p1:HomeOwnerStatus>Homeowner</d2p1:HomeOwnerStatus>
<d2p1:HomePhoneNumber>String</d2p1:HomePhoneNumber>
<d2p1:HostCurrency>String</d2p1:HostCurrency>
<d2p1:JobTitle>String</d2p1:JobTitle>
<d2p1:LastName>String</d2p1:LastName>
<d2p1:LineOfBusiness>String</d2p1:LineOfBusiness>
<d2p1:MaritalStatus>Single</d2p1:MaritalStatus>
<d2p1:MobilePhoneNumber>String</d2p1:MobilePhoneNumber>
<d2p1:OriginHomeAddress>
<d2p1:City>String</d2p1:City>
<d2p1:CountryCode>String</d2p1:CountryCode>
<d2p1:StateCode>String</d2p1:StateCode>
<d2p1:Title>String</d2p1:Title>
<d2p1:Line1>String</d2p1:Line1>
<d2p1:Line2>String</d2p1:Line2>
<d2p1:Line3>String</d2p1:Line3>
<d2p1:PostalCode>String</d2p1:PostalCode>
</d2p1:OriginHomeAddress>
<d2p1:OriginWorkLocation>
<d2p1:City>String</d2p1:City>
<d2p1:CountryCode>String</d2p1:CountryCode>
<d2p1:StateCode>String</d2p1:StateCode>
<d2p1:Title>String</d2p1:Title>
</d2p1:OriginWorkLocation>
<d2p1:PayGrade>String</d2p1:PayGrade>
<d2p1:Policy>String</d2p1:Policy>
<d2p1:PreDecision>false</d2p1:PreDecision>
<d2p1:PrimaryEmail>String</d2p1:PrimaryEmail>
<d2p1:RelocationStatus>String</d2p1:RelocationStatus>
<d2p1:Repat>String</d2p1:Repat>
<d2p1:RepatFromCity>String</d2p1:RepatFromCity>
<d2p1:RepatFromCountryCode>String</d2p1:RepatFromCountryCode>
<d2p1:RepatFromStateCode>String</d2p1:RepatFromStateCode>
<d2p1:RepatToCity>String</d2p1:RepatToCity>
<d2p1:RepatToCountryCode>String</d2p1:RepatToCountryCode>
<d2p1:RepatToStateCode>String</d2p1:RepatToStateCode>
<d2p1:SecondaryEmail>String</d2p1:SecondaryEmail>
<d2p1:ServiceLevel>String</d2p1:ServiceLevel>
<d2p1:Services>
<d2p1:Service>
<d2p1:Cancel>String</d2p1:Cancel>
<d2p1:Data>
<d2p1:ServiceData>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:FieldValue>String</d2p1:FieldValue>
</d2p1:ServiceData>
</d2p1:Data>
<d2p1:Name>String</d2p1:Name>
</d2p1:Service>
</d2p1:Services>
<d2p1:SpecialInstructions>String</d2p1:SpecialInstructions>
<d2p1:SpousePartner>
<d2p1:BirthDate>0001-01-01T00:00:00</d2p1:BirthDate>
<d2p1:FirstName>String</d2p1:FirstName>
<d2p1:LastName>String</d2p1:LastName>
</d2p1:SpousePartner>
<d2p1:StartDate>0001-01-01T00:00:00</d2p1:StartDate>
<d2p1:VIP>false</d2p1:VIP>
<d2p1:WorkPhoneNumber>String</d2p1:WorkPhoneNumber>
</InitiationInfo>
</TransfereeInitiationRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <TransfereeInitiationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SIRVA.Relocation.Services.InitiationGateway.ServiceModel"> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> </TransfereeInitiationResponse>