Difference between revisions of "NATS5 REST API Service GET countries"

From TMM Wiki
Jump to navigationJump to search
m (TMMJoe moved page NATS4 REST API Service GET countries to NATS5 REST API Service GET countries: Renaming NATS5 API pages)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{NATS4 Manual
+
{{NATS5 Manual
| show_api_admin_section = true
+
| show_api_admin_service_section = true
 
}}
 
}}
 
== '''GET /service/countries''' ==
 
== '''GET /service/countries''' ==
 +
 
'''Description'''  
 
'''Description'''  
 
* Get a list of NATS supported countries  
 
* Get a list of NATS supported countries  
Line 9: Line 10:
 
*Replace domain with the nats domain
 
*Replace domain with the nats domain
  
'''[[NATS4_REST_API_Overview#Allowed_HTTP_Request_Methods|Request Method''']]
+
'''[[NATS5_REST_API_Overview#Allowed_HTTP_Request_Methods|Request Method''']]
 
*GET
 
*GET
 
'''Response Format'''
 
'''Response Format'''
 
*JSON
 
*JSON
  
'''[[NATS4_REST_API_Overview#Authentication|Authentication]]'''
+
'''[[NATS5_REST_API_Overview#Authentication|Authentication]]'''
 
*HTTP headers
 
*HTTP headers
  
Line 1,361: Line 1,362:
 
</pre>
 
</pre>
  
[[Category:NATS4_REST_APIs]]
+
[[Category:NATS5_REST_APIs]]
[[Category:NATS4_REST_service_Collection]]
+
[[Category:NATS5_REST_service_Collection]]
 
[[Category:Autogenerated_Wiki_Article]]<!-- Remove this tag when customizing a wiki article. The article will no longer be automatically updated -->
 
[[Category:Autogenerated_Wiki_Article]]<!-- Remove this tag when customizing a wiki article. The article will no longer be automatically updated -->
 
[[Category:Autogenerated_Rest_Sample]]<!-- This article has a generated REST API Sample from our unit testing system. Also remove if customizing the wiki article -->
 
[[Category:Autogenerated_Rest_Sample]]<!-- This article has a generated REST API Sample from our unit testing system. Also remove if customizing the wiki article -->

Latest revision as of 16:01, 9 August 2019

NATS 5
Members Section
Members Management
Adding a Member
View Member Details
Restricted Values
OpenID Connect
Mod Auth OpenIDC
    Adtool
GET /adtool/admin
GET /adtool/adtools
GET /adtool/adtool
GET /adtool/adtool-rules
GET /adtool/adtool-rule
GET /adtool/categories
GET /adtool/field-options
GET /adtool/field-types
GET /adtool/groups
GET /adtool/search
GET /adtool/templates
GET /adtool/types
GET /adtool/type
POST /adtool/adtool
POST /adtool/adtool-rule
POST /adtool/category
POST /adtool/field
POST /adtool/field-option
POST /adtool/group
POST /adtool/import
POST /adtool/type
PATCH /adtool/adtool
PATCH /adtool/adtool-group
PATCH /adtool/adtool-rule
PATCH /adtool/category
PATCH /adtool/field
PATCH /adtool/field-option
PATCH /adtool/group
PATCH /adtool/move
PATCH /adtool/restore-adtool
PATCH /adtool/restore-category
PATCH /adtool/restore-field
PATCH /adtool/restore-field-option
PATCH /adtool/restore-type
PATCH /adtool/type
DELETE /adtool/adtool
DELETE /adtool/adtool-rule
DELETE /adtool/category
DELETE /adtool/field
DELETE /adtool/field-option
DELETE /adtool/group
DELETE /adtool/type
    Affiliate
DELETE /affiliate/account-rep
DELETE /affiliate/account-type
DELETE /affiliate/affiliate
DELETE /affiliate/doc
DELETE /affiliate/group
DELETE /affiliate/permissions
GET /affiliate/account-changes
GET /affiliate/account-types
GET /affiliate/admin-settings
GET /affiliate/campaigns
GET /affiliate/current
GET /affiliate/current-permissions
GET /affiliate/docs
GET /affiliate/doc
GET /affiliate/groups
GET /affiliate/group
GET /affiliate/hits
GET /affiliate/link-styles
GET /affiliate/loginids
GET /affiliate/loginlog
GET /affiliate/manual-payout
GET /affiliate/news-sections
GET /affiliate/notes
GET /affiliate/notices
GET /affiliate/override
GET /affiliate/payout
GET /affiliate/payment-periods
GET /affiliate/payvia-types
GET /affiliate/payvia-type
GET /affiliate/permissions
GET /affiliate/programcampaigns
GET /affiliate/referrer
GET /affiliate/referring-urls
GET /affiliate/reps
GET /affiliate/rest-methods
GET /affiliate/search
GET /affiliate/search-limited
GET /affiliate/settings
GET /affiliate/skins
GET /affiliate/soap-functions
GET /affiliate/status
PATCH /affiliate/adminsettings
PATCH /affiliate/account-change
PATCH /affiliate/account-type
PATCH /affiliate/account-type-permissions
PATCH /affiliate/admin-setting
PATCH /affiliate/affiliate-account-type
PATCH /affiliate/affiliate-group
PATCH /affiliate/allsettings
PATCH /affiliate/account-rep
PATCH /affiliate/avatar
PATCH /affiliate/customs
PATCH /affiliate/defaults
PATCH /affiliate/details
PATCH /affiliate/override
PATCH /affiliate/password
PATCH /affiliate/payment-period
PATCH /affiliate/payvia
PATCH /affiliate/payvia-info
PATCH /affiliate/permissions
PATCH /affiliate/referrer
PATCH /affiliate/reset-api
PATCH /affiliate/reset-rss
PATCH /affiliate/reset-tos
PATCH /affiliate/rest-permissions
PATCH /affiliate/restore
PATCH /affiliate/restore-account-type
PATCH /affiliate/settings
PATCH /affiliate/soap-permissions
PATCH /affiliate/status
POST /affiliate/account-type
POST /affiliate/add
POST /affiliate/doc
POST /affiliate/group
POST /affiliate/invoice
POST /affiliate/manual-sale
POST /affiliate/note
    Biller
GET /biller/available
GET /biller/partner-available
GET /biller/billerdata
GET /biller/cascades
GET /biller/cascades-available
GET /biller/cascade-count
GET /biller/cascade-history
GET /biller/cascade-rules
GET /biller/cascade-rule
GET /biller/cascade-step-count
GET /biller/cascade-steps
GET /biller/cascade-detail
GET /biller/cascade-list
GET /biller/count
GET /biller/detail
GET /biller/fees
GET /biller/partner-fees
GET /biller/last_poll
GET /biller/partner-last-poll
GET /biller/list
GET /biller/partner-detail
GET /biller/partner-list
GET /biller/partner-shortnames
GET /biller/process_types
GET /biller/partner-process-types
GET /biller/shortnames
GET /biller/transaction_types
GET /biller/partner-transaction-types
GET /biller/taxes
POST /biller/add
POST /biller/cascade
POST /biller/cascade-rule
POST /biller/cascade-step
POST /biller/partner
PATCH /biller/cascade
PATCH /biller/cascade-rule
PATCH /biller/cascade-step
PATCH /biller/cascade-steps-reorder
PATCH /biller/fee
PATCH /biller/partner-fee
PATCH /biller/restore
PATCH /biller/restore-cascade
PATCH /biller/restore-partner
PATCH /biller/setting
PATCH /biller/partner-setting
PATCH /biller/tax
DELETE /biller/biller
DELETE /biller/cascade
DELETE /biller/cascade-rule
DELETE /biller/cascade-step
DELETE /biller/fee
DELETE /biller/partner-fee
DELETE /biller/partner
DELETE /biller/tax
    Codes
GET /codes/affiliate-codes
GET /codes/decode
GET /codes/linkcodes
GET /codes/strack
    Config
DELETE /config/setting
GET /config/section
GET /config/sections
PATCH /config/affiliate_default
PATCH /config/section
    Include
DELETE /include/include
DELETE /include/step
GET /include/include
GET /include/includes
GET /include/templates
PATCH /include/include
PATCH /include/restore
PATCH /include/step
POST /include/include
POST /include/step
    Mailing
DELETE /mailing/mailing
DELETE /mailing/mailing-rule
DELETE /mailing/queue
GET /mailing/mailing
GET /mailing/mailings
GET /mailing/mailing-rules
GET /mailing/mailing-rule
GET /mailing/queue
GET /mailing/removelist
PATCH /mailing/mailing
PATCH /mailing/mailing-rule
PATCH /mailing/removelist
PATCH /mailing/removelist-queue
PATCH /mailing/resend-queue
PATCH /mailing/restore-queue
PATCH /mailing/send-mailing
PATCH /mailing/send-test-mailing
POST /mailing/mailing
POST /mailing/mailing-rule
POST /mailing/removelist
    Maintenance
DELETE /maintenance/log
DELETE /maintenance/cache
GET /maintenance/admin-actions
GET /maintenance/log
GET /maintenance/logs
GET /maintenance/nats
GET /maintenance/report
GET /maintenance/report-progress
GET /maintenance/reports
GET /maintenance/server
GET /maintenance/table
GET /maintenance/tables
GET /maintenance/table-clean-count
GET /maintenance/table-clean-progress
PATCH /maintenance/log
PATCH /maintenance/report
PATCH /maintenance/table
    Member
GET /member/available_flags
GET /member/encryptusername
GET /member/authstring
GET /member/details
GET /member/flags
GET /member/loginlog
GET /member/matching
GET /member/notes
GET /member/notices
GET /member/restricted-values
GET /member/search
GET /member/suggestedcanceloffers
GET /member/surfer-actions
PATCH /member/details
PATCH /member/expiration
PATCH /member/expiremanual
PATCH /member/resend-transaction-email
PATCH /member/resend-transaction-postback
PATCH /member/restricted-value
PATCH /member/forget
PATCH /member/lock
PATCH /member/unlock
POST /member/flag
POST /member/login
POST /member/note
POST /member/restricted-value
DELETE /member/flag
DELETE /member/restricted-value
    Message
DELETE /message/message
DELETE /message/permanent
GET /message/count
GET /message/messages
GET /message/view
PATCH /message/read
PATCH /message/unread
PATCH /message/undelete
POST /message/message
    News
DELETE /news/entry
DELETE /news/section
GET /news/entry
GET /news/news
GET /news/sections
PATCH /news/entry
POST /news/entry
POST /news/section
    Notification
DELETE /notification/notification
DELETE /notification/permanent
GET /notification/count
GET /notification/notifications
GET /notification/view
PATCH /notification/read
PATCH /notification/unread
PATCH /notification/undelete
    Option
GET /option/options
GET /option/rule
PATCH /option/rule
PATCH /option/text
POST /option/rule
    Payment
DELETE /payment/invoice
DELETE /payment/payout-period
DELETE /payment/payvia-field
DELETE /payment/payvia-field-mc
DELETE /payment/payvia-rule
GET /payment/dump-format
GET /payment/dump-formats
GET /payment/invoices
GET /payment/payments
GET /payment/payment-dumps
GET /payment/payment-dump
GET /payment/payment-search
GET /payment/payvia
GET /payment/payvias
GET /payment/payvia-fields
GET /payment/payvia-field-mcs
GET /payment/payout-period
GET /payment/payout-periods
GET /payment/payvia-rules
GET /payment/payvia-rule
GET /payment/payviarule
PATCH /payment/copy-dump-format
PATCH /payment/default-payout-period
PATCH /payment/dump-format
PATCH /payment/duplicate-payvia
PATCH /payment/invoice
PATCH /payment/payment
PATCH /payment/payment-paid
PATCH /payment/payment-store
PATCH /payment/payment-unstore
PATCH /payment/payments
PATCH /payment/payments-unstore
PATCH /payment/payout-period
PATCH /payment/payout-period-affiliates
PATCH /payment/payvia
PATCH /payment/payvia-field
PATCH /payment/payvia-fields-reorder
PATCH /payment/payvia-field-mc
PATCH /payment/payvia-field-mcs-reorder
PATCH /payment/payvia-rule
PATCH /payment/payviarule
PATCH /payment/restore-payout-period
PATCH /payment/restore-payvia-field
PATCH /payment/restore-payvia-field-mc
POST /payment/check-dump
POST /payment/dump-format
POST /payment/import-dump
POST /payment/invoice
POST /payment/payout-period
POST /payment/payvia
POST /payment/payvia-field
POST /payment/payvia-field-mc
POST /payment/payvia-rule
    Program
DELETE /program/program
DELETE /program/payout-change
DELETE /program/payout-change-tier
GET /program/additional-payout-change-targets
GET /program/affiliate-available
GET /program/detail
GET /program/list
GET /program/options
GET /program/payout-changes
GET /program/redirect-available
GET /program/sites
GET /program/tours
GET /program/types
PATCH /program/default_payout
PATCH /program/details
PATCH /program/disable_affiliate
PATCH /program/disable_tour
PATCH /program/enable_affiliate
PATCH /program/enable_site
PATCH /program/enable_tour
PATCH /program/move-payout-change
PATCH /program/payout-change
PATCH /program/payout-change-tier
POST /program/new
POST /program/payout-change
POST /program/payout-change-tier
    Report
GET /report/affiliate-ratios
GET /report/hits
GET /report/hit-totals
GET /report/profitloss
GET /report/profit-loss
GET /report/fields
GET /report/focus
GET /report/focuses
GET /report/groups
GET /report/perspective
GET /report/perspectives
GET /report/report
GET /report/subscription
GET /report/surfer
GET /report/surferaction
GET /report/transactionpayouts
GET /report/transactions
GET /report/transaction
GET /report/report-widget
GET /report/widgets
GET /report/widget
GET /report/widget-info
GET /report/views
POST /report/focus
POST /report/group
POST /report/perspective
PATCH /report/focus
PATCH /report/focus-enabled
PATCH /report/focus-default
PATCH /report/focuses-reorder
PATCH /report/perspective
PATCH /report/perspective-group
PATCH /report/report-widget
PATCH /report/widget
DELETE /report/focus
    Reward
DELETE /reward/category
DELETE /reward/purchase
DELETE /reward/point
DELETE /reward/reward
GET /reward/categories
GET /reward/points
GET /reward/purchases
GET /reward/rewards
PATCH /reward/move-point
PATCH /reward/point
PATCH /reward/reward
PATCH /reward/ship-purchase
PATCH /reward/unship-purchase
POST /reward/category
POST /reward/point
POST /reward/reward
    Service
GET /service/check-functions
GET /service/condition
GET /service/countries
GET /service/country
GET /service/datetime
GET /service/languages
GET /service/periods
GET /service/ping
GET /service/project
GET /service/rule-condition-data
GET /service/rule-info
GET /service/stats-breakdowns
GET /service/timezone
GET /service/timestamp
POST /service/sendemail
    Site
GET /site/base-templates
GET /site/billers
GET /site/cookies
GET /site/coupon
GET /site/coupons
GET /site/coupon-revisions
GET /site/email-settings
GET /site/groups
GET /site/option
GET /site/options
GET /site/options-available
GET /site/option-fields
GET /site/option-rules
GET /site/option-rule
GET /site/option-type
GET /site/option-types
GET /site/programs
GET /site/redirect
GET /site/redirects
GET /site/redirect-rules
GET /site/redirect-rule
GET /site/site-list
GET /site/site
GET /site/site-notices
GET /site/site-partner
GET /site/site-partners
GET /site/site-type
GET /site/sites
GET /site/template
GET /site/templates
GET /site/template-sections
GET /site/template-sites
GET /site/tour
GET /site/tours
GET /site/tour-emails
GET /site/tour-notices
POST /site/coupon
POST /site/group
POST /site/option
POST /site/option-rule
POST /site/redirect
POST /site/redirect-rule
POST /site/site-partner
POST /site/site-tour
POST /site/copy-template
POST /site/tour
PATCH /site/cookie
PATCH /site/coupon
PATCH /site/duplicate-option
PATCH /site/email-settings
PATCH /site/group
PATCH /site/move
PATCH /site/option
PATCH /site/option-rule
PATCH /site/redirect
PATCH /site/redirect-rule
PATCH /site/reset-coupon
PATCH /site/restore-group
PATCH /site/restore-option
PATCH /site/restore-redirect
PATCH /site/restore-site
PATCH /site/restore-site-partner
PATCH /site/restore-tour
PATCH /site/site
PATCH /site/site-partner
PATCH /site/template
PATCH /site/tour
DELETE /site/cookie
DELETE /site/group
DELETE /site/option
DELETE /site/option-rule
DELETE /site/site
DELETE /site/site-partner
DELETE /site/redirect
DELETE /site/redirect-rule
DELETE /site/template
DELETE /site/tour
DELETE /site/tour-field
    Skin
DELETE /skin/skin
DELETE /skin/template
GET /skin/colors
GET /skin/export
GET /skin/skins
GET /skin/sections
GET /skin/templates
GET /skin/template
PATCH /skin/colors
PATCH /skin/flush
PATCH /skin/skin
PATCH /skin/template
POST /skin/copy-template
POST /skin/import
POST /skin/skin
POST /skin/template

GET /service/countries

Description

  • Get a list of NATS supported countries

Resource URL

  • http://domain/api/service/countries
  • Replace domain with the nats domain

Request Method

  • GET

Response Format

  • JSON

Authentication

  • HTTP headers

Parameters

None

Example Request

Method: GET
URL: http://domain/api/service/countries

Response:

[
    {
        "country_code": "AF",
        "countryid": "004",
        "name": "Afghanistan"
    },
    {
        "country_code": "AX",
        "countryid": "248",
        "name": "Aland Islands"
    },
    {
        "country_code": "AL",
        "countryid": "008",
        "name": "Albania"
    },
    {
        "country_code": "DZ",
        "countryid": "012",
        "name": "Algeria"
    },
    {
        "country_code": "AS",
        "countryid": "016",
        "name": "American Samoa"
    },
    {
        "country_code": "AD",
        "countryid": "020",
        "name": "Andorra"
    },
    {
        "country_code": "AO",
        "countryid": "024",
        "name": "Angola"
    },
    {
        "country_code": "AI",
        "countryid": "660",
        "name": "Anguilla"
    },
    {
        "country_code": "AQ",
        "countryid": "010",
        "name": "Antarctica"
    },
    {
        "country_code": "AG",
        "countryid": "028",
        "name": "Antigua And Barbuda"
    },
    {
        "country_code": "AR",
        "countryid": "032",
        "name": "Argentina"
    },
    {
        "country_code": "AM",
        "countryid": "051",
        "name": "Armenia"
    },
    {
        "country_code": "AW",
        "countryid": "533",
        "name": "Aruba"
    },
    {
        "country_code": "AU",
        "countryid": "036",
        "name": "Australia"
    },
    {
        "country_code": "AT",
        "countryid": "040",
        "name": "Austria"
    },
    {
        "country_code": "AZ",
        "countryid": "031",
        "name": "Azerbaijan"
    },
    {
        "country_code": "BS",
        "countryid": "044",
        "name": "Bahamas"
    },
    {
        "country_code": "BH",
        "countryid": "048",
        "name": "Bahrain"
    },
    {
        "country_code": "BD",
        "countryid": "050",
        "name": "Bangladesh"
    },
    {
        "country_code": "BB",
        "countryid": "052",
        "name": "Barbados"
    },
    {
        "country_code": "BY",
        "countryid": "112",
        "name": "Belarus"
    },
    {
        "country_code": "BE",
        "countryid": "056",
        "name": "Belgium"
    },
    {
        "country_code": "BZ",
        "countryid": "084",
        "name": "Belize"
    },
    {
        "country_code": "BJ",
        "countryid": "204",
        "name": "Benin"
    },
    {
        "country_code": "BM",
        "countryid": "060",
        "name": "Bermuda"
    },
    {
        "country_code": "BT",
        "countryid": "064",
        "name": "Bhutan"
    },
    {
        "country_code": "BO",
        "countryid": "068",
        "name": "Bolivia"
    },
    {
        "country_code": "BQ",
        "countryid": "535",
        "name": "Bonaire, Saint Eustatius and Saba"
    },
    {
        "country_code": "BA",
        "countryid": "070",
        "name": "Bosnia And Herzegowina"
    },
    {
        "country_code": "BW",
        "countryid": "072",
        "name": "Botswana"
    },
    {
        "country_code": "BV",
        "countryid": "074",
        "name": "Bouvet Island"
    },
    {
        "country_code": "BR",
        "countryid": "076",
        "name": "Brazil"
    },
    {
        "country_code": "IO",
        "countryid": "086",
        "name": "British Indian Ocean"
    },
    {
        "country_code": "BN",
        "countryid": "096",
        "name": "Brunei Darussalam"
    },
    {
        "country_code": "BG",
        "countryid": "100",
        "name": "Bulgaria"
    },
    {
        "country_code": "BF",
        "countryid": "854",
        "name": "Burkina Faso"
    },
    {
        "country_code": "BI",
        "countryid": "108",
        "name": "Burundi"
    },
    {
        "country_code": "KH",
        "countryid": "116",
        "name": "Cambodia"
    },
    {
        "country_code": "CM",
        "countryid": "120",
        "name": "Cameroon"
    },
    {
        "country_code": "CA",
        "countryid": "124",
        "name": "Canada"
    },
    {
        "country_code": "CV",
        "countryid": "132",
        "name": "Cape Verde"
    },
    {
        "country_code": "KY",
        "countryid": "136",
        "name": "Cayman Islands"
    },
    {
        "country_code": "CF",
        "countryid": "140",
        "name": "Central African Republic"
    },
    {
        "country_code": "TD",
        "countryid": "148",
        "name": "Chad"
    },
    {
        "country_code": "CL",
        "countryid": "152",
        "name": "Chile"
    },
    {
        "country_code": "CN",
        "countryid": "156",
        "name": "China"
    },
    {
        "country_code": "CX",
        "countryid": "162",
        "name": "Christmas Island"
    },
    {
        "country_code": "CC",
        "countryid": "166",
        "name": "Cocos (Keeling) Islands"
    },
    {
        "country_code": "CO",
        "countryid": "170",
        "name": "Colombia"
    },
    {
        "country_code": "KM",
        "countryid": "174",
        "name": "Comoros"
    },
    {
        "country_code": "CG",
        "countryid": "178",
        "name": "Congo, Republic of the"
    },
    {
        "country_code": "CD",
        "countryid": "180",
        "name": "Congo, Democratic Republic of the"
    },
    {
        "country_code": "CK",
        "countryid": "184",
        "name": "Cook Islands"
    },
    {
        "country_code": "CR",
        "countryid": "188",
        "name": "Costa Rica"
    },
    {
        "country_code": "CI",
        "countryid": "384",
        "name": "Cote D'ivoire"
    },
    {
        "country_code": "HR",
        "countryid": "191",
        "name": "Croatia"
    },
    {
        "country_code": "CU",
        "countryid": "192",
        "name": "Cuba"
    },
    {
        "country_code": "CW",
        "countryid": "531",
        "name": "Curacao"
    },
    {
        "country_code": "CY",
        "countryid": "196",
        "name": "Cyprus"
    },
    {
        "country_code": "CZ",
        "countryid": "203",
        "name": "Czech Republic"
    },
    {
        "country_code": "DK",
        "countryid": "208",
        "name": "Denmark"
    },
    {
        "country_code": "DJ",
        "countryid": "262",
        "name": "Djibouti"
    },
    {
        "country_code": "DM",
        "countryid": "212",
        "name": "Dominica"
    },
    {
        "country_code": "DO",
        "countryid": "214",
        "name": "Dominican Republic"
    },
    {
        "country_code": "EC",
        "countryid": "218",
        "name": "Ecuador"
    },
    {
        "country_code": "EG",
        "countryid": "818",
        "name": "Egypt"
    },
    {
        "country_code": "SV",
        "countryid": "222",
        "name": "El Salvador"
    },
    {
        "country_code": "GQ",
        "countryid": "226",
        "name": "Equatorial Guinea"
    },
    {
        "country_code": "ER",
        "countryid": "232",
        "name": "Eritrea"
    },
    {
        "country_code": "EE",
        "countryid": "233",
        "name": "Estonia"
    },
    {
        "country_code": "ET",
        "countryid": "231",
        "name": "Ethiopia"
    },
    {
        "country_code": "FK",
        "countryid": "238",
        "name": "Falkland Islands (Malvinas)"
    },
    {
        "country_code": "FO",
        "countryid": "234",
        "name": "Faroe Islands"
    },
    {
        "country_code": "FJ",
        "countryid": "242",
        "name": "Fiji"
    },
    {
        "country_code": "FI",
        "countryid": "246",
        "name": "Finland"
    },
    {
        "country_code": "FR",
        "countryid": "250",
        "name": "France"
    },
    {
        "country_code": "GF",
        "countryid": "254",
        "name": "French Guiana"
    },
    {
        "country_code": "PF",
        "countryid": "258",
        "name": "French Polynesia"
    },
    {
        "country_code": "TF",
        "countryid": "260",
        "name": "French Southern Territories"
    },
    {
        "country_code": "GA",
        "countryid": "266",
        "name": "Gabon"
    },
    {
        "country_code": "GM",
        "countryid": "270",
        "name": "Gambia"
    },
    {
        "country_code": "GE",
        "countryid": "268",
        "name": "Georgia"
    },
    {
        "country_code": "DE",
        "countryid": "276",
        "name": "Germany"
    },
    {
        "country_code": "GH",
        "countryid": "288",
        "name": "Ghana"
    },
    {
        "country_code": "GI",
        "countryid": "292",
        "name": "Gibraltar"
    },
    {
        "country_code": "GR",
        "countryid": "300",
        "name": "Greece"
    },
    {
        "country_code": "GL",
        "countryid": "304",
        "name": "Greenland"
    },
    {
        "country_code": "GD",
        "countryid": "308",
        "name": "Grenada"
    },
    {
        "country_code": "GP",
        "countryid": "312",
        "name": "Guadeloupe"
    },
    {
        "country_code": "GU",
        "countryid": "316",
        "name": "Guam"
    },
    {
        "country_code": "GT",
        "countryid": "320",
        "name": "Guatemala"
    },
    {
        "country_code": "GG",
        "countryid": "831",
        "name": "Guernsey"
    },
    {
        "country_code": "GN",
        "countryid": "324",
        "name": "Guinea"
    },
    {
        "country_code": "GW",
        "countryid": "624",
        "name": "Guinea-bissau"
    },
    {
        "country_code": "GY",
        "countryid": "328",
        "name": "Guyana"
    },
    {
        "country_code": "HT",
        "countryid": "332",
        "name": "Haiti"
    },
    {
        "country_code": "HM",
        "countryid": "334",
        "name": "Heard Island and McDonald Islands"
    },
    {
        "country_code": "VA",
        "countryid": "336",
        "name": "Holy See (Vatican City State)"
    },
    {
        "country_code": "HN",
        "countryid": "340",
        "name": "Honduras"
    },
    {
        "country_code": "HK",
        "countryid": "344",
        "name": "Hong Kong"
    },
    {
        "country_code": "HU",
        "countryid": "348",
        "name": "Hungary"
    },
    {
        "country_code": "IS",
        "countryid": "352",
        "name": "Iceland"
    },
    {
        "country_code": "IN",
        "countryid": "356",
        "name": "India"
    },
    {
        "country_code": "ID",
        "countryid": "360",
        "name": "Indonesia"
    },
    {
        "country_code": "IR",
        "countryid": "364",
        "name": "Iran, Islamic Republic of"
    },
    {
        "country_code": "IQ",
        "countryid": "368",
        "name": "Iraq"
    },
    {
        "country_code": "IE",
        "countryid": "372",
        "name": "Ireland"
    },
    {
        "country_code": "IM",
        "countryid": "833",
        "name": "Isle of Man"
    },
    {
        "country_code": "IL",
        "countryid": "376",
        "name": "Israel"
    },
    {
        "country_code": "IT",
        "countryid": "380",
        "name": "Italy"
    },
    {
        "country_code": "JM",
        "countryid": "388",
        "name": "Jamaica"
    },
    {
        "country_code": "JP",
        "countryid": "392",
        "name": "Japan"
    },
    {
        "country_code": "JE",
        "countryid": "832",
        "name": "Jersey"
    },
    {
        "country_code": "JO",
        "countryid": "400",
        "name": "Jordan"
    },
    {
        "country_code": "KZ",
        "countryid": "398",
        "name": "Kazakhstan"
    },
    {
        "country_code": "KE",
        "countryid": "404",
        "name": "Kenya"
    },
    {
        "country_code": "KI",
        "countryid": "296",
        "name": "Kiribati"
    },
    {
        "country_code": "KP",
        "countryid": "408",
        "name": "Korea, Democratic People's Republic of"
    },
    {
        "country_code": "KR",
        "countryid": "410",
        "name": "Korea, Republic of"
    },
    {
        "country_code": "KW",
        "countryid": "414",
        "name": "Kuwait"
    },
    {
        "country_code": "KG",
        "countryid": "417",
        "name": "Kyrgyzstan"
    },
    {
        "country_code": "LA",
        "countryid": "418",
        "name": "Lao People's Democratic Republic"
    },
    {
        "country_code": "LV",
        "countryid": "428",
        "name": "Latvia"
    },
    {
        "country_code": "LB",
        "countryid": "422",
        "name": "Lebanon"
    },
    {
        "country_code": "LS",
        "countryid": "426",
        "name": "Lesotho"
    },
    {
        "country_code": "LR",
        "countryid": "430",
        "name": "Liberia"
    },
    {
        "country_code": "LY",
        "countryid": "434",
        "name": "Libya"
    },
    {
        "country_code": "LI",
        "countryid": "438",
        "name": "Liechtenstein"
    },
    {
        "country_code": "LT",
        "countryid": "440",
        "name": "Lithuania"
    },
    {
        "country_code": "LU",
        "countryid": "442",
        "name": "Luxembourg"
    },
    {
        "country_code": "MO",
        "countryid": "446",
        "name": "Macao"
    },
    {
        "country_code": "MK",
        "countryid": "807",
        "name": "Macedonia, Republic of"
    },
    {
        "country_code": "MG",
        "countryid": "450",
        "name": "Madagascar"
    },
    {
        "country_code": "MW",
        "countryid": "454",
        "name": "Malawi"
    },
    {
        "country_code": "MY",
        "countryid": "458",
        "name": "Malaysia"
    },
    {
        "country_code": "MV",
        "countryid": "462",
        "name": "Maldives"
    },
    {
        "country_code": "ML",
        "countryid": "466",
        "name": "Mali"
    },
    {
        "country_code": "MT",
        "countryid": "470",
        "name": "Malta"
    },
    {
        "country_code": "MH",
        "countryid": "584",
        "name": "Marshall Islands"
    },
    {
        "country_code": "MQ",
        "countryid": "474",
        "name": "Martinique"
    },
    {
        "country_code": "MR",
        "countryid": "478",
        "name": "Mauritania"
    },
    {
        "country_code": "MU",
        "countryid": "480",
        "name": "Mauritius"
    },
    {
        "country_code": "YT",
        "countryid": "175",
        "name": "Mayotte"
    },
    {
        "country_code": "MX",
        "countryid": "484",
        "name": "Mexico"
    },
    {
        "country_code": "FM",
        "countryid": "583",
        "name": "Micronesia, Federated States of"
    },
    {
        "country_code": "MD",
        "countryid": "498",
        "name": "Moldova, Republic Of"
    },
    {
        "country_code": "MC",
        "countryid": "492",
        "name": "Monaco"
    },
    {
        "country_code": "MN",
        "countryid": "496",
        "name": "Mongolia"
    },
    {
        "country_code": "ME",
        "countryid": "499",
        "name": "Montenegro"
    },
    {
        "country_code": "MS",
        "countryid": "500",
        "name": "Montserrat"
    },
    {
        "country_code": "MA",
        "countryid": "504",
        "name": "Morocco"
    },
    {
        "country_code": "MZ",
        "countryid": "508",
        "name": "Mozambique"
    },
    {
        "country_code": "MM",
        "countryid": "104",
        "name": "Myanmar"
    },
    {
        "country_code": "NA",
        "countryid": "516",
        "name": "Namibia"
    },
    {
        "country_code": "NR",
        "countryid": "520",
        "name": "Nauru"
    },
    {
        "country_code": "NP",
        "countryid": "524",
        "name": "Nepal"
    },
    {
        "country_code": "NL",
        "countryid": "528",
        "name": "Netherlands"
    },
    {
        "country_code": "AN",
        "countryid": "530",
        "name": "Netherlands Antilles"
    },
    {
        "country_code": "NC",
        "countryid": "540",
        "name": "New Caledonia"
    },
    {
        "country_code": "NZ",
        "countryid": "554",
        "name": "New Zealand"
    },
    {
        "country_code": "NI",
        "countryid": "558",
        "name": "Nicaragua"
    },
    {
        "country_code": "NE",
        "countryid": "562",
        "name": "Niger"
    },
    {
        "country_code": "NG",
        "countryid": "566",
        "name": "Nigeria"
    },
    {
        "country_code": "NU",
        "countryid": "570",
        "name": "Niue"
    },
    {
        "country_code": "NF",
        "countryid": "574",
        "name": "Norfolk Island"
    },
    {
        "country_code": "MP",
        "countryid": "580",
        "name": "Northern Mariana Islands"
    },
    {
        "country_code": "NO",
        "countryid": "578",
        "name": "Norway"
    },
    {
        "country_code": "OM",
        "countryid": "512",
        "name": "Oman"
    },
    {
        "country_code": "PK",
        "countryid": "586",
        "name": "Pakistan"
    },
    {
        "country_code": "PW",
        "countryid": "585",
        "name": "Palau"
    },
    {
        "country_code": "PS",
        "countryid": "275",
        "name": "Palestine, State of"
    },
    {
        "country_code": "PA",
        "countryid": "591",
        "name": "Panama"
    },
    {
        "country_code": "PG",
        "countryid": "598",
        "name": "Papua New Guinea"
    },
    {
        "country_code": "PY",
        "countryid": "600",
        "name": "Paraguay"
    },
    {
        "country_code": "PE",
        "countryid": "604",
        "name": "Peru"
    },
    {
        "country_code": "PH",
        "countryid": "608",
        "name": "Philippines"
    },
    {
        "country_code": "PN",
        "countryid": "612",
        "name": "Pitcairn"
    },
    {
        "country_code": "PL",
        "countryid": "616",
        "name": "Poland"
    },
    {
        "country_code": "PT",
        "countryid": "620",
        "name": "Portugal"
    },
    {
        "country_code": "PR",
        "countryid": "630",
        "name": "Puerto Rico"
    },
    {
        "country_code": "QA",
        "countryid": "634",
        "name": "Qatar"
    },
    {
        "country_code": "RE",
        "countryid": "638",
        "name": "Reunion"
    },
    {
        "country_code": "RO",
        "countryid": "642",
        "name": "Romania"
    },
    {
        "country_code": "RU",
        "countryid": "643",
        "name": "Russian Federation"
    },
    {
        "country_code": "RW",
        "countryid": "646",
        "name": "Rwanda"
    },
    {
        "country_code": "BL",
        "countryid": "652",
        "name": "Saint Bartelemey"
    },
    {
        "country_code": "SH",
        "countryid": "654",
        "name": "Saint Helena"
    },
    {
        "country_code": "KN",
        "countryid": "659",
        "name": "Saint Kitts And Nevis"
    },
    {
        "country_code": "LC",
        "countryid": "662",
        "name": "Saint Lucia"
    },
    {
        "country_code": "PM",
        "countryid": "666",
        "name": "Saint Pierre And Miquelon"
    },
    {
        "country_code": "VC",
        "countryid": "670",
        "name": "Saint Vincent and the Grenadines"
    },
    {
        "country_code": "MF",
        "countryid": "663",
        "name": "Saint-Martin (French part)"
    },
    {
        "country_code": "WS",
        "countryid": "882",
        "name": "Samoa"
    },
    {
        "country_code": "SM",
        "countryid": "674",
        "name": "San Marino"
    },
    {
        "country_code": "ST",
        "countryid": "678",
        "name": "Sao Tome and Principe"
    },
    {
        "country_code": "SA",
        "countryid": "682",
        "name": "Saudi Arabia"
    },
    {
        "country_code": "SN",
        "countryid": "686",
        "name": "Senegal"
    },
    {
        "country_code": "RS",
        "countryid": "688",
        "name": "Serbia"
    },
    {
        "country_code": "SC",
        "countryid": "690",
        "name": "Seychelles"
    },
    {
        "country_code": "SL",
        "countryid": "694",
        "name": "Sierra Leone"
    },
    {
        "country_code": "SG",
        "countryid": "702",
        "name": "Singapore"
    },
    {
        "country_code": "SX",
        "countryid": "534",
        "name": "Sint Maarten (Dutch part)"
    },
    {
        "country_code": "SK",
        "countryid": "703",
        "name": "Slovakia"
    },
    {
        "country_code": "SI",
        "countryid": "705",
        "name": "Slovenia"
    },
    {
        "country_code": "SB",
        "countryid": "090",
        "name": "Solomon Islands"
    },
    {
        "country_code": "SO",
        "countryid": "706",
        "name": "Somalia"
    },
    {
        "country_code": "ZA",
        "countryid": "710",
        "name": "South Africa"
    },
    {
        "country_code": "GS",
        "countryid": "239",
        "name": "South Georgia and the South Sandwich Islands"
    },
    {
        "country_code": "SS",
        "countryid": "728",
        "name": "South Sudan"
    },
    {
        "country_code": "ES",
        "countryid": "724",
        "name": "Spain"
    },
    {
        "country_code": "LK",
        "countryid": "144",
        "name": "Sri Lanka"
    },
    {
        "country_code": "SD",
        "countryid": "736",
        "name": "Sudan"
    },
    {
        "country_code": "SR",
        "countryid": "740",
        "name": "Suriname"
    },
    {
        "country_code": "SJ",
        "countryid": "744",
        "name": "Svalbard and Jan Mayen Islands"
    },
    {
        "country_code": "SZ",
        "countryid": "748",
        "name": "Swaziland"
    },
    {
        "country_code": "SE",
        "countryid": "752",
        "name": "Sweden"
    },
    {
        "country_code": "CH",
        "countryid": "756",
        "name": "Switzerland"
    },
    {
        "country_code": "SY",
        "countryid": "760",
        "name": "Syrian Arab Republic"
    },
    {
        "country_code": "TW",
        "countryid": "158",
        "name": "Taiwan"
    },
    {
        "country_code": "TJ",
        "countryid": "762",
        "name": "Tajikistan"
    },
    {
        "country_code": "TZ",
        "countryid": "834",
        "name": "Tanzania, United Republic Of"
    },
    {
        "country_code": "TH",
        "countryid": "764",
        "name": "Thailand"
    },
    {
        "country_code": "TL",
        "countryid": "626",
        "name": "Timor-Leste"
    },
    {
        "country_code": "TG",
        "countryid": "768",
        "name": "Togo"
    },
    {
        "country_code": "TK",
        "countryid": "772",
        "name": "Tokelau"
    },
    {
        "country_code": "TO",
        "countryid": "776",
        "name": "Tonga"
    },
    {
        "country_code": "TT",
        "countryid": "780",
        "name": "Trinidad And Tobago"
    },
    {
        "country_code": "TN",
        "countryid": "788",
        "name": "Tunisia"
    },
    {
        "country_code": "TR",
        "countryid": "792",
        "name": "Turkey"
    },
    {
        "country_code": "TM",
        "countryid": "795",
        "name": "Turkmenistan"
    },
    {
        "country_code": "TC",
        "countryid": "796",
        "name": "Turks and Caicos Islands"
    },
    {
        "country_code": "TV",
        "countryid": "798",
        "name": "Tuvalu"
    },
    {
        "country_code": "UG",
        "countryid": "800",
        "name": "Uganda"
    },
    {
        "country_code": "UA",
        "countryid": "804",
        "name": "Ukraine"
    },
    {
        "country_code": "AE",
        "countryid": "784",
        "name": "United Arab Emirates"
    },
    {
        "country_code": "GB",
        "countryid": "826",
        "name": "United Kingdom"
    },
    {
        "country_code": "US",
        "countryid": "840",
        "name": "United States"
    },
    {
        "country_code": "UM",
        "countryid": "581",
        "name": "United States Minor Outlying Islands"
    },
    {
        "country_code": "UY",
        "countryid": "858",
        "name": "Uruguay"
    },
    {
        "country_code": "UZ",
        "countryid": "860",
        "name": "Uzbekistan"
    },
    {
        "country_code": "VU",
        "countryid": "548",
        "name": "Vanuatu"
    },
    {
        "country_code": "VE",
        "countryid": "862",
        "name": "Venezuela"
    },
    {
        "country_code": "VN",
        "countryid": "704",
        "name": "Vietnam"
    },
    {
        "country_code": "VG",
        "countryid": "092",
        "name": "Virgin Islands (British)"
    },
    {
        "country_code": "VI",
        "countryid": "850",
        "name": "Virgin Islands (US)"
    },
    {
        "country_code": "WF",
        "countryid": "876",
        "name": "Wallis and Futuna Islands"
    },
    {
        "country_code": "EH",
        "countryid": "732",
        "name": "Western Sahara"
    },
    {
        "country_code": "YE",
        "countryid": "887",
        "name": "Yemen"
    },
    {
        "country_code": "ZM",
        "countryid": "894",
        "name": "Zambia"
    },
    {
        "country_code": "ZW",
        "countryid": "716",
        "name": "Zimbabwe"
    },
    {
        "country_code": "A1",
        "countryid": "10001",
        "name": "Anonymous Proxy *"
    },
    {
        "country_code": "A2",
        "countryid": "10002",
        "name": "Satellite Provider *"
    },
    {
        "country_code": "O1",
        "countryid": "10003",
        "name": "Other Country *"
    },
    {
        "country_code": "AP",
        "countryid": "10004",
        "name": "Asia\/Pacific Region *"
    },
    {
        "country_code": "EU",
        "countryid": "10005",
        "name": "Europe *"
    }
]



Example Code

PHP

<?php

$headers = array( //set your username and API key here
	'api-key: 44b5498dbcb481a0d00b404c0169af62',
	'api-username: tmm1phrvezsbu'
);
$url = 'http://yourdomain.com'; //set your NATS URL here

$data = array();

$request = Array(
	'method' => 'GET',
	'path' => 'v1/service/countries',
	'data' => $data
);

/*code below is the same for (almost) every API call */

$curl = curl_init();

$url = $url.'/api/'.$request['path'];

$query = http_build_query($request['data']);

if($request['method'] == 'GET'){
	//add query string parameters to the end of the url
	$url = $url.'?'.$query;
}else{
	//send parameters as POST fields
	curl_setopt($curl, CURLOPT_POST, 1);
	curl_setopt($curl, CURLOPT_POSTFIELDS, $query);
	
	if($request['method'] != 'POST'){
		$headers[] ='X-HTTP-Method: '.$request['method']; //send custom request method
	}
}
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);


$resp = curl_exec($curl);
//dumps an associative array representation of the json
var_dump(json_decode($resp, true));
// Close request to clear up some resources
curl_close($curl);
?>