Get countries

Description

Retrieves the default list of countries if no campaignId is provided or the provided campaignId doesn't have a custom country list linked to it

HTTP Method

GET

Path

/common/country/@all

Authentication

Does not require user authentication.

Parameters

Table 21.  Parameters for " Get countries "

NameTypeValue TypeDescription
campaignIdQUERYlong(optional) retrieves the list of countries defined for this campaign if defined
includePhoneCodeQUERYboolean(optional) include the country phone code in the response

Error Codes

150000 ( Common )

An unhandled exception has occured.

Response Schema

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://xsd.poken.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:element name="countries">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="campaignId" type="xs:long"/>
        <xs:element name="country" nillable="true" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="iso" type="xs:string"/>
              <xs:element name="iso3" type="xs:string"/>
              <xs:element name="name" type="xs:string"/>
              <xs:element name="phoneCode" type="xs:int" minOccurs="0"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

Sample Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<countries xmlns="http://xsd.poken.com">
		<campaignId>0</campaignId>
		<country>
				<iso>AF</iso>
				<iso3>AFG</iso3>
				<name>Afghanistan</name>
		</country>
		<country>
				<iso>AL</iso>
				<iso3>ALB</iso3>
				<name>Albania</name>
		</country>
		<country>
				<iso>DZ</iso>
				<iso3>DZA</iso3>
				<name>Algeria</name>
		</country>
		<country>
				<iso>AS</iso>
				<iso3>ASM</iso3>
				<name>American Samoa</name>
		</country>
</countries>