---
title: "Get prefill data for new listing from vehicle"
method: GET
path: "/api/listings/by-vehicle/prefill/{vehicle_id}"
tags: ["Listings - Admin"]
---

# Get prefill data for new listing from vehicle

`GET /api/listings/by-vehicle/prefill/{vehicle_id}`

## Request

- Base URL: `https://api.multigest.pt` (the document declares no server; this is the origin it was published from)
- URL: `https://api.multigest.pt/api/listings/by-vehicle/prefill/{vehicle_id}`
- Auth: API key in header `x-api-token` and API key in header `x-origin-verify`

Get pre-fill data for creating a new listing from an existing vehicle.

Maps Viatura table fields to ViaturasEasyDataGreen format so the frontend
can pre-populate the listing creation form.

Args:
    vehicle_id: Viatura.ID

Returns:
    Dict with ViaturasEasyDataGreen field names populated from Viatura data

## Path parameters

- `vehicle_id` integer, required

## Headers

- `x-api-token` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/multigest/apis/multigest-protected-api.md) - [All operations](https://skmtc.dev/multigest/apis/multigest-protected-api/llms.txt) - [OpenAPI document](https://skmtc.dev/multigest/apis/multigest-protected-api/revisions/75574126948d?raw)
