County Resource
County Resource
Below we have listed the operations, HTTP verbs and an example URL for the County resource within the Surpass API.
Operation | HTTP Verb | Example URL |
---|---|---|
List | GET | https://...surpass.com/api/v2/County |
Filter | GET | https://...surpass.com/api/v2/County?$filter=contains(name, 'West') |
Read (Individual by ID) | GET | https://...surpass.com/api/v2/County/{id} |
Attributes for the County Resource
In the table below we have provided all of the attributes included in the County Resource. This includes: the attribute name, data type, description, if the attribute is available to filter when requesting the GET method, any available operators and unique identifiers.
Attribute Name | Type | Description | Filter (GET) | Available Operators | Unique Identifier |
---|---|---|---|---|---|
id | int | The unique identifier for the county. This is required when adding a county for other resources. | X | X | |
href | string | The link to call the individual County resource. | |||
name | string | The name of the county in Surpass. | X | eq, contains |
- If filtering on 'name' the values are case sensitive
The GET County 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 County 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)