pixiGetCountries
Get a list of all Countries
Since pixi version: LOU Official - Update 46 (6.9.46.27927) Additional notes:
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
CntCode | string | false | Filter: Country code Type: varchar(3) Default value: NULL Example: D Available from: LOU Official - Update 46 (6.9.46.27927) |
OnlyActive | boolean | false | Switch: Return only countries that have a connected customer address Type: bit Default value: 0 Example: 0 or 1 Available from: LOU Official - Update 46 (6.9.46.27927) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiGetCountries>
<CntCode>string</CntCode>
<OnlyActive>true</OnlyActive>
</pixiGetCountries>
</Body>
</Envelope>
Response
1. Countries list
Name | Type | Description |
---|---|---|
IsEU | boolean | Is country a member of EU Type: bit Available from: / (25.7.0.59144) |
CntCode | string | Country Code Type: varchar (3) Available from: / (25.7.0.59144) |
CntName | string | Country Name Type: varchar (60) Available from: / (25.7.0.59144) |
CntNames | string | Country name Type: varchar (200) Available from: / (25.7.0.59144) |
LangCode | string | Countries language code Type: varchar (3) Available from: / (25.7.0.59144) |
VATLimit | integer | VAT treshold Type: int Available from: / (25.7.0.59144) |
ChargeVAT | string | The flag that marks if the VAT should be charged Type: char Available from: / (25.7.0.59144) |
DateFormat | string | Date format Type: varchar (11) Available from: / (25.7.0.59144) |
LocationID | string | Location ID Type: char Available from: / (25.7.0.59144) |
CntCodeISO2 | string | Country ISO2 Code Type: char Available from: / (25.7.0.59144) |
CntCodeISO3 | string | Country ISO3 Code Type: char Available from: / (25.7.0.59144) |
DefShipCost | number | Default shipping costs Type: money Available from: / (25.7.0.59144) |
Response Example
<PixiGetCountriesPost200TextXmlResponse>
<CntCode>string</CntCode>
<CntName>string</CntName>
<DefShipCost>0</DefShipCost>
<DateFormat>string</DateFormat>
<LangCode>string</LangCode>
<LocationID>string</LocationID>
<CntCodeISO2>string</CntCodeISO2>
<CntCodeISO3>string</CntCodeISO3>
<ChargeVAT>string</ChargeVAT>
<CntNames>string</CntNames>
<VATLimit>0</VATLimit>
<IsEU>true</IsEU>
</PixiGetCountriesPost200TextXmlResponse>
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:pixiGetCountries>
<CntCode xsi:type="xsd:string">D</CntCode>
<OnlyActive xsi:type="xsd:boolean">0 or 1</OnlyActive>
</ns1:pixiGetCountries>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiGetCountries', [
'CntCode' => 'D', // string
'OnlyActive' => '0 or 1', // boolean
]);
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);
}