# Autodoc Product Related ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/autodoc/product/related` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 2 credits per call | | **Documentation** | https://www.piloterr.com/library/autodoc-product-related | ## Description Vehicle fitment lines per maker for an Autodoc product. All parameters from Product `fetch.params` are required. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.piloterr.com/register ## Example Request ```bash curl --location --request GET 'https://api.piloterr.com/v2/autodoc/product/related' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### RENAULT models for RIDEX 7999541 (auto-doc.fr) ```json { "models": [ "RENAULT Rapid (F40, G40) (Année de construction 07.1985 - 11.2001)", "RENAULT Clio I 3/5 portes (Année de construction 05.1990 - 09.1998)", "RENAULT Twingo I 3 portes (Année de construction 03.1993 - 10.2012)", "RENAULT R5 3/5 portes (Année de construction 01.1972 - 12.1985)", "RENAULT Super 5 3/5 portes (B40, C40) (Année de construction 10.1984 - 12.1996)", "RENAULT Clio I Van (Année de construction 01.1991 - 09.1998)", "RENAULT Super 5 Van (S40) (Année de construction 10.1984 - 12.1996)", "RENAULT Twingo I Van (Année de construction 03.1993 - 06.2012)" ], "maker_id": 93, "vehicles": [ { "raw": "RENAULT Rapid (F40, G40) (Année de construction 07.1985 - 11.2001)", "brand": "RENAULT", "model": "Rapid (F40, G40) (Année de construction 07.1985 - 11.2001)", "end_date": "11.2001", "model_id": 17, "start_date": "07.1985" }, { "raw": "RENAULT Clio I 3/5 portes (Année de construction 05.1990 - 09.1998)", "brand": "RENAULT", "model": "Clio I 3/5 portes (Année de construction 05.1990 - 09.1998)", "end_date": "09.1998", "model_id": 21, "start_date": "05.1990" }, { "raw": "RENAULT Twingo I 3 portes (Année de construction 03.1993 - 10.2012)", "brand": "RENAULT", "model": "Twingo I 3 portes (Année de construction 03.1993 - 10.2012)", "end_date": "10.2012", "model_id": 472, "start_date": "03.1993" }, { "raw": "RENAULT R5 3/5 portes (Année de construction 01.1972 - 12.1985)", "brand": "RENAULT", "model": "R5 3/5 portes (Année de construction 01.1972 - 12.1985)", "end_date": "12.1985", "model_id": 556, "start_date": "01.1972" }, { "raw": "RENAULT Super 5 3/5 portes (B40, C40) (Année de construction 10.1984 - 12.1996)", "brand": "RENAULT", "model": "Super 5 3/5 portes (B40, C40) (Année de construction 10.1984 - 12.1996)", "end_date": "12.1996", "model_id": 560, "start_date": "10.1984" }, { "raw": "RENAULT Clio I Van (Année de construction 01.1991 - 09.1998)", "brand": "RENAULT", "model": "Clio I Van (Année de construction 01.1991 - 09.1998)", "end_date": "09.1998", "model_id": 4218, "start_date": "01.1991" }, { "raw": "RENAULT Super 5 Van (S40) (Année de construction 10.1984 - 12.1996)", "brand": "RENAULT", "model": "Super 5 Van (S40) (Année de construction 10.1984 - 12.1996)", "end_date": "12.1996", "model_id": 4219, "start_date": "10.1984" }, { "raw": "RENAULT Twingo I Van (Année de construction 03.1993 - 06.2012)", "brand": "RENAULT", "model": "Twingo I Van (Année de construction 03.1993 - 06.2012)", "end_date": "06.2012", "model_id": 4227, "start_date": "03.1993" } ], "product_id": 7999541, "product_url": "https://www.auto-doc.fr/ridex/7999541", "vehicle_type": "pkw" } ``` ## Documentation ## Overview Returns **compatible vehicle model lines** for one maker on an Autodoc product, by calling Autodoc's internal `related-auto` endpoint (one browser job per request). Use **after** the Product endpoint: `compatibility.cars` / `compatibility.trucks` list makers; copy **all** fields from each row's `fetch.params`. ## Workflow 1. Call **Product** with the product page URL → `product_url`, `product_id`, `compatibility.cars` / `compatibility.trucks`. 2. For each maker, call **Related** with **every** parameter from `fetch.params`: `query`, `maker_id`, `vehicle_type`, `maker_name`, and `product_id`. ## Quickstart ``` POST https://api.piloterr.com/v2/autodoc/product/related Content-Type: application/json { "query": "https://www.auto-doc.fr/ridex/7999541", "maker_id": 93, "vehicle_type": "pkw", "maker_name": "RENAULT", "product_id": 7999541 } ``` ## Parameters | Parameter | Type | Required | Description | |---|---|---|---| | `query` | string | yes | Autodoc product page URL (same as Product) | | `maker_id` | integer | yes | Maker id from `compatibility.*[].maker_id` | | `vehicle_type` | string | yes | `pkw` (passenger cars) or `lkw` (commercial trucks) | | `maker_name` | string | yes | Maker label from compatibility (e.g. `RENAULT`) | | `product_id` | integer | yes | Article id from Product response or URL path | All five parameters are **required**. Omitting any field may return **400** or incomplete vehicle lines. ## Response fields | Field | Type | Description | |---|---|---| | `product_url` | string | Canonical product URL echoed back | | `product_id` | integer | Article id | | `maker_id` | integer | Maker id requested | | `vehicle_type` | string | `pkw` or `lkw` | | `models` | array | Raw display strings per compatible model line | | `vehicles` | array | Parsed entries (see below) | | `vehicles[].raw` | string | Full line text | | `vehicles[].brand` | string | Maker prefix | | `vehicles[].model` | string | Model / rest of line | | `vehicles[].start_date` | string \| null | `MM.YYYY` when parsed | | `vehicles[].end_date` | string \| null | `MM.YYYY` when parsed | | `vehicles[].model_id` | integer | Autodoc model id when present | ## Notes - One **credit / browser job** per call; repeat per maker if needed. - Always pass the exact `fetch.params` block from Product compatibility rows. - `start_date` / `end_date` may be `null` when the source uses open ranges. ## Main use cases - Expand Product compatibility from maker-level to full vehicle model lines - Feed PIM or garage tools with TecDoc-style fitment data