{"_id":"57a848bb3ec56d0e001ee388","project":"56e29a8dd3b68d0e00b48ffa","user":"5795d43eb9ee2d0e00df357a","version":{"_id":"56e29a8dd3b68d0e00b48ffd","hasReference":true,"project":"56e29a8dd3b68d0e00b48ffa","__v":15,"hasDoc":true,"createdAt":"2016-03-11T10:14:37.460Z","releaseDate":"2016-03-11T10:14:37.460Z","categories":["56e29a8ed3b68d0e00b48ffe","56eb917a2e58011700afdfcc","56eb92252109011700f3ba5e","5704d4af849f721900f27835","57052a31473f900e004d5d54","5715222811537f19006aab2d","5715b57b810df00e00cc7832","5715baa9810df00e00cc7837","57180ed83a17770e009a7322","571810273a17770e009a7325","579b22d3f4ad7b190094b60e","584538ecba4f1c0f0096925e","586bb88e5602870f00ae7177","5a70407fb0a01400369583c5","5ace359e40606a0003eac1de"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"category":{"_id":"56eb917a2e58011700afdfcc","version":"56e29a8dd3b68d0e00b48ffd","pages":[],"project":"56e29a8dd3b68d0e00b48ffa","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-03-18T05:26:18.963Z","from_sync":false,"order":2,"slug":"company-information","title":"Companies"},"parentDoc":null,"__v":2,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-08-08T08:54:19.169Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","code":"[\n    {\n        \"CountryCode\": \"AD\",\n        \"CountryLabel\": \"Andorra\"\n    },\n  \t...\n    {\n        \"CountryCode\": \"ZW\",\n        \"CountryLabel\": \"Zimbabwe\"\n    }\n]","language":"json","status":200},{"code":"{\"Message\":\"Authorization has been denied for this request.\"}","language":"json","status":401,"name":""}]},"settings":"","examples":{"codes":[{"code":"<?php\n// Example assumes Composer is in use with GuzzleHttp as the API library.\nrequire_once(\"vendor/autoload.php\");\nuse GuzzleHttp\\Client;\n\n// Production environment endpoint\n// $api_base_uri = 'https://api.single-invoice.co/v2.0';\n\n// Sandbox environment endpoint\n$api_base_uri = 'https://api-demo.single-invoice.co/v2.0';\n\n// Create a client and provide a base URL\n$client = new Client([ \n\t'timeout' \t=> 8.0,\n\t'verify'\t=> true,\n\t'debug'\t\t=> true\n]);\n\ntry\n{\n\t$apikey = \"kCQXGoD48U3wUc5sRx19bLAgQESH2dFgA4nkHJiZ3a9IufN8hu5QqPINRNTtRDX5\";\n\t\n\t$response = $client->request('GET', $api_base_uri.\"/Lookups/Countries\", [\n\t\t'headers' => [ 'apikey' => $apikey ],\n\t]);\n\n\t// Check the status code returned by the call\n\t$statusCode = $response->getStatusCode();\n\n\t// Get the data\n\t$data = json_decode($response->getBody(), true);\n}\ncatch (GuzzleHttp\\Exception\\ClientException $e) {\n    $response = $e->getResponse();\n    $responseBodyAsString = $response->getBody()->getContents();\n}","language":"php"}]},"method":"get","auth":"required","params":[{"_id":"57b459706f47ab20002473fb","ref":"","in":"header","required":true,"desc":"Your Coverage API Key, in the HTTP request headers.","default":"","type":"string","name":"apikey"}],"url":"/lookups/countries"},"isReference":true,"order":3,"body":"This will return a JSON-formatted list of all the countries along with their two letter county code as defined by [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) - for example, France is \"FR\" and the United Kingdom is \"GB\".\n\nThese codes are typically used when searching for transactors. This method can (for example) be used to populate a dropdown of countries in a search form. (The contents are not expected to change so it should be safe to locally cache these values for long periods of time.)","excerpt":"Provides a list of all the support countries along with their ISO ISO 3166-1 alpha-2 country code.","slug":"country-code-listing","type":"endpoint","title":"List Country Codes"}

getList Country Codes

Provides a list of all the support countries along with their ISO ISO 3166-1 alpha-2 country code.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Headers

apikey:
required
string
Your Coverage API Key, in the HTTP request headers.

Examples


Result Format


Documentation

This will return a JSON-formatted list of all the countries along with their two letter county code as defined by [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) - for example, France is "FR" and the United Kingdom is "GB". These codes are typically used when searching for transactors. This method can (for example) be used to populate a dropdown of countries in a search form. (The contents are not expected to change so it should be safe to locally cache these values for long periods of time.)