Skip to main content
PATCH
/
api
/
vehicles
/
{id}
/
offers
Update Vehicle Offers
curl --request PATCH \
  --url https://api.example.com/api/vehicles/{id}/offers \
  --header 'Content-Type: application/json' \
  --data '
{
  "offers": "<string>"
}
'

Request

id
Long
required
The unique identifier of the vehicle

Request Body

offers
string
required
The promotional offer text to set for the vehicle

Response

Returns 200 OK on success.

Example

curl -X PATCH "http://localhost:8080/api/vehicles/1/offers" \
  -H "Content-Type: application/json" \
  -d '{
    "offers": "20% off for weekend rentals"
  }'

Request Example

{
  "offers": "Free upgrade on 7+ day rentals"
}

Response

200 OK
This is a PATCH endpoint that only updates the offers field. Other vehicle fields remain unchanged.

Use Cases

  • Setting promotional offers for specific vehicles
  • Updating seasonal discounts
  • Clearing offers by setting to empty string or null
  • Managing special pricing campaigns
To retrieve all vehicles with active offers, use the GET /api/vehicles/offers endpoint.

Build docs developers (and LLMs) love