withVectorsTab-97x42
We's got 26,191,810 images, yo!

API Access

API Documentation - getCountryStates

This method allows you to get the list of PhotoXpress states for a country

Authentication

This method does not require authentication.

Arguments

Argument Type Element (array) Valid Values Default Value Detail
api_key string none you need a valid api key to use the API
country_id int none PhotoXpress country id to get states for

Returned Values

Returns an array of states or empty array if there are none

Example Query


<?xml version="1.0" encoding="utf-8"?>
<methodCall>
  <methodName>main.getCountryStates</methodName>
  <params>
    <param>
      <value>
        <string>YOUR_API_KEY</string>
      </value>
    </param>
    <param>
      <value>
        <int>840</int>
      </value>
    </param>
  </params>
</methodCall>

Example Response


<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>1</name>
            <value>
              <string>Alabama</string>
            </value>
          </member>
          <member>
            <name>2</name>
            <value>
              <string>Alaska</string>
            </value>
          </member>
          <member>
            <name>3</name>
            <value>
              <string>American Samoa</string>
            </value>
          </member>
          <member>
            <name>4</name>
            <value>
              <string>Arizona</string>
            </value>
          </member>
          <member>
            <name>5</name>
            <value>
              <string>Arkansas</string>
            </value>
          </member>
          <member>
            <name>6</name>
            <value>
              <string>California</string>
            </value>
          </member>
          <member>
            <name>7</name>
            <value>
              <string>Colorado</string>
            </value>
          </member>
          <member>
            <name>8</name>
            <value>
              <string>Connecticut</string>
            </value>
          </member>
          <member>
            <name>9</name>
            <value>
              <string>Delaware</string>
            </value>
          </member>
          <member>
            <name>10</name>
            <value>
              <string>District of Columbia</string>
            </value>
          </member>
          <member>
            <name>11</name>
            <value>
              <string>Federated States of Micronesia</string>
            </value>
          </member>
          <member>
            <name>12</name>
            <value>
              <string>Florida</string>
            </value>
          </member>
          <member>
            <name>13</name>
            <value>
              <string>Georgia</string>
            </value>
          </member>
          <member>
            <name>14</name>
            <value>
              <string>Guam</string>
            </value>
          </member>
          <member>
            <name>15</name>
            <value>
              <string>Hawaii</string>
            </value>
          </member>
          <member>
            <name>16</name>
            <value>
              <string>Idaho</string>
            </value>
          </member>
          <member>
            <name>17</name>
            <value>
              <string>Illinois</string>
            </value>
          </member>
          <member>
            <name>18</name>
            <value>
              <string>Indiana</string>
            </value>
          </member>
          <member>
            <name>19</name>
            <value>
              <string>Iowa</string>
            </value>
          </member>
          <member>
            <name>20</name>
            <value>
              <string>Kansas</string>
            </value>
          </member>
          <member>
            <name>21</name>
            <value>
              <string>Kentucky</string>
            </value>
          </member>
          <member>
            <name>22</name>
            <value>
              <string>Louisiana</string>
            </value>
          </member>
          <member>
            <name>23</name>
            <value>
              <string>Maine</string>
            </value>
          </member>
          <member>
            <name>24</name>
            <value>
              <string>Marshall Islands</string>
            </value>
          </member>
          <member>
            <name>25</name>
            <value>
              <string>Maryland</string>
            </value>
          </member>
          <member>
            <name>26</name>
            <value>
              <string>Massachusetts</string>
            </value>
          </member>
          <member>
            <name>27</name>
            <value>
              <string>Michigan</string>
            </value>
          </member>
          <member>
            <name>28</name>
            <value>
              <string>Minnesota</string>
            </value>
          </member>
          <member>
            <name>29</name>
            <value>
              <string>Mississippi</string>
            </value>
          </member>
          <member>
            <name>30</name>
            <value>
              <string>Missouri</string>
            </value>
          </member>
          <member>
            <name>31</name>
            <value>
              <string>Montana</string>
            </value>
          </member>
          <member>
            <name>32</name>
            <value>
              <string>Nebraska</string>
            </value>
          </member>
          <member>
            <name>33</name>
            <value>
              <string>Nevada</string>
            </value>
          </member>
          <member>
            <name>35</name>
            <value>
              <string>New Jersey</string>
            </value>
          </member>
          <member>
            <name>36</name>
            <value>
              <string>New Mexico</string>
            </value>
          </member>
          <member>
            <name>37</name>
            <value>
              <string>New York</string>
            </value>
          </member>
          <member>
            <name>34</name>
            <value>
              <string>New hampshire</string>
            </value>
          </member>
          <member>
            <name>38</name>
            <value>
              <string>North Carolina</string>
            </value>
          </member>
          <member>
            <name>39</name>
            <value>
              <string>North Dakota</string>
            </value>
          </member>
          <member>
            <name>40</name>
            <value>
              <string>Northern Mariana Islands</string>
            </value>
          </member>
          <member>
            <name>41</name>
            <value>
              <string>Ohio</string>
            </value>
          </member>
          <member>
            <name>42</name>
            <value>
              <string>Oklahoma</string>
            </value>
          </member>
          <member>
            <name>43</name>
            <value>
              <string>Oregon</string>
            </value>
          </member>
          <member>
            <name>44</name>
            <value>
              <string>Palau</string>
            </value>
          </member>
          <member>
            <name>45</name>
            <value>
              <string>Pennsylvania</string>
            </value>
          </member>
          <member>
            <name>46</name>
            <value>
              <string>Puerto Rico</string>
            </value>
          </member>
          <member>
            <name>47</name>
            <value>
              <string>Rhode Island</string>
            </value>
          </member>
          <member>
            <name>48</name>
            <value>
              <string>South Carolina</string>
            </value>
          </member>
          <member>
            <name>49</name>
            <value>
              <string>South Dakota</string>
            </value>
          </member>
          <member>
            <name>50</name>
            <value>
              <string>Tennessee</string>
            </value>
          </member>
          <member>
            <name>51</name>
            <value>
              <string>Texas</string>
            </value>
          </member>
          <member>
            <name>52</name>
            <value>
              <string>Utah</string>
            </value>
          </member>
          <member>
            <name>53</name>
            <value>
              <string>Vermont</string>
            </value>
          </member>
          <member>
            <name>54</name>
            <value>
              <string>Virgin Islands</string>
            </value>
          </member>
          <member>
            <name>55</name>
            <value>
              <string>Virginia</string>
            </value>
          </member>
          <member>
            <name>56</name>
            <value>
              <string>Washington</string>
            </value>
          </member>
          <member>
            <name>57</name>
            <value>
              <string>West Virginia</string>
            </value>
          </member>
          <member>
            <name>58</name>
            <value>
              <string>Wisconsin</string>
            </value>
          </member>
          <member>
            <name>59</name>
            <value>
              <string>Wyoming</string>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodResponse>