POST | /Initiation/Transferee | Initiates a transferee. |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using SIRVA.Relocation.Services.InitiationGateway.ServiceModel;
using SIRVA.Relocation.Services.InitiationGateway.ServiceModel.Types;
namespace SIRVA.Relocation.Services.InitiationGateway.ServiceModel
{
public partial class TransfereeInitiationRequest
: IRequireClientScoped, IPost
{
///<summary>
///Transferee initiation info needed for creation.
///</summary>
[ApiMember(Description="Transferee initiation info needed for creation.", IsRequired=true, ParameterType="body")]
public virtual TransfereeInitiation InitiationInfo { get; set; }
}
public partial class TransfereeInitiationResponse
{
public virtual ResponseStatus ResponseStatus { get; set; }
}
}
namespace SIRVA.Relocation.Services.InitiationGateway.ServiceModel.Types
{
public partial class Address
: Location
{
public virtual string Line1 { get; set; }
public virtual string Line2 { get; set; }
public virtual string Line3 { get; set; }
public virtual string PostalCode { get; set; }
}
public partial class CustomField
{
///<summary>
///Custom field name
///</summary>
[ApiMember(Description="Custom field name", IsRequired=true)]
public virtual string FieldName { get; set; }
///<summary>
///Custom field value
///</summary>
[ApiMember(Description="Custom field value")]
public virtual string FieldValue { get; set; }
}
public partial class Dependent
{
public virtual string FirstName { get; set; }
public virtual string LastName { get; set; }
public virtual DateTime? BirthDate { get; set; }
[ApiMember(IsRequired=true, Name="RelationshipToAssignee")]
public virtual DependentAssigneeRelationship? RelationshipToAssignee { get; set; }
}
public enum DependentAssigneeRelationship
{
Child,
Other,
}
public enum HomeOwnerStatus
{
Homeowner,
Renter,
}
public partial class Location
{
public virtual string Title { get; set; }
public virtual string City { get; set; }
public virtual string StateCode { get; set; }
public virtual string CountryCode { get; set; }
}
public enum MaritalStatus
{
Single,
Married,
DomesticPartner,
Divorcee,
Defacto,
Other,
Separated,
Interdependent,
Widowed,
Divorced,
}
public partial class Service
{
public Service()
{
Data = new List<ServiceData>{};
}
///<summary>
///Service name
///</summary>
[ApiMember(Description="Service name", IsRequired=true)]
public virtual string Name { get; set; }
///<summary>
///Service data
///</summary>
[ApiMember(Description="Service data")]
public virtual List<ServiceData> Data { get; set; }
///<summary>
///Cancel
///</summary>
[ApiMember(Description="Cancel")]
public virtual string Cancel { get; set; }
}
public partial class ServiceData
{
///<summary>
///Service data field name
///</summary>
[ApiMember(Description="Service data field name", IsRequired=true)]
public virtual string FieldName { get; set; }
///<summary>
///Service data field value
///</summary>
[ApiMember(Description="Service data field value", IsRequired=true)]
public virtual string FieldValue { get; set; }
}
public partial class SpousePartner
{
public virtual string FirstName { get; set; }
public virtual string LastName { get; set; }
public virtual DateTime? BirthDate { get; set; }
}
public partial class TransfereeInitiation
{
public TransfereeInitiation()
{
CustomFields = new List<CustomField>{};
Dependents = new List<Dependent>{};
Services = new List<Service>{};
}
///<summary>
///Client ID
///</summary>
[ApiMember(Description="Client ID")]
public virtual string ClientId { get; set; }
///<summary>
///External ID. This must be unique to the intiation's parent client
///</summary>
[ApiMember(Description="External ID. This must be unique to the intiation's parent client", IsRequired=true)]
public virtual string ExternalId { get; set; }
///<summary>
///Transferee first name
///</summary>
[ApiMember(Description="Transferee first name", IsRequired=true)]
public virtual string FirstName { get; set; }
///<summary>
///Transferee last name
///</summary>
[ApiMember(Description="Transferee last name", IsRequired=true)]
public virtual string LastName { get; set; }
///<summary>
///Assignment type
///</summary>
[ApiMember(Description="Assignment type")]
public virtual string AssignmentType { get; set; }
///<summary>
///Is this transferee pre-decision
///</summary>
[ApiMember(Description="Is this transferee pre-decision")]
public virtual bool? PreDecision { get; set; }
///<summary>
///Is this transferee a VIP
///</summary>
[ApiMember(Description="Is this transferee a VIP")]
public virtual bool? VIP { get; set; }
///<summary>
///Custom fields
///</summary>
[ApiMember(Description="Custom fields")]
public virtual List<CustomField> CustomFields { get; set; }
///<summary>
///Employee ID
///</summary>
[ApiMember(Description="Employee ID")]
public virtual string EmployeeId { get; set; }
///<summary>
///Start date
///</summary>
[ApiMember(Description="Start date")]
public virtual DateTime? StartDate { get; set; }
///<summary>
///End date
///</summary>
[ApiMember(Description="End date")]
public virtual DateTime? EndDate { get; set; }
///<summary>
///Origin work location
///</summary>
[ApiMember(Description="Origin work location", IsRequired=true)]
public virtual Location OriginWorkLocation { get; set; }
///<summary>
///Origin home address
///</summary>
[ApiMember(Description="Origin home address", IsRequired=true)]
public virtual Address OriginHomeAddress { get; set; }
///<summary>
///Destination work location
///</summary>
[ApiMember(Description="Destination work location", IsRequired=true)]
public virtual Location DestinationWorkLocation { get; set; }
///<summary>
///Repat
///</summary>
[ApiMember(Description="Repat")]
public virtual string Repat { get; set; }
///<summary>
///Repat From City
///</summary>
[ApiMember(Description="Repat From City")]
public virtual string RepatFromCity { get; set; }
///<summary>
///Repat From State code
///</summary>
[ApiMember(Description="Repat From State code")]
public virtual string RepatFromStateCode { get; set; }
///<summary>
///Repat From Country Code
///</summary>
[ApiMember(Description="Repat From Country Code")]
public virtual string RepatFromCountryCode { get; set; }
///<summary>
///Repat To City
///</summary>
[ApiMember(Description="Repat To City")]
public virtual string RepatToCity { get; set; }
///<summary>
///Repat To State Code
///</summary>
[ApiMember(Description="Repat To State Code")]
public virtual string RepatToStateCode { get; set; }
///<summary>
///Repat To Country Code
///</summary>
[ApiMember(Description="Repat To Country Code")]
public virtual string RepatToCountryCode { get; set; }
///<summary>
///Transferee citizenship country
///</summary>
[ApiMember(Description="Transferee citizenship country")]
public virtual string CitizenshipCountry { get; set; }
///<summary>
///Transferee dual citizenship country
///</summary>
[ApiMember(Description="Transferee dual citizenship country")]
public virtual string DualCitizenshipCountry { get; set; }
///<summary>
///Policy
///</summary>
[ApiMember(Description="Policy", IsRequired=true)]
public virtual string Policy { get; set; }
///<summary>
///Job title
///</summary>
[ApiMember(Description="Job title")]
public virtual string JobTitle { get; set; }
///<summary>
///Marital status
///</summary>
[ApiMember(Description="Marital status", Name="MaritalStatus")]
public virtual MaritalStatus? MaritalStatus { get; set; }
///<summary>
///Pay grade
///</summary>
[ApiMember(Description="Pay grade")]
public virtual string PayGrade { get; set; }
///<summary>
///Assignment family size
///</summary>
[ApiMember(Description="Assignment family size")]
public virtual int? AssignmentFamilySize { get; set; }
///<summary>
///Home owner status
///</summary>
[ApiMember(Description="Home owner status", Name="HomeOwnerStatus")]
public virtual HomeOwnerStatus? HomeOwnerStatus { get; set; }
///<summary>
///Line of business
///</summary>
[ApiMember(Description="Line of business", IsRequired=true)]
public virtual string LineOfBusiness { get; set; }
///<summary>
///HostCurrency
///</summary>
[ApiMember(Description="HostCurrency")]
public virtual string HostCurrency { get; set; }
///<summary>
///ServiceLevel
///</summary>
[ApiMember(Description="ServiceLevel")]
public virtual string ServiceLevel { get; set; }
///<summary>
///CompanyCodePrimary
///</summary>
[ApiMember(Description="CompanyCodePrimary")]
public virtual string CompanyCodePrimary { get; set; }
///<summary>
///CompanyCodeSecondary
///</summary>
[ApiMember(Description="CompanyCodeSecondary")]
public virtual string CompanyCodeSecondary { get; set; }
///<summary>
///CostCenterPrimary
///</summary>
[ApiMember(Description="CostCenterPrimary")]
public virtual string CostCenterPrimary { get; set; }
///<summary>
///CostCenterSecondary
///</summary>
[ApiMember(Description="CostCenterSecondary")]
public virtual string CostCenterSecondary { get; set; }
///<summary>
///CostCenterTertiary
///</summary>
[ApiMember(Description="CostCenterTertiary")]
public virtual string CostCenterTertiary { get; set; }
///<summary>
///Is the assignment confidential
///</summary>
[ApiMember(Description="Is the assignment confidential")]
public virtual bool? Confidential { get; set; }
///<summary>
///Special Instructions
///</summary>
[ApiMember(Description="Special Instructions")]
public virtual string SpecialInstructions { get; set; }
///<summary>
///Destination entity legal name
///</summary>
[ApiMember(Description="Destination entity legal name")]
public virtual string DestinationEntityLegalName { get; set; }
///<summary>
///Transferee mobile phone number
///</summary>
[ApiMember(Description="Transferee mobile phone number", IsRequired=true)]
public virtual string MobilePhoneNumber { get; set; }
///<summary>
///Transferee work phone number
///</summary>
[ApiMember(Description="Transferee work phone number")]
public virtual string WorkPhoneNumber { get; set; }
///<summary>
///Transferee home phone number
///</summary>
[ApiMember(Description="Transferee home phone number")]
public virtual string HomePhoneNumber { get; set; }
///<summary>
///Transferee primary email
///</summary>
[ApiMember(Description="Transferee primary email", IsRequired=true)]
public virtual string PrimaryEmail { get; set; }
///<summary>
///Transferee secondary email
///</summary>
[ApiMember(Description="Transferee secondary email")]
public virtual string SecondaryEmail { get; set; }
///<summary>
///HR Contact First Name
///</summary>
[ApiMember(Description="HR Contact First Name")]
public virtual string HRContactFirstName { get; set; }
///<summary>
///HR Contact Last Name
///</summary>
[ApiMember(Description="HR Contact Last Name")]
public virtual string HRContactLastName { get; set; }
///<summary>
///HR contact full name
///</summary>
[ApiMember(Description="HR contact full name")]
public virtual string HRContactFullName { get; set; }
///<summary>
///Transferee annual salary
///</summary>
[ApiMember(Description="Transferee annual salary")]
public virtual string AnnualSalary { get; set; }
///<summary>
///Transferee spouse/partner
///</summary>
[ApiMember(Description="Transferee spouse/partner")]
public virtual SpousePartner SpousePartner { get; set; }
///<summary>
///Transferee dependents
///</summary>
[ApiMember(Description="Transferee dependents")]
public virtual List<Dependent> Dependents { get; set; }
///<summary>
///Assignment Services
///</summary>
[ApiMember(Description="Assignment Services")]
public virtual List<Service> Services { get; set; }
///<summary>
///Relocation Status
///</summary>
[ApiMember(Description="Relocation Status")]
public virtual string RelocationStatus { get; set; }
///<summary>
///Cancel
///</summary>
[ApiMember(Description="Cancel")]
public virtual string Cancel { get; set; }
}
}
C# TransfereeInitiationRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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: text/csv
Content-Type: text/csv
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-01T00:00:00.0000000","endDate":"0001-01-01T00:00:00.0000000","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-01T00:00:00.0000000"},"dependents":[{"firstName":"String","lastName":"String","birthDate":"0001-01-01T00:00:00.0000000","relationshipToAssignee":"Child"}],"services":[{"name":"String","data":[{"fieldName":"String","fieldValue":"String"}],"cancel":"String"}],"relocationStatus":"String","cancel":"String"}}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}