← Vehicles APIList the values accepted for a vehicle’s market segment. The segment is what distinguishes a supermini from an executive car when the emission factor depends on vehicle class, so sending a value that is not in this list is rejected at write time.
The path uses an underscore: market_segments. Most routes in the Vehicles API separate words with hyphens (bulk-delete-by-filters), but this one does not.The hyphenated spelling does not 404 — it is captured by GET /v1/vehicles/{vehicle_id} and returns 422 complaining that market-segments is not a valid UUID. An error about a vehicle id is the signal that you spelled this path with a hyphen.
A fixed list, not your data. The response is the enumeration itself — it does not depend on your organization, never paginates, and does not change unless the platform adds a segment. Fetch it once and cache it, or hardcode it from this page and use the endpoint as the check that your copy is still current.
The organization header is required even though the list is global. The endpoint takes no query parameters and the response is identical for every organization, but the router’s authentication dependency resolves an organization from this header before the handler runs. Omitting it returns 422, not 401.
import requestssegments = requests.get( "https://api.dcycle.io/v1/vehicles/market_segments", headers={ "x-api-key": "YOUR_API_KEY", "x-organization-id": "YOUR_ORGANIZATION_ID", }, timeout=30,).json()# The response is the list itself — no unwrappingdef valid_segment(value): return value in segments
The Vehicles API exposes a second enumeration of the same shape at GET /v1/vehicles/sizes, with the same headers — x-organization-id included — and the same flat-array response. Its four values are:
When your integration lets a user pick a segment, populate the choice from this endpoint rather than from a hardcoded list that can drift. A value that is not in the list is rejected when you create or update the vehicle, so catching it at selection time turns a write failure into a closed dropdown.
If you prefer to ship the nine values in your own code, call this endpoint in a test and assert the two lists match. That way a segment added on the platform surfaces as a failing test instead of as user input your form silently refuses.