Country Resource

In Surpass certain resources can be assigned countries and counties, an example being the Centre resource. The request model expects an ID for this and due to the large number of countries and counties available the Surpass API provides two separate resources to get this information rather than documenting the individual ids and descriptions. This effectively acts as a lookup table that can be used within someone's integration process or used once during setup to gather and store required ids. Surpass will not actively change these values so both methods will work in your end to end integration with Surpass.  

Country Resource

Below we have listed the operations, HTTP verbs and an example URL for the Country resource within the Surpass API.
Operation HTTP Verb Example URL
List GET
Filter GET$filter=contains(name, 'Eng')
Read (Individual by ID) GET{id}

Attributes for the Country Resource

In the table below we have provided all of the attributes included in the Country Resource. This includes: the attribute name, data type, description, if the attribute is orderable when requesting the GET method and if the attribute is available to filter when requesting the GET method.
Attribute Name Type Description Filter (GET) Available Operators Unique Identifier
id int The unique identifier for the country. This is required when adding a country for other resources. X
href string The link to call the individual Country resource.
name string The name of the country in Surpass.  X eq, contains
counties resource A collection of counties that relate to the country specified in the request.

GET Request and Return

The GET Country resource can be called directly by browsing to the URL. Any required parameters such as $filter, $orderBy, $skip and $top would need to form part of the URL that is sent. Below we have provided examples of JSON and XML responses that would be returned from the Surpass API when requesting the GET method for the Country resource. It is important to remember that the return information will be included within the response object that forms part of the standard GET response; this is detailed in the page "Understanding the Surpass API".

Example GET request & response (JSON)
Example GET request & response (XML)

Feedback and Knowledge Base