{"id":10027,"date":"2024-06-10T11:20:48","date_gmt":"2024-06-10T11:20:48","guid":{"rendered":"https:\/\/www.purewl.com\/developer\/docs\/api-reference\/api-reference\/inventory-management\/countries\/"},"modified":"2025-02-19T10:25:09","modified_gmt":"2025-02-19T10:25:09","slug":"countries","status":"publish","type":"docs","link":"https:\/\/www.purewl.com\/developer\/guides\/api\/api-reference\/inventory-management\/countries\/","title":{"rendered":"Get Subscribed Countries"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>The Get Countries API provides a list of available countries where VPN servers are located, tailored to the specific device requesting the information. This information is crucial for users to select their desired VPN server location.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Get Countries (v3)<\/h2>\n\n\n\n<ul>\n<li><strong>URL:&nbsp;<\/strong>&lt;base url&gt;\/inventory\/v3\/countries\/&lt;sDeviceType&gt;<\/li>\n\n\n\n<li><strong>Request Method:&nbsp;<\/strong>GET<\/li>\n<\/ul>\n\n\n\n<p>Use this API to get a complete list of subscribed Countries.<\/p>\n\n\n\n<p>Returns a JSON object that contains the Countries.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Payload<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\"><strong>Key<\/strong><\/th><th><strong>Type<\/strong><\/th><th><strong>Pass in<\/strong><\/th><th class=\"has-text-align-left\" data-align=\"left\"><strong>Description<\/strong><\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\"><code>X-AccessToken<\/code>*<\/td><td>String<\/td><td>Header<\/td><td class=\"has-text-align-left\" data-align=\"left\"><kbd>accessToken<\/kbd> retrieved from <a href=\"https:\/\/www.purewl.com\/developer\/guides\/api\/api-reference\/api-access-authentication\/#get-access-token\" data-type=\"link\" data-id=\"https:\/\/www.purewl.com\/developer\/guides\/api\/api-reference\/inventory-management\/countries\/\" target=\"_blank\" rel=\"noreferrer noopener\">Get Access Token<\/a> endpoint<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><code>sDeviceType<\/code>*<\/td><td>String<\/td><td>Path<\/td><td class=\"has-text-align-left\" data-align=\"left\">Type of device <br>Possible values: <strong>android<\/strong> | <strong>ios<\/strong> | <strong>mac<\/strong> | <strong>windows<\/strong><\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">(*) Required Parameter<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Response<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\"><strong>Key<\/strong><\/th><th class=\"has-text-align-left\" data-align=\"left\"><strong>Type<\/strong><\/th><th class=\"has-text-align-left\" data-align=\"left\"><strong>Description<\/strong><\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\"><code>header<\/code><\/td><td class=\"has-text-align-left\" data-align=\"left\">JSON<\/td><td class=\"has-text-align-left\" data-align=\"left\">JSON object that describes return code and message.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><code>body<\/code><\/td><td class=\"has-text-align-left\" data-align=\"left\">JSON<\/td><td class=\"has-text-align-left\" data-align=\"left\">JSON object that returns countries array containing objects.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><code>countries<\/code><\/td><td class=\"has-text-align-left\" data-align=\"left\">Array<\/td><td class=\"has-text-align-left\" data-align=\"left\">Array of object that contains details related to country.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Sample Response<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism off-numbers lang-json\" data-lang=\"JSON\" data-show-lang=\"1\"><code>{\n  &quot;header&quot;: {\n    &quot;code&quot;: 1,\n    &quot;message&quot;: &quot;success&quot;\n    &quot;response_code&quot;: 1,\n  },\n  &quot;body&quot;: {\n    &quot;countries&quot;: [{\n      &quot;id&quot;: 254,\n      &quot;country&quot;: &quot;US&quot;,\n      &quot;name&quot;: &quot;United States&quot;,\n      &quot;iso_code&quot;: &quot;US&quot;,\n      &quot;latitude&quot;: 37.090240000000001,\n      &quot;longitude&quot;: -95.712890999999999,\n      &quot;is_smart_dns&quot;: 0,\n      &quot;is_virtual&quot;: 0,\n      &quot;is_freemium&quot;: true,\n      &quot;rank&quot;: 0,\n      &quot;recommended_protocol&quot;: &quot;IKEV&quot;,\n      &quot;data_centers&quot;:[],\n      &quot;protocols&quot;: [{\n        &quot;number&quot;: 1,\n        &quot;protocol&quot;: &quot;PPTP&quot;,\n        &quot;dns&quot;: [{\n          &quot;configuration_version&quot;: &quot;&quot;,\n          &quot;name&quot;: &quot;**.********.com&quot;,\n          &quot;type&quot;: &quot;primary&quot;,\n          &quot;acknowledgement_server&quot;: &quot;**.********.com&quot;,\n          &quot;port_number&quot;: 0,\n          &quot;is_multiport&quot;: 0\n          &quot;multiport_range&quot;: &quot;80&quot;\n          &quot;ip_translation&quot;: &quot;nat&quot;\n          &quot;tags&quot;: []\n          }\n          {\n          &quot;number&quot;: 8,\n          &quot;protocol&quot;: &quot;TCP&quot;,\n          &quot;dns&quot;: [{\n              &quot;configuration_version&quot;: &quot;2.0&quot;,\n              &quot;name&quot;: &quot;**.********.com&quot;,\n              &quot;type&quot;: &quot;primary&quot;,\n              &quot;acknowledgement_server&quot;: &quot;**.********.com&quot;,\n              &quot;port_number&quot;: 80,\n              &quot;is_multiport&quot;: 0\n              &quot;multiport_range&quot;: &quot;80, 5500-30000&quot;\n              &quot;ip_translation&quot;: &quot;nat&quot;\n              &quot;tags&quot;: []\n            }]\n        }]\n      &quot;features&quot;:[,\n         &quot;OVPN_OBF&quot;,\n         &quot;p2p&quot;,\n         &quot;QR&quot;,\n         ]\n      }]\n    }]\n  }\n}<\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Get Countries (v2)<\/h2>\n\n\n\n<ul>\n<li><strong>URL:&nbsp;<\/strong>&lt;base url&gt;\/inventory\/v2\/countries\/&lt;sDeviceType&gt;<\/li>\n\n\n\n<li><strong>Request Method:&nbsp;<\/strong>GET<\/li>\n<\/ul>\n\n\n\n<p>Use this API to get a complete list of subscribed Countries.<\/p>\n\n\n\n<p>Returns a JSON object that contains the Countries.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Payload<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Key<\/th><th>Type<\/th><th>Pass in<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>X-AccessToken<\/code>*<\/td><td>String<\/td><td>Header<\/td><td><kbd>accessToken<\/kbd> retrieved from <a href=\"https:\/\/www.purewl.com\/developer\/guides\/api\/api-reference\/api-access-authentication\/#get-access-token\" data-type=\"link\" data-id=\"https:\/\/www.purewl.com\/developer\/guides\/api\/api-reference\/inventory-management\/countries\/\" target=\"_blank\" rel=\"noreferrer noopener\">Get Access Token<\/a> endpoint<\/td><\/tr><tr><td><code>sDeviceType<\/code>*<\/td><td>String<\/td><td>Path<\/td><td>Type of device <br>Possible values: <strong>android<\/strong> | <strong>ios<\/strong> | <strong>mac<\/strong> | <strong>windows<\/strong><\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">(*) Required Parameter<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Response<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Key<\/th><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>header<\/code><\/td><td>JSON<\/td><td>JSON object that describes return code and message.<\/td><\/tr><tr><td><code>body<\/code><\/td><td>JSON<\/td><td>JSON object that returns countries array containing objects.<\/td><\/tr><tr><td><code>countries<\/code><\/td><td>Array<\/td><td>Array of object that contains details related to country.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Sample Response<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism off-numbers lang-json\" data-lang=\"JSON\" data-show-lang=\"1\"><code>{\n  &quot;header&quot;: {\n    &quot;code&quot;: 1,\n    &quot;message&quot;: &quot;success&quot;\n    &quot;response_code&quot;: 1,\n  },\n  &quot;body&quot;: {\n    &quot;countries&quot;: [{\n      &quot;id&quot;: 254,\n      &quot;country&quot;: &quot;US&quot;,\n      &quot;name&quot;: &quot;United States&quot;,\n      &quot;iso_code&quot;: &quot;US&quot;,\n      &quot;latitude&quot;: 37.090240000000001,\n      &quot;longitude&quot;: -95.712890999999999,\n      &quot;is_smart_dns&quot;: 0,\n      &quot;is_virtual&quot;: 0,\n      &quot;rank&quot;: 0,\n      &quot;is_freemium&quot;: true,\n      &quot;recommended_protocol&quot;: &quot;IKEV&quot;,\n      &quot;data_centers&quot;:[],\n      &quot;protocols&quot;: [{\n        &quot;number&quot;: 1,\n        &quot;protocol&quot;: &quot;PPTP&quot;,\n        &quot;dns&quot;: [{\n          &quot;configuration_version&quot;: &quot;&quot;,\n          &quot;name&quot;: &quot;**.********.com&quot;,\n          &quot;type&quot;: &quot;primary&quot;,\n          &quot;acknowledgement_server&quot;: &quot;**.********.com&quot;,\n          &quot;port_number&quot;: 0,\n          &quot;is_multiport&quot;: 0\n          &quot;multiport_range&quot;: &quot;80&quot;\n          &quot;ip_translation&quot;: &quot;nat&quot;\n          &quot;tags&quot;: []\n          }\n          {\n          &quot;number&quot;: 8,\n          &quot;protocol&quot;: &quot;TCP&quot;,\n          &quot;dns&quot;: [{\n              &quot;configuration_version&quot;: &quot;2.0&quot;,\n              &quot;name&quot;: &quot;**.********.com&quot;,\n              &quot;type&quot;: &quot;primary&quot;,\n              &quot;acknowledgement_server&quot;: &quot;**.********.com&quot;,\n              &quot;port_number&quot;: 80,\n              &quot;is_multiport&quot;: 0\n              &quot;multiport_range&quot;: &quot;80, 5500-30000&quot;\n              &quot;ip_translation&quot;: &quot;nat&quot;\n              &quot;tags&quot;: []\n            }]\n        }]\n      &quot;features&quot;:[,\n         &quot;OVPN_OBF&quot;,\n         &quot;p2p&quot;,\n         &quot;QR&quot;,\n         ]\n      }]\n    }]\n  }\n}<\/code><\/pre><\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Get Countries API provides a list of available countries where VPN servers are located, tailored to the specific device requesting the information. This information is crucial for users to select their desired VPN server location. Get Countries (v3) Use this API to get a complete list of subscribed Countries. Returns a JSON object that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":9998,"menu_order":1,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.purewl.com\/developer\/wp-json\/wp\/v2\/docs\/10027"}],"collection":[{"href":"https:\/\/www.purewl.com\/developer\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.purewl.com\/developer\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.purewl.com\/developer\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.purewl.com\/developer\/wp-json\/wp\/v2\/comments?post=10027"}],"version-history":[{"count":11,"href":"https:\/\/www.purewl.com\/developer\/wp-json\/wp\/v2\/docs\/10027\/revisions"}],"predecessor-version":[{"id":10731,"href":"https:\/\/www.purewl.com\/developer\/wp-json\/wp\/v2\/docs\/10027\/revisions\/10731"}],"up":[{"embeddable":true,"href":"https:\/\/www.purewl.com\/developer\/wp-json\/wp\/v2\/docs\/9998"}],"wp:attachment":[{"href":"https:\/\/www.purewl.com\/developer\/wp-json\/wp\/v2\/media?parent=10027"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.purewl.com\/developer\/wp-json\/wp\/v2\/doc_tag?post=10027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}