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 /users/create HTTP/1.1
Host: api.fxhub.co.za
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateUser xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FxHubPartnersApi.ServiceModel">
<ConfirmPassword>String</ConfirmPassword>
<DisplayName>String</DisplayName>
<Email>String</Email>
<FirstName>String</FirstName>
<IsAdmin>false</IsAdmin>
<IsInternalUser>false</IsInternalUser>
<KeyId>String</KeyId>
<LastName>String</LastName>
<PartnerId>0</PartnerId>
<PartnerIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</PartnerIds>
<PartnerName>String</PartnerName>
<PartnerNames xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</PartnerNames>
<Password>String</Password>
<PhoneNumber>String</PhoneNumber>
<Signature>String</Signature>
<User xmlns:d2p1="http://schemas.datacontract.org/2004/07/FxHubPartnersApi.ServiceModel.Types">
<Address xmlns="http://schemas.servicestack.net/types">String</Address>
<Address2 xmlns="http://schemas.servicestack.net/types">String</Address2>
<BirthDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</BirthDate>
<BirthDateRaw xmlns="http://schemas.servicestack.net/types">String</BirthDateRaw>
<City xmlns="http://schemas.servicestack.net/types">String</City>
<Company xmlns="http://schemas.servicestack.net/types">String</Company>
<Country xmlns="http://schemas.servicestack.net/types">String</Country>
<CreatedDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</CreatedDate>
<Culture xmlns="http://schemas.servicestack.net/types">String</Culture>
<DigestHa1Hash xmlns="http://schemas.servicestack.net/types">String</DigestHa1Hash>
<DisplayName xmlns="http://schemas.servicestack.net/types">String</DisplayName>
<Email xmlns="http://schemas.servicestack.net/types">String</Email>
<FirstName xmlns="http://schemas.servicestack.net/types">String</FirstName>
<FullName xmlns="http://schemas.servicestack.net/types">String</FullName>
<Gender xmlns="http://schemas.servicestack.net/types">String</Gender>
<Id xmlns="http://schemas.servicestack.net/types">0</Id>
<InvalidLoginAttempts xmlns="http://schemas.servicestack.net/types">0</InvalidLoginAttempts>
<Language xmlns="http://schemas.servicestack.net/types">String</Language>
<LastLoginAttempt xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</LastLoginAttempt>
<LastName xmlns="http://schemas.servicestack.net/types">String</LastName>
<LockedDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</LockedDate>
<MailAddress xmlns="http://schemas.servicestack.net/types">String</MailAddress>
<Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</Meta>
<ModifiedDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</ModifiedDate>
<Nickname xmlns="http://schemas.servicestack.net/types">String</Nickname>
<PasswordHash xmlns="http://schemas.servicestack.net/types">String</PasswordHash>
<Permissions xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
<d3p1:string>String</d3p1:string>
</Permissions>
<PhoneNumber xmlns="http://schemas.servicestack.net/types">String</PhoneNumber>
<PostalCode xmlns="http://schemas.servicestack.net/types">String</PostalCode>
<PrimaryEmail xmlns="http://schemas.servicestack.net/types">String</PrimaryEmail>
<RecoveryToken xmlns="http://schemas.servicestack.net/types">String</RecoveryToken>
<RefId xmlns="http://schemas.servicestack.net/types">0</RefId>
<RefIdStr xmlns="http://schemas.servicestack.net/types">String</RefIdStr>
<Roles xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
<d3p1:string>String</d3p1:string>
</Roles>
<Salt xmlns="http://schemas.servicestack.net/types">String</Salt>
<State xmlns="http://schemas.servicestack.net/types">String</State>
<TimeZone xmlns="http://schemas.servicestack.net/types">String</TimeZone>
<UserName xmlns="http://schemas.servicestack.net/types">String</UserName>
<d2p1:Banned>0001-01-01T00:00:00</d2p1:Banned>
<d2p1:BannedBy>String</d2p1:BannedBy>
<d2p1:CreatedBy>String</d2p1:CreatedBy>
<d2p1:DefaultProfileUrl>String</d2p1:DefaultProfileUrl>
<d2p1:DisableEmails>0001-01-01T00:00:00</d2p1:DisableEmails>
<d2p1:HasMultipleLogins>String</d2p1:HasMultipleLogins>
<d2p1:IpAddress>String</d2p1:IpAddress>
<d2p1:Notes>String</d2p1:Notes>
<d2p1:PartnerId>0</d2p1:PartnerId>
<d2p1:PartnerIds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:int>0</d3p1:int>
</d2p1:PartnerIds>
<d2p1:PartnerName>String</d2p1:PartnerName>
<d2p1:PartnerNames xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</d2p1:PartnerNames>
<d2p1:RefSource>String</d2p1:RefSource>
<d2p1:RefUrn>String</d2p1:RefUrn>
<d2p1:Signature>String</d2p1:Signature>
<d2p1:SignatureUrl>String</d2p1:SignatureUrl>
</User>
<UserName>String</UserName>
</CreateUser>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CreateUserResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FxHubPartnersApi.ServiceModel">
<Created>0001-01-01T00:00:00</Created>
<DisplayName>String</DisplayName>
<Message>String</Message>
<PartnerName>String</PartnerName>
<PartnerNames xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</PartnerNames>
<PasswordText>String</PasswordText>
<PhoneNumber>String</PhoneNumber>
<Result>false</Result>
<UserAuthId>0</UserAuthId>
<UserName>String</UserName>
</CreateUserResponse>