getPlaces

get

/ccadmin/v1/places

Get place suggestions for autocomplete clients. Places are cities, regions and countries.

Request

Supported Media Types
Query Parameters
  • This controls which fields are returned in the response body. The default is to return all fields: id, displayName and rank.
  • This is the field to specify the number of records to be fetched per REST call. This number should be small so results fit in an autocomplete suggestions box.
  • This field specifies the SCIM compliant query used to filter places. While not technically required, this endpoint is meant to be used with the q or sw operators like q=displayName sw "san" or id sw "san".
  • This field specifies the sort order of the list to be fetched. We recommend using the rank field, e.g. sort=rank:desc
Header Parameters
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : getPlaces_response
Type: object
Show Source
Nested Schema : items
Type: array
The returned list of items.
Show Source
Nested Schema : sort
Type: array
The sort used for the returned places.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "q":"displayName sw \"san\"",
    "totalResults":-1,
    "offset":0,
    "limit":10,
    "sort":[
        {
            "property":"rank",
            "order":"desc"
        }
    ],
    "items":[
        {
            "country":"Brazil",
            "displayName":"Santa Catarina",
            "rank":6727000,
            "id":"BR-SC",
            "type":"region",
            "region":"Santa Catarina"
        },
        {
            "country":"Chile",
            "displayName":"SANTIAGO",
            "rank":5150000,
            "id":"CL--SANTIAGO",
            "type":"city"
        },
        {
            "country":"Mexico",
            "displayName":"San Luis Potosi",
            "rank":2718000,
            "id":"MX-SLP",
            "type":"region",
            "region":"San Luis Potosi"
        },
        {
            "country":"Mexico",
            "displayName":"San Mart??n Texmelucan",
            "rank":2668000,
            "id":"MX-PUE-SANMARTINTEXMELUCAN",
            "type":"city",
            "region":"Puebla"
        },
        {
            "country":"United States",
            "displayName":"San Antonio (TX)",
            "rank":1470000,
            "id":"US-TX-SANANTONIO",
            "type":"city",
            "region":"Texas"
        },
        {
            "country":"United States",
            "displayName":"San Diego (CA)",
            "rank":1395000,
            "id":"US-CA-SANDIEGO",
            "type":"city",
            "region":"California"
        },
        {
            "country":"United States",
            "displayName":"San Jose (CA)",
            "rank":1027000,
            "id":"US-CA-SANJOSE",
            "type":"city",
            "region":"California"
        },
        {
            "country":"Brazil",
            "displayName":"Santa Ana Dos Remedios",
            "rank":1000000,
            "id":"BR-IS",
            "type":"region",
            "region":"Santa Ana Dos Remedios"
        },
        {
            "country":"Dominican Republic",
            "displayName":"SANTO DOMINGO",
            "rank":965000,
            "id":"DO--SANTODOMINGO",
            "type":"city"
        },
        {
            "country":"United States",
            "displayName":"San Francisco (CA)",
            "rank":865000,
            "id":"US-CA-SANFRANCISCO",
            "type":"city",
            "region":"California"
        }
    ]
}

Default Response

The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |54083|An error occurred accessing places with query {0}.| |85003|Invalid attribute in query: {}| |85000|q query param is not valid SCIM filter format|
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top