# Vehicle pictures

`GET https://bemap.benomad.com/bgis/service/vehicle/picture/1.0/getall`

Part of [Electric vehicle database](https://benomad.com/dev/doc/bemap-api/electric-mobility/ev-vehicles.md).

> **Get the pictures of a vehicle.** Every picture available for a vehicle model.

Returns a list of available pictures of the vehicle.

Requires the Vehicle option (Allow to get the information of vehicle); without it BeMap answers `400 Access Denied`.

## Query parameters

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

## Response

`200`, schema `VehiclePictureDescription[]`.

An array of `VehiclePictureDescription`, each with:

- `vehicleUuidKey` (string, required): Unique key identifier of vehicle.
- `view` (enum, required): View of the picture.
  - `FRONT`: Front View of the vehicle's picture.
  - `REAR`: Rear View of the vehicle's picture.
  - `SIDE`: Side View of the vehicle's picture.
  - `PERSPECTIVE`: Perspective View of the vehicle's picture.
  - `UP`: Up View of the vehicle's picture.
  - `NOT_SUPPORTED_VALUE`: Not supported value for this API version.
- `pictureFileFormat` (enum, required): Image file format of the vehicle photo.
  - `PNG`: PNG 8 bit format: Indexed color (8 bits per pixel).
  - `PNG24`: PNG 24 bit format: RGB + alpha channel (32 bits per pixel).
  - `GIF`: GIF format: Indexed color (8 bits per pixel).
  - `JPEG`: JPEG format: RGB (24 bits per pixel).
  - `NOT_SUPPORTED_VALUE`: Not supported value for this API version.
- `picture` (base64 string, required): Photo of the vehicle.

## 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/vehicle/picture/1.0/getall?vehicleUuidKey=3043cf1b-e35f-447e-91d2-f4cd1a6dfa69' \
  -u 'YOUR_ACCOUNT:YOUR_API_KEY' \
  --fail-with-body
```

Response captured from production, long arrays and strings shortened:

```json
[
  {
    "vehicleUuidKey": "3043cf1b-e35f-447e-91d2-f4cd1a6dfa69",
    "view": "PERSPECTIVE",
    "pictureFileFormat": "PNG",
    "picture": "iVBORw0KGgoAAAANSUhEUgAAAgAAAAFuCAYAAAD3bqBNAACAAElEQVR42uy9B7RV1dX3zRjfO97vfb/nSaIC0tvlwqX33nvv"
  }
]
```

## Reference pages

- [Vehicle pictures](https://benomad.com/dev/doc/bemap-api/guides/services/vehiclepicture-getall.md)
