# Update vehicle record

`PUT /api/members/vehicle-details/{vehicleId}`

- **Success:** `204 No content`
- **Products:** Operator (`FOH`)
- **Features:** Front of House Generic Access (`FOHGENERIC`)

HTML version: [Update vehicle record](https://support.gladstonesoftware.cloud/reference/members/update-vehicle-record)

## Overview

Changes the registration number held on one vehicle record. A vehicle record links a number plate to a member so that car-park and barrier systems can recognise them on arrival.

The record is addressed by its own id. Take that id from [Get member vehicle details](get-member-vehicle-details.md); it is assigned when the vehicle is added with [Create vehicle record for member](create-vehicle-record-for-member.md). You cannot move a vehicle record to a different member here — only the registration can change.

**Spaces are stripped before the value is stored**, so `AB12 CDE` and `AB12CDE` are the same registration as far as the platform is concerned. A member may hold several vehicles but not the same registration twice; a clash returns `409`.

## Endpoint

`PUT {base_url}/api/members/vehicle-details/{vehicleId}`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `vehicleId` | integer (int32) | Yes | The id of the vehicle record to update, as returned by [Get member vehicle details](get-member-vehicle-details.md). An id that does not exist returns `400`, not `404`. |

## Request body

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `vehicleRegistration` | string | Yes | The new number plate for this record. Maximum 15 characters, measured before spaces are stripped. Required — a missing or empty value is rejected with `A vehicle registration is required in this request`. The format is not otherwise validated, so any string is accepted. The result must stay unique for the member: reusing a registration the same member already has returns `409`. |

## Sample request

```bash title="cURL"
curl -X PUT '{base_url}/api/members/vehicle-details/{vehicleId}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true' \
  -H 'Content-Type: application/json' \
  -d '{
  "vehicleRegistration": "AB12CDE"
}'
```

## Sample response

```json title="204 No content"
"string"
```

## Errors

A successful call returns `204 No Content` with an empty body.

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | No vehicle record exists with that `vehicleId`: `The vehicle id does not exist` |
| `400` | Bad request | `vehicleRegistration` is missing, or longer than 15 characters: `The vehicle registration cannot be more than 15 characters`. Returned as a model-state object rather than a plain string. |
| `409` | Conflict | The member already has another vehicle record with this registration: `The vehicle registration already exists against the member` |
| `500` | Internal server error | An unexpected server-side failure occurred. No detail is returned in the body. |
