Documentation / API / Operations on Countries

GET and COUNT operations available on countries.

Countries Operations

GET

URL

POST https://your-secured-store-url:443/api/v1/geo/countries/get

Filters

Filter Type
id Array of GUID
code Array of String (max 255 chars)
name Array of String (max 255 chars)
defaultcurrencycode Array of String (max 255 chars)

Request

Retrieve all the items (max 1000)

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        }
    }

Retrieve specific items by ID

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        },
        'filters' : {
            'id' : ['00000000-0000-0000-0000-000000000000', '12345678-1234-1234-1234-123456781234']
        }
    }

Most complete request (just to give you the format of each parameter)

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        },
        'filters' : {
            'id' : ['00000000-0000-0000-0000-000000000000', '12345678-1234-1234-1234-123456781234'],
		    'code' : ['CA','US'],
		    'name' : ['Canada','United States'],
		    'defaultcurrencycode' : ['CAD','USD']
	    },
        'pagination' : {
            'pageNumber' : '1',
            'pageSize' : '1000'
        }
    }

Response

If no error occured, you will receive a response like this one (object type: Country). Please refer to error messages to learn more about the possible error responses.

[
   {
      "id": "4e713edd-a030-433c-86ce-fbeb9af7e6c7",
      "code": "US",
      "name": "United States",
      "defaultcurrencycode": "USD"
   },
   {
      "id": "75b36fa9-4eb5-4a2f-8bd2-2baafd81cfe9",
      "code": "CA",
      "name": "Canada",
      "defaultcurrencycode": "CAD"
   }
]

COUNT

URL

POST https://your-secured-store-url:443/api/v1/geo/countries/count

Filters

Filter Type
id Array of GUID
code Array of String (max 255 chars)
name Array of String (max 255 chars)
defaultcurrencycode Array of String (max 255 chars)

Request

Count the items

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        }
    }

Count specific items by currency code

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        },
        'filters' : {
            'defaultcurrencycode' : ['USD']
        }
    }

Most complete request (just to give you the format of each parameter)

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        },
        'filters' : {
            'id' : ['00000000-0000-0000-0000-000000000000', '12345678-1234-1234-1234-123456781234'],
		    'code' : ['CA','US'],
		    'name' : ['Canada','United States'],
		    'defaultcurrencycode' : ['CAD','USD']
	    }
    }

Response

If no error occured, you will receive a response like this one. Please refer to error messages to learn more about the possible error responses.

{
   "count": "242"
}