Country Resource
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 | https://...surpass.com/api/v2/Country |
Filter | GET | https://...surpass.com/api/v2/Country?$filter=contains(name, 'Eng') |
Read (Individual by ID) | GET | https://...surpass.com/api/v2/Country/{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 | 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)