Client_Initiations

<back to all web services

ConsumerInitiation

Consumer Initiation Service

Requires Authentication
The following routes are available for this service:
POST/consumerinitiation
"use strict";
export class ValidateError {
    /** @param {{ErrorNumber?:string,ErrorDescription?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    ErrorNumber;
    /** @type {string} */
    ErrorDescription;
}
export class ConsumerInitiationResponse {
    /** @param {{Message?:string,FileId?:string,Errors?:ValidateError[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Response message */
    Message;
    /**
     * @type {string}
     * @description File identifier for the created initiation */
    FileId;
    /**
     * @type {ValidateError[]}
     * @description List of validation errors, if any */
    Errors;
}
export class RelocationsRequestFileTransfereeDetails {
    /** @param {{FirstName?:string,LastName?:string,PreferredEmail?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description First name of the transferee */
    FirstName;
    /**
     * @type {string}
     * @description Last name of the transferee */
    LastName;
    /**
     * @type {string}
     * @description Preferred email address */
    PreferredEmail;
}
export class AssignmentLocationDetails {
    /** @param {{WorkCity?:string,CurrentWorkState?:string,WorkState?:string,DestinationWorkState?:string,WorkCountry?:string,PreferredWorkState?:string,PreferredWorkCountry?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Work city */
    WorkCity;
    /**
     * @type {string}
     * @description Current work location state */
    CurrentWorkState;
    /**
     * @type {string}
     * @description Work state or province */
    WorkState;
    /**
     * @type {string}
     * @description Destination work location state */
    DestinationWorkState;
    /**
     * @type {string}
     * @description Work country */
    WorkCountry;
    /**
     * @type {string}
     * @description Preferred work location state */
    PreferredWorkState;
    /**
     * @type {string}
     * @description Preferred work location country */
    PreferredWorkCountry;
}
export class RelocationsRequestFileAssignmentDetails {
    /** @param {{Program?:string,AssignmentType?:string,StartDate?:string,CompanyName?:string,Contact?:string,Current?:AssignmentLocationDetails,Destination?:AssignmentLocationDetails}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Program name or code */
    Program;
    /**
     * @type {string}
     * @description Type of assignment */
    AssignmentType;
    /**
     * @type {string}
     * @description Assignment start date */
    StartDate;
    /**
     * @type {string}
     * @description Company name */
    CompanyName;
    /**
     * @type {string}
     * @description Contact */
    Contact;
    /**
     * @type {AssignmentLocationDetails}
     * @description Current assignment location details */
    Current;
    /**
     * @type {AssignmentLocationDetails}
     * @description Destination assignment location details */
    Destination;
}
export class RelocationsRequestFile {
    /** @param {{Command?:string,ExternalID?:string,TransfereeDetails?:RelocationsRequestFileTransfereeDetails,Addresses?:RelocationsRequestFileAddress[],Phones?:RelocationsRequestFilePhone[],AssignmentDetails?:RelocationsRequestFileAssignmentDetails}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Command type for the request (INITIATE) */
    Command;
    /**
     * @type {string}
     * @description External identifier for the transferee */
    ExternalID;
    /**
     * @type {RelocationsRequestFileTransfereeDetails}
     * @description Details about the transferee */
    TransfereeDetails;
    /**
     * @type {RelocationsRequestFileAddress[]}
     * @description List of addresses associated with the transferee */
    Addresses;
    /**
     * @type {RelocationsRequestFilePhone[]}
     * @description List of phone numbers associated with the transferee */
    Phones;
    /**
     * @type {RelocationsRequestFileAssignmentDetails}
     * @description Assignment details for the relocation */
    AssignmentDetails;
}
export class ConsumerInitiation {
    /** @param {{ClientID?:string,File?:RelocationsRequestFile}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Client identifier */
    ClientID;
    /**
     * @type {RelocationsRequestFile}
     * @description Consumer relocation request file details */
    File;
}
/** @typedef {'CurrentHome'|'DestinationHome'|'CurrentWork'|'DestinationWork'} */
export var AddressType;
(function (AddressType) {
    AddressType["CurrentHome"] = "CurrentHome"
    AddressType["DestinationHome"] = "DestinationHome"
    AddressType["CurrentWork"] = "CurrentWork"
    AddressType["DestinationWork"] = "DestinationWork"
})(AddressType || (AddressType = {}));
/** @typedef {'Y'|'N'|'Item'} */
export var YesNo;
(function (YesNo) {
    YesNo["Y"] = "Y"
    YesNo["N"] = "N"
    YesNo["Item"] = "Item"
})(YesNo || (YesNo = {}));
export class RelocationsRequestFileAddress {
    /** @param {{AddressType?:AddressType,Primary?:YesNo,AddressLine1?:string,City?:string,Country?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {AddressType}
     * @description Type of address (CurrentHome, DestinationHome, CurrentWork, DestinationWork) */
    AddressType;
    /**
     * @type {YesNo}
     * @description Indicates if this is the primary address */
    Primary;
    /**
     * @type {string}
     * @description Address line 1 */
    AddressLine1;
    /**
     * @type {string}
     * @description City */
    City;
    /**
     * @type {string}
     * @description Country */
    Country;
}
export class RelocationsRequestFilePhone {
    /** @param {{Type?:string,Primary?:YesNo,Number?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Phone type (e.g., Mobile, OriginHome) */
    Type;
    /**
     * @type {YesNo}
     * @description Indicates if this is the primary phone number */
    Primary;
    /**
     * @type {string}
     * @description Phone number */
    Number;
}

JavaScript ConsumerInitiation DTOs

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

HTTP + XML

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

POST /consumerinitiation HTTP/1.1 
Host: initiation-pen.sirva.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ConsumerInitiation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Client_Initiations.ServiceModel">
  <ClientID>String</ClientID>
  <File>
    <Addresses>
      <RelocationsRequestFileAddress>
        <AddressLine1>String</AddressLine1>
        <AddressType>CurrentHome</AddressType>
        <City>String</City>
        <Country>String</Country>
        <Primary>Y</Primary>
      </RelocationsRequestFileAddress>
    </Addresses>
    <AssignmentDetails>
      <AssignmentType>String</AssignmentType>
      <CompanyName>String</CompanyName>
      <Contact>String</Contact>
      <Current>
        <CurrentWorkState>String</CurrentWorkState>
        <DestinationWorkState>String</DestinationWorkState>
        <PreferredWorkCountry>String</PreferredWorkCountry>
        <PreferredWorkState>String</PreferredWorkState>
        <WorkCity>String</WorkCity>
        <WorkCountry>String</WorkCountry>
        <WorkState>String</WorkState>
      </Current>
      <Destination>
        <CurrentWorkState>String</CurrentWorkState>
        <DestinationWorkState>String</DestinationWorkState>
        <PreferredWorkCountry>String</PreferredWorkCountry>
        <PreferredWorkState>String</PreferredWorkState>
        <WorkCity>String</WorkCity>
        <WorkCountry>String</WorkCountry>
        <WorkState>String</WorkState>
      </Destination>
      <Program>String</Program>
      <StartDate>0001-01-01T00:00:00</StartDate>
    </AssignmentDetails>
    <Command>String</Command>
    <ExternalID>String</ExternalID>
    <Phones>
      <RelocationsRequestFilePhone>
        <Number>String</Number>
        <Primary>Y</Primary>
        <Type>String</Type>
      </RelocationsRequestFilePhone>
    </Phones>
    <TransfereeDetails>
      <FirstName>String</FirstName>
      <LastName>String</LastName>
      <PreferredEmail>String</PreferredEmail>
    </TransfereeDetails>
  </File>
</ConsumerInitiation>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ConsumerInitiationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Client_Initiations.ServiceModel">
  <Errors xmlns:d2p1="http://schemas.datacontract.org/2004/07/Client_Initiations.ServiceModel.Types">
    <d2p1:ValidateError>
      <d2p1:ErrorDescription>String</d2p1:ErrorDescription>
      <d2p1:ErrorNumber>String</d2p1:ErrorNumber>
    </d2p1:ValidateError>
  </Errors>
  <FileId>String</FileId>
  <Message>String</Message>
</ConsumerInitiationResponse>