pixiGetVATByCountries
API Call to get the VAT Rates for specific countries
Since pixi version: LOU Official - Update 46 (6.9.46.27927) Additional notes: Enter at least one of the parameters to filter for countries to get the VAT of a specific country.
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
Datetime | string | false | With datetime you can search f Type: datetime Default value: NULL Example: Available from: LOU Official - Update 46 (6.9.46.27927) |
ChargeVAT | string | false | ChargeVAT Type: char Default value: NULL Example: Available from: LOU Official - Update 46 (6.9.46.27927) |
CntCodeISO2 | string | false | CntCodeISO2 Type: char Default value: NULL Example: Available from: LOU Official - Update 46 (6.9.46.27927) |
CntCodeISO3 | string | false | CntCodeISO3 Type: char Default value: NULL Example: Available from: LOU Official - Update 46 (6.9.46.27927) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiGetVATByCountries>
<CntCodeISO2>string</CntCodeISO2>
<CntCodeISO3>string</CntCodeISO3>
<ChargeVAT>string</ChargeVAT>
<Datetime>string</Datetime>
</pixiGetVATByCountries>
</Body>
</Envelope>
Response
1. Result set
Name | Type | Description |
---|---|---|
ErrorMsg | string | If an error occures during the call you recieve an error message Type: varchar Available from: 25.06 (25.6.0.58802) |
ReturnCode | string | As Return Values you get: CntName, CntCodeISO2, CntCodeISO3, ChargeVAT, PHigh, PLow Type: varchar Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiGetVATByCountriesPost200TextXmlResponse>
<ReturnCode>string</ReturnCode>
<ErrorMsg>string</ErrorMsg>
</PixiGetVATByCountriesPost200TextXmlResponse>
2. Result set
Name | Type | Description |
---|---|---|
PLow | number | VAT Rate Low Type: numeric Available from: 25.06 (25.6.0.58802) |
PHigh | number | VAT Rate High Type: numeric Available from: 25.06 (25.6.0.58802) |
CntName | string | Country Name Type: varchar Available from: 25.06 (25.6.0.58802) |
ChargeVAT | string | Charge VAT for this Country Type: char Available from: 25.06 (25.6.0.58802) |
CntCodeISO2 | string | Country Code ISO2 Type: char Available from: 25.06 (25.6.0.58802) |
CntCodeISO3 | string | Country Code ISO3 Type: char Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiGetVATByCountriesPost200TextXmlResponse>
<ReturnCode>string</ReturnCode>
<ErrorMsg>string</ErrorMsg>
</PixiGetVATByCountriesPost200TextXmlResponse>
HTTP Example
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
# echo -n '{{username}}:{{password}}' | base64 | pbcopy
Authorization: Basic {{token}}
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="https://apigateway.descartes.com/tms/pixi/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:pixiGetVATByCountries>
<Datetime xsi:type="xsd:string"></Datetime>
<ChargeVAT xsi:type="xsd:string"></ChargeVAT>
<CntCodeISO2 xsi:type="xsd:string"></CntCodeISO2>
<CntCodeISO3 xsi:type="xsd:string"></CntCodeISO3>
</ns1:pixiGetVATByCountries>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiGetVATByCountries', [
'Datetime' => '', // string
'ChargeVAT' => '', // string
'CntCodeISO2' => '', // string
'CntCodeISO3' => '', // string
]);
function getPixiSoapClientResponse(string $method, array $arguments = [])
{
$soapArguments = [];
foreach ($arguments as $key => $value) {
$soapArguments[] = new SoapVar($value, null, '', '', $key);
}
$soapClient = new SoapClient(null, [
'login' => '...',
'password' => '...',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
]);
return $soapClient->__call($method, $soapArguments);
}