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.
PUT /rebatecodes/{Id} HTTP/1.1
Host: testapi.bokamera.se
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<UpdateRebateCode xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
<AutoGenerateRebateCodeSign>false</AutoGenerateRebateCodeSign>
<CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
<Customers xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</Customers>
<DaysOfWeek xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</DaysOfWeek>
<FromTime>PT0S</FromTime>
<Id>0</Id>
<MaxNumberOfUses>0</MaxNumberOfUses>
<MaxNumberOfUsesPerCustomer>0</MaxNumberOfUsesPerCustomer>
<PersonalNote>String</PersonalNote>
<RebateCodeSign>String</RebateCodeSign>
<RebateCodeTypeId>0</RebateCodeTypeId>
<RebateCodeValue>0</RebateCodeValue>
<Services xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</Services>
<ToTime>PT0S</ToTime>
<ValidFrom>0001-01-01T00:00:00</ValidFrom>
<ValidTo>0001-01-01T00:00:00</ValidTo>
</UpdateRebateCode>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<RebateCodeResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
<CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
<Created>0001-01-01T00:00:00</Created>
<CreatedBy>String</CreatedBy>
<Customers>
<RebateCodeCustomerResponse>
<Email>String</Email>
<Firstname>String</Firstname>
<Id>00000000-0000-0000-0000-000000000000</Id>
<ImageUrl>String</ImageUrl>
<Lastname>String</Lastname>
<Phone>String</Phone>
</RebateCodeCustomerResponse>
</Customers>
<DaysOfWeek>
<DaysOfWeekResponse>
<DayOfWeek>String</DayOfWeek>
<DayOfWeekActive>false</DayOfWeekActive>
<DayOfWeekSortOrder>0</DayOfWeekSortOrder>
<DayOfWeekTranslation>String</DayOfWeekTranslation>
<Id>0</Id>
</DaysOfWeekResponse>
</DaysOfWeek>
<FromTime>PT0S</FromTime>
<Id>0</Id>
<MaxNumberOfUses>0</MaxNumberOfUses>
<MaxNumberOfUsesPerCustomer>0</MaxNumberOfUsesPerCustomer>
<Name>String</Name>
<NumberOfUsesPerCustomerUsed>0</NumberOfUsesPerCustomerUsed>
<NumberOfUsesUsed>0</NumberOfUsesUsed>
<PersonalNote>String</PersonalNote>
<RebateCodeSign>String</RebateCodeSign>
<RebateCodeStatusId>0</RebateCodeStatusId>
<RebateCodeStatusOptions>
<RebateCodeStatusResponse>
<RebateCodeStatusItems>
<RebateCodeStatusItem>
<Id>0</Id>
<RebateCodeStatusDescription>String</RebateCodeStatusDescription>
<RebateCodeStatusName>String</RebateCodeStatusName>
</RebateCodeStatusItem>
</RebateCodeStatusItems>
<ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types">
<d4p1:ErrorCode>String</d4p1:ErrorCode>
<d4p1:Message>String</d4p1:Message>
<d4p1:StackTrace>String</d4p1:StackTrace>
<d4p1:Errors>
<d4p1:ResponseError>
<d4p1:ErrorCode>String</d4p1:ErrorCode>
<d4p1:FieldName>String</d4p1:FieldName>
<d4p1:Message>String</d4p1:Message>
<d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d7p1:KeyValueOfstringstring>
<d7p1:Key>String</d7p1:Key>
<d7p1:Value>String</d7p1:Value>
</d7p1:KeyValueOfstringstring>
</d4p1:Meta>
</d4p1:ResponseError>
</d4p1:Errors>
<d4p1: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>
</d4p1:Meta>
</ResponseStatus>
</RebateCodeStatusResponse>
</RebateCodeStatusOptions>
<RebateCodeTypeId>0</RebateCodeTypeId>
<RebateCodeTypesOptions>
<RebateCodeTypeResponse>
<RebateCodeTypeItems>
<RebateCodeTypeItem>
<Description>String</Description>
<Id>0</Id>
<Name>String</Name>
</RebateCodeTypeItem>
</RebateCodeTypeItems>
<ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types">
<d4p1:ErrorCode>String</d4p1:ErrorCode>
<d4p1:Message>String</d4p1:Message>
<d4p1:StackTrace>String</d4p1:StackTrace>
<d4p1:Errors>
<d4p1:ResponseError>
<d4p1:ErrorCode>String</d4p1:ErrorCode>
<d4p1:FieldName>String</d4p1:FieldName>
<d4p1:Message>String</d4p1:Message>
<d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d7p1:KeyValueOfstringstring>
<d7p1:Key>String</d7p1:Key>
<d7p1:Value>String</d7p1:Value>
</d7p1:KeyValueOfstringstring>
</d4p1:Meta>
</d4p1:ResponseError>
</d4p1:Errors>
<d4p1: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>
</d4p1:Meta>
</ResponseStatus>
</RebateCodeTypeResponse>
</RebateCodeTypesOptions>
<RebateCodeValue>0</RebateCodeValue>
<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>
<Services>
<RebateCodeServiceResponse>
<Active>false</Active>
<Description>String</Description>
<Id>0</Id>
<Name>String</Name>
</RebateCodeServiceResponse>
</Services>
<StatusName>String</StatusName>
<ToTime>PT0S</ToTime>
<Updated>0001-01-01T00:00:00</Updated>
<UpdatedBy>String</UpdatedBy>
<ValidFrom>0001-01-01T00:00:00</ValidFrom>
<ValidTo>0001-01-01T00:00:00</ValidTo>
</RebateCodeResponse>