List Cities


                https://api.ocamba.com/v2/ocamba/cities
            

Returns a list of Cities


Name
Description
fieldsstring
The client can request more efficient filtered representation of the resource showing only specific field(s), using the “fields” query parameter. Note that the “fields” parameter has precedence over the “view” parameter.

Example GET /v2/ocamba/RESOURCE_NAME?fields=id,name

See "Tips" for the list of filterable parameters.


Example: fields=field1,field2,field3

pagestring
The page number indicates which set of items will be returned in the response. The format of request is "page=N,M" where 'N' (required) represents page number and 'M' (optional) is number of items per page.

Examples:
N=1, M=20 → returns page 1 with 20 items
N=2, M=20 → returns page 2 with 20 items (items 21-40)
N=3 → returns page 3. The number of objects returned depends on the resource settings.


Example: page=1,10

sortstring
Sorts the response by specified field(s) with the option to specify sorting order (ascending by default, add prefix "-" for descending).

Examples:
GET /v2/ocamba/RESOURCE_NAME?sort=name → sorts per name, ascending
GET /v2/ocamba/RESOURCE_NAME?sort=-id → sorts per id descending
GET /v2/ocamba/RESOURCE_NAME?sort=id,-name → sorts per id ascending, then name descending

See tips for the list of sortable fields.


Example: sort=-field1,filed2

q_fieldsstring
Use the q_fields parameter to list all fields you want to include in the search using q parameter. Note that not all fields are searchable on a specific object. If parameter q_fields is not specified, search is performed on a default search field.

Examples:
GET /v2/ocamba/members?q=sou&q_fields=lname → API retuns members whose lname contains string 'sou'.
GET /v2/ocamba/members?q=sou&q_fields=fname,lname,email → API returns members that contain string 'sou' in any of the specified fields.

See tips for the list of searchable parameters.


qstring
Set the q parameter value to search for a keyword or search term.

Example:
GET /v2/ocamba/members?q=sou → returns members that contain string 'sou'

See tips for the list of searchable parameters.

namestring
The name of the city.

idstring
Unique id of the city

regionstring
The name of the region to which the city belongs. Example - British Columbia


Example: region=British Columbia

country_codestring
The two-letter, uppercase ISO Code of the country to which the city belongs. Example - CA.


Example: country_code=CA

full_namestring
Full address


Example: 100 Mile House, British Columbia, CA

200 - OK
Arrow
Name
Description
items[ city ]
An array of all created items.
City
Name
Description
country_codestring
Two-letter, uppercase country code which is city located.


Example: CA

full_namestring
Full name.


Example: 100 Mile House, British Columbia, CA

idstring
A unique identifier generated by the Ocamba platform.


Example: 5881639

namestring
City name.


Example: 100 Mile House

regionstring
The region name which is city located.


Example: British Columbia

totalinteger
A total number of items.


Example: 168596
tip
1 Searchable fields are: name, region and full_name.

2 Sortable fields are: id, region, country_code name and full_name.
200 Arrow
{
    "total": 168596,
    "items": [
        {
            "id": "5881639",
            "name": "100 Mile House",
            "region": "British Columbia",
            "country_code": "CA",
            "full_name": "100 Mile House, British Columbia, CA"
        },
        {
            "id": "3504833",
            "name": "12 de Haina",
            "region": "Nacional",
            "country_code": "DO",
            "full_name": "12 de Haina, Nacional, DO"
        },
        {
            "id": "8556282",
            "name": "150 Mile House",
            "region": "British Columbia",
            "country_code": "CA",
            "full_name": "150 Mile House, British Columbia, CA"
        }
    ]
}
{
  "total": 168596,
  "items": [
    {
      "id": "5881639",
      "country_code": "CA",
      "region": "British Columbia",
      "name": "100 Mile House",
      "full_name": "100 Mile House, British Columbia, CA"
    }
  ]
}