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 /api/products/import HTTP/1.1
Host: api.pos365.vn
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ProductImport xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/POS.Services">
<ImportOnhand>false</ImportOnhand>
<Method>String</Method>
<ProductJson xmlns:d2p1="http://schemas.datacontract.org/2004/07/POS.Repositories">
<d2p1:ProductJson>
<d2p1:Attributies>String</d2p1:Attributies>
<d2p1:Categories>String</d2p1:Categories>
<d2p1:CategoryId>0</d2p1:CategoryId>
<d2p1:Code>String</d2p1:Code>
<d2p1:Code2>String</d2p1:Code2>
<d2p1:Code3>String</d2p1:Code3>
<d2p1:Code4>String</d2p1:Code4>
<d2p1:Code5>String</d2p1:Code5>
<d2p1:ConversionValue>0</d2p1:ConversionValue>
<d2p1:Cost>0</d2p1:Cost>
<d2p1:Hidden>false</d2p1:Hidden>
<d2p1:Id>0</d2p1:Id>
<d2p1:Images>String</d2p1:Images>
<d2p1:LargeUnit>String</d2p1:LargeUnit>
<d2p1:LargeUnitCode>String</d2p1:LargeUnitCode>
<d2p1:LargeUnitPrice>0</d2p1:LargeUnitPrice>
<d2p1:MaxQuantity>0</d2p1:MaxQuantity>
<d2p1:MinQuantity>0</d2p1:MinQuantity>
<d2p1:Name>String</d2p1:Name>
<d2p1:OnHand>0</d2p1:OnHand>
<d2p1:OrderQuickNotes>String</d2p1:OrderQuickNotes>
<d2p1:Price>0</d2p1:Price>
<d2p1:Printer>String</d2p1:Printer>
<d2p1:ProductType>0</d2p1:ProductType>
<d2p1:SplitForSalesOrder>false</d2p1:SplitForSalesOrder>
<d2p1:Supplier>String</d2p1:Supplier>
<d2p1:SupplierId>0</d2p1:SupplierId>
<d2p1:Unit>String</d2p1:Unit>
<d2p1:VAT>0</d2p1:VAT>
</d2p1:ProductJson>
</ProductJson>
<SkipExists>false</SkipExists>
</ProductImport>
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/" />