# Service category

`GET https://bemap.benomad.com/bgis/service/evsmartrouting/servicecategory/autocomplete/1.0`

Part of [EV smart routing](https://benomad.com/dev/doc/bemap-api/electric-mobility/ev-smart-routing.md).

> **Find a category of place by name.** The categories of places, such as restaurants or hotels, whose name matches what the user types, to plan stops near the services a driver wants.

Returns the list of service category (class ID) matching the input.

Requires the EV smart routing option (Allow to compute a trip for a electric vehicle); without it BeMap answers `400 Access Denied`.

## Query parameters

- `filter` (string, required, in query)

## Response

`200`, schema `TextAutocompleteResponse`.

- `suggestions` (string[]): Autocomplete suggestions.

## Errors

- `400`: Bad Request
- `302`: no credentials were sent. Do not follow the redirect.
- `401`: the account or the API key is wrong.

How to read each one: [Errors](https://benomad.com/dev/doc/bemap-api/getting-started/errors.md).

## Example

```bash
curl -X GET 'https://bemap.benomad.com/bgis/service/evsmartrouting/servicecategory/autocomplete/1.0?filter=rest' \
  -u 'YOUR_ACCOUNT:YOUR_API_KEY' \
  --fail-with-body
```

Response captured from production, long arrays and strings shortened:

```json
{
  "suggestions": [
    "COMPLEX_RESTRICTION",
    "RESTRICTION"
  ]
}
```
