Get the category details for a category ID.
The /categories/{category
request returns all the groups to which the category belongs. You must supply a category ID
to use this request.
Note: Query parameters are case-sensitive.
Query parameters
Name | Type | Required | Default value | Description |
---|---|---|---|---|
|
| Determines whether icons are returned and the type of icon to use with a place or category. | ||
|
| Optional case-sensitive parameter to specify the preferred language to | ||
|
| The requested response format - either | ||
|
| The authentication token, created from an ArcGIS Location Platform account, with the |
icon
Determines whether icons are returned and the type of icon to use with a place or category.
Use this parameter to define the type of icon URL for a given place or category. Place icons are available in the following formats:
svg
cim
(Cartographic Information Model)png
48 x 48 pixels
The SVG and CIM symbols default to 15 x 15 pixels but can be scaled smoothly for display in larger UI elements or to emphasize these features on a map. The PNG icons are provided as 48 x 48 pixels but for map display the recommended size is 16 x 16 pixels.
The default is none
(no icon URL will be returned).
- Default
- none
Enumerated values
language
Optional case-sensitive parameter to specify the preferred language to use for category names.
This query parameter uses language codes to specify the preferred language. If not set, or if no translation is available, the default behavior is to return category names in English.
The language codes use the CLDR (Common Locale Data Repository) format string that uses a two letter language code (e.g. "fr" for French) optionally followed by a two letter country code (e.g. "fr-CA" for French in Canada).
If an unsupported language code is used, then the service will attempt
to fall-back to the closest available language. This is done by
stripping regional and extension subtags to find a known language code.
For example, French Canadian (fr-
) is unsupported so this falls back
to French fr
.
Should the fallback fail, then the service will return category names in
the default language en
for English.
Language codes:
- English, default US -
en
- French -
fr
- German -
de
- Japanese -
ja
- Portuguese, default Brazil -
pt
- Spanish -
es
- Default
- en
Enumerated values
f
The requested response format - either json
or pjson
(pretty json).
- Default
- json
Enumerated values
token
The authentication token, created from an ArcGIS Location Platform account, with the premium
privilege, used to access the Places service.
The token
parameter can be either an API Key or short-lived token. See
ArcGIS security
documentation
for more information on authenticating with a token or API key.
Alternatively, you can supply a token in the request header with one of the following keys using the "Bearer" scheme:
Authorization
: Bearer <YOUR _TOKEN > X-
Esri- Authorization : Bearer <YOUR _TOKEN >
Path parameters
Name | Type | Required | Default value | Description |
---|---|---|---|---|
| The ID of the category that you want to fetch details for. |
categoryId
The ID of the category that you want to fetch details for.
For example, using a category ID of 13035
would fetch details about
the "Coffee Shop" category.
Examples
Request
# You can also use wget
curl -X GET https://places-api.arcgis.com/arcgis/rest/services/places-service/v1/categories/{categoryId} \
-H 'Accept: application/json'
Response
200 Response
{
"categoryId": "17119",
"fullLabel": [
[
"Retail",
"Sporting Goods Retail",
"Bicycle Store"
]
],
"parents": [
[
"17117"
]
],
"icon": {
"url": "https://static.arcgis.com/icons/places/Default_Shop_or_Service_15.svg"
}
}
Status | Meaning | Description | Schema |
---|---|---|---|
| A successful request to return details for a single category. | ||
| Invalid query parameters. | ||
| Authentication Error. The API key or token is missing, invalid or expired. | ||
| The required parameter 'token' is valid but does not have permission to access the service. | ||
| A resource with the supplied Id was not found. | ||
| Unknown | An error occurred on the server. |