| POST | /consumerinitiation |
|---|
namespace Client_Initiations.ServiceModel
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type ConsumerInitiation() =
interface IPost
///<summary>
///First name of the consumer
///</summary>
[<ApiMember(Description="First name of the consumer", IsRequired=true)>]
member val FirstName:String = null with get,set
///<summary>
///Last name of the consumer
///</summary>
[<ApiMember(Description="Last name of the consumer", IsRequired=true)>]
member val LastName:String = null with get,set
///<summary>
///Program name
///</summary>
[<ApiMember(Description="Program name", IsRequired=true)>]
member val Program:String = null with get,set
///<summary>
///Company name
///</summary>
[<ApiMember(Description="Company name", IsRequired=true)>]
member val CompanyName:String = null with get,set
///<summary>
///Mobile phone number
///</summary>
[<ApiMember(Description="Mobile phone number")>]
member val MobileNumber:String = null with get,set
///<summary>
///Preferred email address
///</summary>
[<ApiMember(Description="Preferred email address", IsRequired=true)>]
member val PreferredEmail:String = null with get,set
///<summary>
///Current work location state
///</summary>
[<ApiMember(Description="Current work location state")>]
member val CurrentWorkState:String = null with get,set
///<summary>
///Current work location country
///</summary>
[<ApiMember(Description="Current work location country")>]
member val CurrentWorkCountry:String = null with get,set
///<summary>
///Destination work location state
///</summary>
[<ApiMember(Description="Destination work location state")>]
member val DestinationWorkState:String = null with get,set
///<summary>
///Destination work location country
///</summary>
[<ApiMember(Description="Destination work location country")>]
member val DestinationWorkCountry:String = null with get,set
///<summary>
///Preferred work location state
///</summary>
[<ApiMember(Description="Preferred work location state")>]
member val PreferredWorkState:String = null with get,set
///<summary>
///Preferred work location country
///</summary>
[<ApiMember(Description="Preferred work location country")>]
member val PreferredWorkCountry:String = null with get,set
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 /consumerinitiation HTTP/1.1
Host: initiation-test.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">
<CompanyName>String</CompanyName>
<CurrentWorkCountry>String</CurrentWorkCountry>
<CurrentWorkState>String</CurrentWorkState>
<DestinationWorkCountry>String</DestinationWorkCountry>
<DestinationWorkState>String</DestinationWorkState>
<FirstName>String</FirstName>
<LastName>String</LastName>
<MobileNumber>String</MobileNumber>
<PreferredEmail>String</PreferredEmail>
<PreferredWorkCountry>String</PreferredWorkCountry>
<PreferredWorkState>String</PreferredWorkState>
<Program>String</Program>
</ConsumerInitiation>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />