Flow watchlist integration

Create watchlists from your own systems and fetch their matches through the EuroStocks Flow API: saved searches that alert your team when a matching car comes in.

Prerequisites
  • A Flow service account from EuroStocks with the watchlist module, on a seat of your merchant (get access).
  • Your receivers (email addresses, Google Chat spaces), set up by your merchant's owner in the Flow console.
  • Your own back end, in any language: the API is reachable server-to-server only.

1. How watchlists work

  • A watchlist is a saved search of your merchant: criteria that all have to hold. Flow checks every new and every changed ad against it.
  • Each car alerts once per watchlist, at the moment it starts to match: a newly listed car, or an existing car that changes into the criteria. One car posts one message per watchlist and per linked receiver.
  • Saving does not alert. Creating a watchlist, or changing its criteria, fills its match list with the cars in stock right now, silently: no burst of messages for what was already there.
  • enabled: false pauses delivery only. A paused watchlist keeps matching (its match list and counters stay current), but it sends nothing and writes nothing to the feed. Switching it back on sends no backlog.
  • Receivers belong to your merchant. The owner manages them in the Flow console; your integration links them to a watchlist by id.

Managing receivers, test sends, the shortlist of saved cars and following a dealer are console features: this guide does not cover them.

2. Authentication

Authentication is the same as for the storefront API (storefront guide, Authentication): a service account, an OAuth2 client_credentials token, cached in your back end.

BASH
curl -s https://auth.eurostocks.com/application/o/token/ \
  -d grant_type=client_credentials \
  -d client_id="$FLOW_CLIENT_ID" \
  -d username="$FLOW_USERNAME" \
  -d password="$FLOW_APP_PASSWORD" \
  -d scope="openid memberships"

This is Authentik's service-account flavour of client_credentials: it deliberately uses username + password instead of the standard client_id + client_secret pair. Do not "fix" it to the standard form: authentication then fails.

  • Send the token as Authorization: Bearer <token>. Reuse it until ~30 seconds before expires_in runs out; on an unexpected 401, request a fresh token once and retry once.
  • Seat: a member seat can do everything on this page. An owner seat works the same; only the owner can also manage receivers, in the console.
  • Module: the watchlist module is separate from storefront search. Without it, these endpoints answer 403 MODULE_FORBIDDEN.
  • The service account belongs to exactly one merchant and Flow derives it: never send a merchant parameter.

3. The API surface

Every path is under /api/v1.

Endpoint Purpose
GET /api/v1/watchlists/attributes The form vocabulary: criteria, sections, labels, code tables (§4)
GET /api/v1/watchlists/options Makes, and the models of one make, from live stock (§4)
POST /api/v1/watchlists/estimate How many cars a set of criteria matched last week (§5)
GET /api/v1/watchlists Your merchant's watchlists (§6)
POST /api/v1/watchlists Create a watchlist
PUT /api/v1/watchlists/{id} Update a watchlist
DELETE /api/v1/watchlists/{id} Delete a watchlist
GET /api/v1/recipients/options Your merchant's receivers: id, name and channel only
GET /api/v1/matches The cars your watchlists match now (§7)
GET /api/v1/vehicles/{mobileAdId} Everything about one car, dealer and price build-up included
GET /api/v1/notifications The feed of new matches (§8)

Typed client: GET /api/v1/openapi.json serves the OpenAPI 3.1 document with every operation typed. The operations above carry the tag watchlist; that tag also holds console features, so generate only these.

4. Build the form from the vocabulary

GET /api/v1/watchlists/attributes describes the whole criteria form. Build your form from it, not from hardcoded lists:

  • version — check for "v1".
  • groups — the five sections, in display order, with group / group_nl.
  • attributes — one row per form control. criteria names the key(s) the control writes; filter.kind picks the control (lookup, band, max, scaled_int, text, choice, enum, bool, tri_state, range); values holds the codes with their English and Dutch labels. Skip the seller row (following a dealer is a console feature) and any kind you do not know.
  • required: true — the six mandatory controls: make, model, registration year from, transmission, fuel and body type. Everything else narrows the search.
  • response_only — the labels for the vehicle detail (§7).

The response has an ETag: fetch it once, keep it and revalidate with If-None-Match. A row (shortened):

JSON
{
  "field": "fuels", "group": "Basic Data", "group_nl": "Basisgegevens",
  "label": "Fuel", "label_nl": "Brandstof",
  "criteria": ["fuels"], "required": true, "filter": { "kind": "enum" },
  "values": [
    { "code": "PETROL", "label": "Petrol", "label_nl": "Benzine" },
    { "code": "DIESEL", "label": "Diesel", "label_nl": "Diesel" }
  ]
}

Make and model come from live stock: GET /api/v1/watchlists/options answers {makes}, and with ?make= the models of that make:

BASH
curl -s "https://flow-api.eurostocks.com/api/v1/watchlists/options?make=BMW" \
  -H "Authorization: Bearer $FLOW_TOKEN"
JSON
{ "models": ["116", "118", "120", "530", "X5"] }

Criteria are strict: a key that is not in the vocabulary is a 400. final_price_min / final_price_max are your own selling price in whole euros, your margin included.

5. Estimate before you save

POST /api/v1/watchlists/estimate counts how many cars a set of criteria matched last week, so the user sees how busy a watchlist will be before saving it. Every criteria key is optional here; {} is the whole stock.

BASH
curl -s https://flow-api.eurostocks.com/api/v1/watchlists/estimate \
  -H "Authorization: Bearer $FLOW_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"make": "BMW", "model": "530", "fuels": ["DIESEL"]}'
JSON
{
  "perWeek": 63, "windowDays": 7,
  "windowStart": "2026-11-01T23:00:00.000Z", "windowEnd": "2026-11-08T23:00:00.000Z",
  "matchedInWindow": 63, "inStock": 442, "suppressionCapPerHour": 30
}
  • perWeek — the cars listed in the previous calendar week (Monday–Sunday, Amsterdam time, between windowStart and windowEnd) that match, including cars that are gone since. Show it as "last week: 63", not as a live rate. It is a lower bound.
  • inStock — the matching cars in stock right now.
  • suppressionCapPerHour — the most messages one watchlist sends one receiver per hour; cars above it are not pushed (they still appear in the match list). Warn when perWeek comes close.
  • Wait until the user stops typing before you ask (debounce), and fetch the {} baseline once per form.

6. Create, update, delete

The body of a save is {name, enabled?, criteria, recipient_ids?}: name 1–120 characters, criteria the keys of the vocabulary.

BASH
curl -s https://flow-api.eurostocks.com/api/v1/watchlists \
  -H "Authorization: Bearer $FLOW_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "BMW 530d saloon from 2021",
       "criteria": {"make": "BMW", "model": "530", "first_reg_year_from": 2021,
                    "transmissions": ["AUTOMATIC_GEAR"], "fuels": ["DIESEL"], "categories": ["Limousine"]}}'

The answer is 201 with the watchlist (shortened):

JSON
{
  "watchlist": {
    "id": "35a100e9-137e-4251-bf6c-75fd647ca41b",
    "name": "BMW 530d saloon from 2021",
    "enabled": true,
    "criteria": { "make": "BMW", "model": "530", "first_reg_year_from": 2021,
                  "transmissions": ["AUTOMATIC_GEAR"], "fuels": ["DIESEL"], "categories": ["Limousine"],
                  "phev": "any", "vat_deductible_only": false },
    "match_count": 0, "last_matched_at": null, "in_stock": 47,
    "recipients": [
      { "id": "796c10a9-d7c1-40c4-adf8-bce7256de119", "name": "Purchasing desk", "channel": "email",
        "enabled": true, "watchlist_default": true }
    ]
  }
}

Receivers and pause — what you send and what happens:

  • Create (POST):

    • no recipient_ids → the owner's enabled default receivers are linked (at most 32, in name order);
    • [] → no receivers; a list of ids → exactly these;
    • no enabled → true.
  • Update (PUT):

    • no recipient_ids → the linked receivers stay; no enabled → the stored value stays;
    • [] → all receivers unlinked; a list of ids → exactly these: the whole new set.
  • null for either is a 400.

  • So an integration needs no receiver ids at all: leave recipient_ids out and the owner's defaults apply. To offer another set, read GET /api/v1/recipients/options ({recipients: [{id, name, channel, enabled, watchlist_default, …}]}, never an address or webhook).

  • A list holds unique ids of enabled receivers of your merchant, at most 32. On PUT, a receiver that is already linked may stay even while the owner has paused it: to keep the current set, re-send the ids of the watchlist's recipients.

  • Because an update leaves recipient_ids and enabled alone when you do not send them, saving criteria from your integration never undoes the owner's console settings or pause.

Update — PUT replaces name and criteria, so send both in full:

BASH
curl -s -X PUT "https://flow-api.eurostocks.com/api/v1/watchlists/$WATCHLIST_ID" \
  -H "Authorization: Bearer $FLOW_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "BMW 530d saloon from 2021",
       "criteria": {"make": "BMW", "model": "530", "first_reg_year_from": 2021, "mileage_max": 60000,
                    "transmissions": ["AUTOMATIC_GEAR"], "fuels": ["DIESEL"], "categories": ["Limousine"]}}'

A change of criteria resets match_count and last_matched_at and refills the match list, again without alerts. A car that falls outside the new criteria can alert again if it comes back in later. Changing only the name, enabled or the receivers resets nothing.

List and delete:

BASH
curl -s https://flow-api.eurostocks.com/api/v1/watchlists \
  -H "Authorization: Bearer $FLOW_TOKEN"
BASH
curl -s -X DELETE "https://flow-api.eurostocks.com/api/v1/watchlists/$WATCHLIST_ID" \
  -H "Authorization: Bearer $FLOW_TOKEN"
  • The list answers {watchlists}, newest first. Each watchlist carries:
    • match_count / last_matched_at — the alerts since the last change of criteria;
    • in_stock — the cars that match right now;
    • recipients — the linked receivers.
  • A delete answers {deleted: true} and removes the watchlist's cars from the match list.
  • An id that is not one of your watchlists answers 404 {error: "watchlist not found"}.

7. Matches and vehicle detail

GET /api/v1/matches is the current match set of your merchant: one row per car, with the watchlists that match it in items. It is not a history. A call and its response (shortened):

BASH
curl -s "https://flow-api.eurostocks.com/api/v1/matches?watchlist=$WATCHLIST_ID&sort=price" \
  -H "Authorization: Bearer $FLOW_TOKEN"
JSON
{
  "matches": [
    {
      "mobile_ad_id": "474944",
      "vehicle": { "make": "OPEL", "model": "Astra", "modelDescription": "Astra 1.4 Edition", "year": 2013,
                   "mileage": 85000, "fuel": "PETROL", "transmission": "MANUAL_GEAR", "finalPrice": 32154,
                   "vatReclaimable": true, "deleteReason": null },
      "image": "https://img.classistatic.de/api/v1/mo-prod/images/…",
      "match_status": "matching",
      "first_matched_at": "2026-09-10T07:46:38.966Z", "last_matched_at": "2026-09-10T07:46:38.966Z",
      "items": [{ "id": "bcaac423-5ac1-4dba-9c26-34f0e8c3b417", "name": "Astra mock", "enabled": true,
                  "match_status": "matching" }]
    }
  ],
  "total": 1, "limit": 50, "offset": 0, "truncated": false, "price_basis": "nl"
}
  • Parameters (all optional; a wrong value falls back to the default):
    • status — matching (default) or all, which adds cars that no longer match (unmatched) or are no longer listed (gone);
    • watchlist — one watchlist id; status then follows that watchlist, so the default total equals its in_stock;
    • sort — matched_at (default), price, mileage, year, created, modified, and dir (asc / desc);
    • limit (1–200, default 50) and offset.
  • total is exact, so "1–50 of 320" takes one call. truncated is always false.
  • vehicle.finalPrice is your selling price on your VAT basis (price_basis: de, nl or be); year is the first-registration year. Take the labels of fuel and transmission from the vocabulary.
  • image is the first photo's base address: add a size, e.g. ?rule=mo-200.jpg. It is null for a gone car: never request its photo.

GET /api/v1/vehicles/{mobileAdId} returns everything about one car: any car in stock, plus a gone car that is still in your match set. Anything else is 404 VEHICLE_NOT_FOUND. The response (shortened):

BASH
curl -s "https://flow-api.eurostocks.com/api/v1/vehicles/$MOBILE_AD_ID" \
  -H "Authorization: Bearer $FLOW_TOKEN"
JSON
{
  "mobile_ad_id": "474944",
  "vehicle": { "make": "OPEL", "model": "Astra", "year": 2013, "finalPrice": 32154 },
  "specs": { "category": "EstateCar", "powerKw": 81, "firstRegistration": "2013-01", "cubicCapacity": null },
  "attributes": { "doors": null, "climatisation": null, "accident_damaged": null },
  "images": [{ "thumb": "https://img.classistatic.de/…?rule=mo-200.jpg",
               "large": "https://img.classistatic.de/…?rule=mo-1600.jpg" }],
  "dealer": { "company_name": "Autohaus Beispiel GmbH", "city": "Hamburg", "country": "DE",
              "phones": ["+49 40 1234567"], "email": "verkauf@autohaus-beispiel.example" },
  "links": { "detailPage": "https://suchen.mobile.de/fahrzeuge/details.html?id=474944", "video": null },
  "pricing": { "priceAmount": 29000, "restBpm": 285, "marginAmount": 2381.6, "finalPrice": 32154,
               "merchant": { "tiers": [{ "from": 0, "to": null, "kind": "percentage", "value": 0.08 }] } },
  "match_status": "matching",
  "items": [{ "id": "bcaac423-5ac1-4dba-9c26-34f0e8c3b417", "name": "Astra mock", "enabled": true,
              "match_status": "matching" }],
  "price_basis": "nl"
}
  • specs and attributes are complete: an undeclared value is null (an equipment item false), never missing. Label them from the vocabulary (§4): a specs value with the response_only row of the same detail_field; an attributes value with the form-field row (in the vocabulary's attributes) of the same field.
  • specs.description is the dealer's ad text in mobile.de markup: render it as text or through a safe formatter, never as raw HTML.
  • pricing is the full price build-up; pricing.finalPrice always equals vehicle.finalPrice. It is null for a car that cannot be priced yet.

The vehicle detail and the feed carry data for your merchant only: the German dealer's contact card (dealer) and, on the detail, pricing: the purchase price, taxes and your own margin configuration. That is why both are served Cache-Control: no-store. The match list carries your purchase and selling prices too. Use all three for your own team; never show them on a public website and never put them in a shared cache.

8. The notification feed

There is no push to your systems: you poll GET /api/v1/notifications. Your receivers get their messages from Flow itself; the feed is for your integration.

  1. Bootstrap: call it without parameters. You get the newest events, newest first (limit 1–200, default 50). Remember the highest id.
  2. Poll: call it with ?since_id=<id>. You get only newer events, oldest first; the list is empty when nothing happened.
BASH
curl -s "https://flow-api.eurostocks.com/api/v1/notifications?since_id=$LAST_ID" \
  -H "Authorization: Bearer $FLOW_TOKEN"
JSON
{ "notifications": [] }

Each event in notifications carries:

  • id — a number written as a string (it can exceed what a JavaScript number holds exactly): store it as text and pass it back unchanged as since_id.
  • watchlist_id, mobile_ad_id (for the vehicle detail) and created_at.
  • kind — new_match; reason — created (a newly listed car) or updated_into_match (an existing car changed into the criteria). Skip a kind you do not know.
  • payload — {watchlistName, vehicle}: the car as it was when it matched (make, model, year, mileage, priceAmount, nlPriceExclMargin).
  • match_status — the car's state now: matching, unmatched or gone.
  • dealer — the dealer's contact card as it is now, or null. Show it; do not store it.

A paused watchlist writes no events. Flow prescribes no poll interval: poll as often as your use needs, within the rate limit, and honour 429 (§9).

9. Errors and rate limits

Coded errors are JSON {error, code}. Act on code, not on the text in error:

Status code Meaning
401 AUTH_REQUIRED Missing or invalid token: request a fresh token once and retry (§2).
403 MODULE_FORBIDDEN The service account has no watchlist module.
403 ROLE_FORBIDDEN An owner-only surface (receiver management): use the console.
403 MERCHANT_FORBIDDEN A merchant parameter was sent that does not belong to your token: never send merchant.
400 MERCHANT_REQUIRED The service account belongs to more than one merchant; contact EuroStocks.
404 VEHICLE_NOT_FOUND The vehicle detail of a car that is not in stock and not in your match set.
429 RATE_LIMITED Rate limit exceeded: wait the seconds in Retry-After.

Without a code:

  • Validation: an invalid body or criteria is 400 {error: "validation failed", issues}. Act on the status; each entry of issues names the field in path (for example an unknown criteria key, or null for recipient_ids).
  • A watchlist that is not yours or does not exist: 404 {error: "watchlist not found"}.
  • An unknown /api/* path: 404 {error: "unknown endpoint"}; an unexpected failure: 500 {error: "internal error"}.

Rate limit: the watchlist endpoints share one flat limit per merchant, not tied to a package. Above it you get 429 with a Retry-After header (seconds): wait that long, do not retry aggressively. The numbers are deployment configuration, not a promise; there are no X-RateLimit-* headers.

10. Start checklist

  1. Receive from EuroStocks: the API base URL, the token URL, a client id and a service account with the watchlist module. Ask your owner to set up the default receivers in the Flow console.
  2. Token handling in your back end (§2); never a token in a browser or a URL; never merchant.
  3. Load and cache the vocabulary; check version === "v1"; build the form from it, without the seller row (§4).
  4. Show the estimate while the user edits, debounced (§5).
  5. Save without recipient_ids unless the user picks receivers; on update, send name + criteria and leave enabled out (§6).
  6. Show matches and the vehicle detail to your own team only; never cache the dealer card or pricing (§7).
  7. Poll the feed with since_id, kept as a string (§8).
  8. Verify: 401 → refresh once and retry; the codes of §9 handled, Retry-After respected on 429.
Next steps