GET: Get Offers By Filters Native

Endpoint Overview

Title: Offers by Filters Native

Description: This endpoint returns a list of offers fully flexible by passing a frontend query string to the endpoint. See info at end of article.

We also return the search_more_url and internal_url parameters so you can map them to the search widget page as get params. There is also the redirect link for directly linking to offers.

HTTP Method

Method: GET

URL Path

ams/offers-by-filters-native

Final URL: https://api.mivodo.com/ams/offers-by-filters-native

Query Parameters

ParameterTypeRequiredDescriptionDefault
offer_typestringYesvehicle-leasing-offers,
vehicle-buy-offers or
vehicle-subscription-offers
limitintNo1-20 limit of offers to return10
filter_stringstringYesCopied filter_string with or without „?“ is not neccessary. Do not copy the full url. See below!
aggregate_by_make_model**stringNofirst_model -> aggregated on firs sub_model
make -> aggregated on brands / Makes
none
first_model

**aggregate_by_make_model is relevant if you want to make sure that you do not see to many similar offers like if you put the widget into a page with electric small cars and price ascending it could be possible that first 3 offers are a „dacia spring“ for 250, 260,270 per month… If you aggregate by first_model or make you will make sure that it will not show any model or make more than once.

Headers

HeaderDescription
Content-Typeapplication/json

Example Request

GET /ams/offers-by-filters-native?offer_type=vehicle-leasing-offers&limit=5&filter_string=?type=vehicle-monthly-offers%26sort=popularity%26customer_groups=privat%26lease_gross_rate=100..%26delivery_time=0..1%26special_conditions=no-conditions%2Cbehinderten-rabatt%26location=Berlin%2C+Deutschland%3B52.51703%2C13.38886%2C50

Response

{
    "message": "OK",
    "data": {
        "search_more_url": "mvd_type=vehicle-leasing-offers&mvd_sort=popularity&mvd_customer_groups=privat&mvd_lease_gross_rate=100..&mvd_delivery_time=0..1&mvd_special_conditions=no-conditions,behinderten-rabatt&mvd_location=Berlin, Deutschland;52.51703,13.38886,50",
        "offers": [
            {
                "name": "Mercedes-Benz C-Klasse",
                "duration": "Laufzeit: 48 Monate",
                "km_per_year": "Kilometer pro Jahr: 10.000 km",
                "delivery_time": "Sofort verfügbar",
                "power": "Leistung: 150 PS / 110 kW | Diesel",
                "fuel_consumption": "Verbrauch: null  / CO2: null g/km",
                "price": "513,19 €",
                "type": "vehicle-leasing-offers",
                "external_url": "https://redirect.mivodo.com?entity_id=ac3c2bb7-a53a-4399-ae46-f231a83a8691&entity_type=vehicle-leasing-offers&subpartner_id=5",
                "internal_url": "mvd_type=vehicle-leasing-offers&mvd_sort=price_asc&mvd_makes_models=mercedes-benz-c-klasse&mvd_fuel=diesel&mvd_featured_id=ac3c2bb7-a53a-4399-ae46-f231a83a8691&mvd_featured_type=vehicle-leasing-offers&mvd_featured_context=share&mvd_subpartner_id=5&mvd_customer_groups=privat"
            }
        ]
    }
}

Status Codes

Status CodeMeaning
200Success, data returned.
400Invalid request parameters.
500Internal server error.

Error Response Example

Example of a 404 error response:

{
    "status_code": 400,
    "timestamp": "2024-09-12T09:43:18.663Z",
    "path": "/ams/offers-by-filters-native",
    "message": [
        "filter_string must be a string"
    ]
}

Copy Filter String from Frontend

Just filter what you want to output at: https://widgets.mivodo.com/widget-suche/

Copy everything behind the ? in the browser url bar. Example:

type=vehicle-monthly-offers&sort=popularity&customer_groups=privat&lease_gross_rate=800..&delivery_time=0..1&special_conditions=no-conditions%2Cbehinderten-rabatt&location=Berlin%2C+Deutschland%3B52.51703%2C13.38886%2C50