# Hermes Data — Dealers API (v1_1) This is the official Hermes Data reference for implementing integrations and answering questions about the documented APIs. Use the product and version named in each section; do not mix their routes, identifiers, billing rules, or response shapes. Examples use placeholder credentials and sample data. Follow the documented contracts, and state when a behavior is not specified instead of inventing endpoints or fields. Fetch the canonical source for updates. Live /meta responses are authoritative for current catalog values and limits where documented. Canonical documentation: https://hermesdata.io/documentation/dealers API base URL: https://luxe.hermesdata.io/v1_1/dealers ## Authentication Use HTTPS and the Authorization header: `Bearer hd_live_your_key_here`. Generate a key at https://hermesdata.io/portal/account/api-key. Keep real credentials out of prompts and shared examples. Product access requirements still apply. ## Overview and billing Every car dealership in the US and Canada, as data: address, phone lines, franchises, headcount, and the software they run. Search all of them for free, pay only to unlock the records you want, and re-read those forever at no charge. Purchasing new records costs 1 credit(s) per rooftop. Search, quotes and re-reading owned records are free. Portal and API share wallet and ownership. The search and purchase endpoints documented here return JSON records. Portal orders provide CSV downloads. ## Quickstart Every Texas dealership with 100+ cars on the lot that you haven't bought yet. Nothing is purchased and nothing is charged. ```bash curl -X GET 'https://luxe.hermesdata.io/v1_1/dealers/search?dealer_state=TX&min_inventory=100&page_size=2' \ -H 'Authorization: Bearer hd_live_your_key_here' ``` ```json { "data": [ { "dealer_id": "6a1c48d0e2f7b3915c0d4471", "dealer_name": "EXAMPLE CHEVROLET", "oem_franchises": "Chevrolet", "dealer_inventory_count": "706", "purchased": false }, { "dealer_id": "6a1c48d1e2f7b3915c0d4488", "dealer_name": "EXAMPLE FORD", "oem_franchises": "Ford", "dealer_inventory_count": "397", "purchased": false } ], "meta": { "data_version": "bbb_dealers_20260816_060000_7720a9d6", "segment": "new", "page": 1, "page_size": 2, "total": 2084, "next_cursor": "eyJ2IjoiYmJiX2RlYWxlcnNfMjAyNjA4MTZfMDYwMDAwXzc3MjBhOWQ2Iiwi…" } } // Five keys, and that is the whole free projection. The paid columns are not // null here - they are absent. purchased: false says which projection this is. ``` ## Conventions and pagination Record values, including numeric columns, are strings; multi-value columns are pipe-delimited. Read purchased to distinguish owned records from previews. Free and paid field lists below describe the projections. List envelopes contain data and meta; point lookups are bare records. Other endpoints have their own shapes shown below. Rows sort by dealer_id ascending; there is no sort parameter. Pages are 1-based, page_size defaults to 50 and clamps at 500. meta.total counts the selected segment; /meta records counts the whole catalog. New and owned searches are separate segments. Follow meta.next_cursor until null for deep paging. Begin without a cursor, keep the segment and filters fixed, and treat tokens as opaque. page=1 with a cursor is accepted; page>=2 is invalid_cursor. Cursors pin a snapshot; on snapshot_expired restart the walk. Purchases move rows between segments, so re-walk after buying. For record responses, X-Data-Version matches meta.data_version. The catalog is rebuilt nightly. ## Validation and purchase caveats Record-search endpoints ignore unknown query parameters and unparseable numeric filters. Boolean values other than true or 1 mean false; omit a boolean to mean either. Non-numeric page/page_size returns invalid_query; page below 1 becomes 1. Unknown JSON body fields return invalid_body. A purchase retry can replay the original order without another debit while the selection still contains unowned records; once everything is owned it returns no_new_records. Quote credit_balance can lag a purchase by about 60 seconds; purchase credits_used confirms the charge. ## Billing classes ```json { "free": { "label": "free", "blurb": "Unlimited and never billed - searching, faceting, ids, point lookups, the owned batch and quotes." }, "credits": { "label": "credits", "blurb": "The only charged call. Debits credits per NET-NEW record; records you already own are excluded before the debit." } } ``` ## Discovery Ask the product what it holds, what it costs, and what you can filter on. Read this instead of hard-coding anything below. ### GET /v1_1/dealers/meta Self-describing document: data version, record count, price per record, both segment paths, the filter vocabulary, paging rules, limits, and the free-vs-paid field lists. Billing class: free ```bash curl -X GET 'https://luxe.hermesdata.io/v1_1/dealers/meta' \ -H 'Authorization: Bearer hd_live_your_key_here' ``` Response example: ```json { "product": "dealers", "data_version": "bbb_dealers_20260816_060000_7720a9d6", "records": 65286, "credits_per_item": 1, "pricing": "Searching and previewing redacted rows is free. Unlocking a new record costs credits_per_item, charged once - re-fetching a record you already own is always free.", "segments": { "new": { "search": "/v1_1/dealers/search", "facets": "/v1_1/dealers/facets", "ids": "/v1_1/dealers/ids", "rows": "redacted" }, "owned": { "search": "/v1_1/dealers/owned/search", "facets": "/v1_1/dealers/owned/facets", "ids": "/v1_1/dealers/owned/ids", "records": "/v1_1/dealers/owned/records", "rows": "full" } }, "segments_are": "disjoint - a record you own never appears in the new segment, and vice versa", "filters": ["q", "dealer_name", "oem_franchise", "dealer_city", "dealer_state", "dealer_zip", "dealer_country", "website_provider", "dealer_id", "has_website", "has_phone", "min_inventory", "max_inventory"], "paging": { "modes": ["page", "cursor"], "cursor_param": "cursor", "cursor_field": "meta.next_cursor", "cursor_bound_to_snapshot": true, "sort": "dealer_id ascending (the only order; deterministic across pages)" }, "limits": { "max_page_size": 500, "max_records_ids": 500, "ids_cap": 100000 }, "fields": { "free": ["dealer_id", "dealer_name", "oem_franchises", "dealer_inventory_count", "purchased"], "paid": ["dealer_website_id", "dealer_website_url", "phone", "dealer_street", "dealer_city", "dealer_state", "dealer_zip", "dealer_country", "main_phone", "sales_phone", "service_phone", "parts_phone", "facebook", "instagram", "x_twitter", "youtube", "legal_business_name", "founded_year", "years_in_business", "total_employee_count", "decision_maker_count", "website_provider", "website_product", "martech_signals", "entity_dealer_id"] } } ``` A single object. data_version changes when the nightly export is rebuilt - it is also the value your cursors are pinned to. ## Browse what you don't own The new segment: every rooftop you have not bought, with the paid columns absent. Free, unlimited, and the same query vocabulary as the owned segment. ### GET /v1_1/dealers/search Paged, filtered rooftops you don't own yet. Redacted rows. Billing class: free Parameters: - `q` (query; string; optional): Free text over dealer name and city. - `dealer_name` (query; string; optional): Case-insensitive substring. - `oem_franchise` (query; string; optional): Matches inside the pipe-delimited franchise list. Comma-separated needles OR together. - `dealer_city` (query; string; optional): Case-insensitive substring. - `dealer_state` (query; string; optional): Exact state/province code. Comma-separated values OR together, e.g. TX,IL. - `dealer_zip` (query; string; optional): Prefix match, e.g. 787. - `dealer_country` (query; string; optional): US or CA. - `website_provider` (query; string; optional): Website platform vendor, e.g. DealerOn. - `dealer_id` (query; string; optional): Exact match. The same id a v1.2 listing carries, so you can go listing → rooftop. - `has_website` (query; boolean; optional): true / false. - `has_phone` (query; boolean; optional): true / false. - `min_inventory` (query; integer; optional): Inclusive lower bound on the rooftop's live inventory count. - `max_inventory` (query; integer; optional): Inclusive upper bound. - `page` (query; integer; optional): 1-based page number. Default 1. Mutually exclusive with cursor from page 2 up; page=1 alongside a cursor is accepted. A page below 1 is treated as 1. - `page_size` (query; integer; optional): Rows per page, 1–500. Default 50. Clamped silently - read meta.page_size back. - `cursor` (query; string; optional): Opaque token from meta.next_cursor. On the first call omit it, or send it empty - an empty cursor= means "no cursor". ```bash curl -X GET 'https://luxe.hermesdata.io/v1_1/dealers/search?dealer_state=TX&min_inventory=100&page_size=2' \ -H 'Authorization: Bearer hd_live_your_key_here' ``` Response example: ```json { "data": [ { "dealer_id": "6a1c48d0e2f7b3915c0d4471", "dealer_name": "EXAMPLE CHEVROLET", "oem_franchises": "Chevrolet", "dealer_inventory_count": "706", "purchased": false }, { "dealer_id": "6a1c48d1e2f7b3915c0d4488", "dealer_name": "EXAMPLE FORD", "oem_franchises": "Ford", "dealer_inventory_count": "397", "purchased": false } ], "meta": { "data_version": "bbb_dealers_20260816_060000_7720a9d6", "segment": "new", "page": 1, "page_size": 2, "total": 2084, "next_cursor": "eyJ2IjoiYmJiX2RlYWxlcnNfMjAyNjA4MTZfMDYwMDAwXzc3MjBhOWQ2Iiwi…" } } // Five keys, and that is the whole free projection. The paid columns are not // null here - they are absent. purchased: false says which projection this is. ``` { data, meta }. All filters AND together; a filter value that matches nothing is an empty 200, never an error. ### GET /v1_1/dealers/facets Counts by state and by OEM franchise over the same match set your search would return. Billing class: free Parameters: - `q` (query; string; optional): Free text over dealer name and city. - `dealer_name` (query; string; optional): Case-insensitive substring. - `oem_franchise` (query; string; optional): Matches inside the pipe-delimited franchise list. Comma-separated needles OR together. - `dealer_city` (query; string; optional): Case-insensitive substring. - `dealer_state` (query; string; optional): Exact state/province code. Comma-separated values OR together, e.g. TX,IL. - `dealer_zip` (query; string; optional): Prefix match, e.g. 787. - `dealer_country` (query; string; optional): US or CA. - `website_provider` (query; string; optional): Website platform vendor, e.g. DealerOn. - `dealer_id` (query; string; optional): Exact match. The same id a v1.2 listing carries, so you can go listing → rooftop. - `has_website` (query; boolean; optional): true / false. - `has_phone` (query; boolean; optional): true / false. - `min_inventory` (query; integer; optional): Inclusive lower bound on the rooftop's live inventory count. - `max_inventory` (query; integer; optional): Inclusive upper bound. ```bash curl -X GET 'https://luxe.hermesdata.io/v1_1/dealers/facets?dealer_state=TX&min_inventory=100' \ -H 'Authorization: Bearer hd_live_your_key_here' ``` Response example: ```json { "data_version": "bbb_dealers_20260816_060000_7720a9d6", "segment": "new", "by_state": [ { "value": "TX", "count": 2084 } ], "by_oem_franchise": [ { "value": "Used", "count": 626 }, { "value": "Ford", "count": 203 }, { "value": "Chevrolet", "count": 200 }, { "value": "Jeep", "count": 180 } ] } // Counts describe the same match set the equivalent search would return, so // facets + search stay consistent under any filter. ``` Buckets are ordered by count, descending. Use them to build filter menus without guessing what exists. ### GET /v1_1/dealers/ids Just the ids for a filter - the cheap input to a quote, a purchase, or a batch re-fetch. Billing class: free Parameters: - `q` (query; string; optional): Free text over dealer name and city. - `dealer_name` (query; string; optional): Case-insensitive substring. - `oem_franchise` (query; string; optional): Matches inside the pipe-delimited franchise list. Comma-separated needles OR together. - `dealer_city` (query; string; optional): Case-insensitive substring. - `dealer_state` (query; string; optional): Exact state/province code. Comma-separated values OR together, e.g. TX,IL. - `dealer_zip` (query; string; optional): Prefix match, e.g. 787. - `dealer_country` (query; string; optional): US or CA. - `website_provider` (query; string; optional): Website platform vendor, e.g. DealerOn. - `dealer_id` (query; string; optional): Exact match. The same id a v1.2 listing carries, so you can go listing → rooftop. - `has_website` (query; boolean; optional): true / false. - `has_phone` (query; boolean; optional): true / false. - `min_inventory` (query; integer; optional): Inclusive lower bound on the rooftop's live inventory count. - `max_inventory` (query; integer; optional): Inclusive upper bound. ```bash curl -X GET 'https://luxe.hermesdata.io/v1_1/dealers/ids?dealer_state=TX&min_inventory=100' \ -H 'Authorization: Bearer hd_live_your_key_here' ``` Response example: ```json { "data_version": "bbb_dealers_20260816_060000_7720a9d6", "segment": "new", "ids": ["6a1c48d0e2f7b3915c0d4471", "6a1c48d1e2f7b3915c0d4488", "6a1c48d3e2f7b3915c0d44b2"], "total": 2084, "capped": false } ``` total is the true match count; capped tells you whether the ids list was truncated at 100,000. ## Read what you own The owned segment: everything you have bought, in full, forever, for free. Same filters, same envelope, same paging as above. ### GET /v1_1/dealers/owned/search Paged, filtered rooftops you own. Full rows. Billing class: free Parameters: - `q` (query; string; optional): Free text over dealer name and city. - `dealer_name` (query; string; optional): Case-insensitive substring. - `oem_franchise` (query; string; optional): Matches inside the pipe-delimited franchise list. Comma-separated needles OR together. - `dealer_city` (query; string; optional): Case-insensitive substring. - `dealer_state` (query; string; optional): Exact state/province code. Comma-separated values OR together, e.g. TX,IL. - `dealer_zip` (query; string; optional): Prefix match, e.g. 787. - `dealer_country` (query; string; optional): US or CA. - `website_provider` (query; string; optional): Website platform vendor, e.g. DealerOn. - `dealer_id` (query; string; optional): Exact match. The same id a v1.2 listing carries, so you can go listing → rooftop. - `has_website` (query; boolean; optional): true / false. - `has_phone` (query; boolean; optional): true / false. - `min_inventory` (query; integer; optional): Inclusive lower bound on the rooftop's live inventory count. - `max_inventory` (query; integer; optional): Inclusive upper bound. - `page` (query; integer; optional): 1-based page number. Default 1. Mutually exclusive with cursor from page 2 up; page=1 alongside a cursor is accepted. A page below 1 is treated as 1. - `page_size` (query; integer; optional): Rows per page, 1–500. Default 50. Clamped silently - read meta.page_size back. - `cursor` (query; string; optional): Opaque token from meta.next_cursor. On the first call omit it, or send it empty - an empty cursor= means "no cursor". ```bash curl -X GET 'https://luxe.hermesdata.io/v1_1/dealers/owned/search?page_size=50' \ -H 'Authorization: Bearer hd_live_your_key_here' ``` Response example: ```json { "data": [ /* full rows, exactly the shape above */ ], "meta": { "data_version": "bbb_dealers_20260816_060000_7720a9d6", "segment": "owned", "page": 1, "page_size": 50, "total": 20, "next_cursor": "eyJ2IjoiYmJiX2RlYWxlcnNfMjAyNjA4MTZfMDYwMDAwXzc3MjBhOWQ2Iiwi…" } } // Same envelope, same filters, same paging as the new segment. Only two things // differ: segment says "owned", and the rows are the full projection. ``` { data, meta } with segment: "owned". This is the paged form of the free re-read - there is no charge and no limit on how often you call it. ### GET /v1_1/dealers/owned/facets The same facet buckets, computed over what you own. Billing class: free Parameters: - `q` (query; string; optional): Free text over dealer name and city. - `dealer_name` (query; string; optional): Case-insensitive substring. - `oem_franchise` (query; string; optional): Matches inside the pipe-delimited franchise list. Comma-separated needles OR together. - `dealer_city` (query; string; optional): Case-insensitive substring. - `dealer_state` (query; string; optional): Exact state/province code. Comma-separated values OR together, e.g. TX,IL. - `dealer_zip` (query; string; optional): Prefix match, e.g. 787. - `dealer_country` (query; string; optional): US or CA. - `website_provider` (query; string; optional): Website platform vendor, e.g. DealerOn. - `dealer_id` (query; string; optional): Exact match. The same id a v1.2 listing carries, so you can go listing → rooftop. - `has_website` (query; boolean; optional): true / false. - `has_phone` (query; boolean; optional): true / false. - `min_inventory` (query; integer; optional): Inclusive lower bound on the rooftop's live inventory count. - `max_inventory` (query; integer; optional): Inclusive upper bound. ```bash curl -X GET 'https://luxe.hermesdata.io/v1_1/dealers/owned/facets' \ -H 'Authorization: Bearer hd_live_your_key_here' ``` Response example: ```json { "data_version": "bbb_dealers_20260816_060000_7720a9d6", "segment": "owned", "by_state": [ { "value": "AB", "count": 3 }, { "value": "TX", "count": 3 }, { "value": "NY", "count": 2 } ], "by_oem_franchise": [ { "value": "Used", "count": 9 }, { "value": "Ford", "count": 4 } ] } ``` Own nothing yet and every bucket list comes back empty - a 200, not an error. ### GET /v1_1/dealers/owned/ids Ids of what you own, for reconciling against your own store. Billing class: free Parameters: - `q` (query; string; optional): Free text over dealer name and city. - `dealer_name` (query; string; optional): Case-insensitive substring. - `oem_franchise` (query; string; optional): Matches inside the pipe-delimited franchise list. Comma-separated needles OR together. - `dealer_city` (query; string; optional): Case-insensitive substring. - `dealer_state` (query; string; optional): Exact state/province code. Comma-separated values OR together, e.g. TX,IL. - `dealer_zip` (query; string; optional): Prefix match, e.g. 787. - `dealer_country` (query; string; optional): US or CA. - `website_provider` (query; string; optional): Website platform vendor, e.g. DealerOn. - `dealer_id` (query; string; optional): Exact match. The same id a v1.2 listing carries, so you can go listing → rooftop. - `has_website` (query; boolean; optional): true / false. - `has_phone` (query; boolean; optional): true / false. - `min_inventory` (query; integer; optional): Inclusive lower bound on the rooftop's live inventory count. - `max_inventory` (query; integer; optional): Inclusive upper bound. ```bash curl -X GET 'https://luxe.hermesdata.io/v1_1/dealers/owned/ids' \ -H 'Authorization: Bearer hd_live_your_key_here' ``` Response example: ```json { "data_version": "bbb_dealers_20260816_060000_7720a9d6", "segment": "owned", "ids": ["6a1c48d0e2f7b3915c0d4471", "6a1c48d1e2f7b3915c0d4488"], "total": 20, "capped": false } ``` Same shape as the new-segment ids route, with segment: "owned". ### POST /v1_1/dealers/owned/records Free re-fetch by id - up to 500 per call. The endpoint to wire into a nightly refresh of records you already bought. Billing class: free Parameters: - `ids` (body; string[]; required): 1–500 dealer_ids. ```bash curl -X POST 'https://luxe.hermesdata.io/v1_1/dealers/owned/records' \ -H 'Authorization: Bearer hd_live_your_key_here' \ -H 'Content-Type: application/json' \ --data '{"ids": ["6a1c48d0e2f7b3915c0d4471", "6a1c48d1e2f7b3915c0d4488"]}' ``` Response example: ```json { "data": [ /* one full row per id you own */ ], "meta": { "data_version": "bbb_dealers_20260816_060000_7720a9d6", "segment": "owned", "requested": 3, "returned": 1, "not_owned": ["6a1c48d1e2f7b3915c0d4488", "not-a-real-id"] } } // Ids you don't own and ids that don't exist land in the same not_owned list - // deliberately indistinguishable, so this endpoint can't be used to probe // whether an arbitrary id exists. Nothing is silently dropped or redacted. ``` 400 batch_empty on an empty list, 400 batch_too_large over 500, 400 invalid_body if the body carries a field this endpoint doesn't know. ## Buy Quote first, then purchase. A rooftop costs 1 credit, once, and is yours permanently. ### POST /v1_1/dealers/purchase/quote What would this selection cost? Free, and it never debits or reserves anything. Billing class: free Parameters: - `ids` (body; string[]; optional): Explicit selection. Wins over filters when both are sent. - `filters` (body; object; optional): Filter selection, evaluated against the NEW segment. Same vocabulary as search. - `item_count` (body; integer; optional): Ceiling on how many net-new records to price. Applies in both modes. ```bash curl -X POST 'https://luxe.hermesdata.io/v1_1/dealers/purchase/quote' \ -H 'Authorization: Bearer hd_live_your_key_here' \ -H 'Content-Type: application/json' \ --data '{"filters": {"dealer_state": "TX", "min_inventory": 100}, "item_count": 42}' ``` Response example: ```json { "product": "dealers", "data_version": "bbb_dealers_20260816_060000_7720a9d6", "credits_per_item": 1, "net_new": 42, "credits_required": 42, "credit_balance": 4996, "balance_after": 4954 } // net_new already excludes what you own, and item_count (if you send one) caps // it. credits_required is exactly what the purchase will charge. // // credit_balance is a CACHED view of your wallet and can lag a purchase by up // to about a minute. Treat credits_used on a purchase response as the record of // what was spent, not the difference between two quotes. ``` 400 missing_selection if you send neither ids nor filters. Send one or the other - an empty body is not a quote for everything. ### POST /v1_1/dealers/purchase Buy rooftops. Debits credits for net-new records only and returns the full rows inline. No file is produced. Billing class: credits Parameters: - `idempotency_key` (body; string; required): Required, here or as an Idempotency-Key header. A retry with the same key never charges twice. - `ids` (body; string[]; optional): Explicit selection. Wins over filters when both are sent. - `filters` (body; object; optional): Filter selection out of the NEW segment. Same vocabulary as search. - `item_count` (body; integer; optional): Ceiling on records bought, in either mode. The selection is ordered by id then truncated, so a retry buys the same records. - `page` (body; integer; optional): Paging for the inline delivery only. Default 1. - `page_size` (body; integer; optional): Rows delivered inline, max 500. Default 50. The rest is free from owned/search. ```bash curl -X POST 'https://luxe.hermesdata.io/v1_1/dealers/purchase' \ -H 'Authorization: Bearer hd_live_your_key_here' \ -H 'Content-Type: application/json' \ --data '{ "idempotency_key": "3f7c1a9e-2b64-4c17-9a0d-88c4e5b1f902", "filters": {"dealer_state": "TX", "min_inventory": 100}, "item_count": 25 }' ``` Response example: ```json { "order_id": "c23afb65-8471-4f67-aed6-04ece29522b3", "product": "dealers", "data_version": "bbb_dealers_20260816_060000_7720a9d6", "credits_used": 1, "charged_items": 1, "replay": false, "data": [ /* the full rows you just bought, same shape as owned/search */ ], "meta": { "page": 1, "page_size": 50, "total_purchased": 1, "remaining_rows_at": "/v1_1/dealers/owned/search" } } // Retry the same idempotency_key and you get the SAME order back, unbilled: { "order_id": "c23afb65-8471-4f67-aed6-04ece29522b3", "credits_used": 1, "charged_items": 1, "replay": true, "…": "…" } // Buy something you already own and nothing happens - no order, no debit, // no rows, and no remaining_rows_at: { "order_id": null, "product": "dealers", "credits_used": 0, "charged_items": 0, "replay": false, "data": [], "meta": { "page": 1, "page_size": 50, "total_purchased": 0 } } ``` 402 insufficient_credits if the wallet can't cover it, 402 spend_frozen on a billing hold, 400 missing_idempotency_key if the key is missing. Ownership is recorded before the response is built, so collect large purchases from owned/search rather than paging them inline. ## Point lookup One record by id, as a bare object - full if you own it, redacted if you don't. ### GET /v1_1/dealers/{dealer_id} One rooftop. The natural landing point for a dealer_id you got from a v1.2 vehicle listing. Billing class: free Parameters: - `dealer_id` (path; string; required): A dealer_id, as returned on every row - free or paid. ```bash curl -X GET 'https://luxe.hermesdata.io/v1_1/dealers/6a1c48d0e2f7b3915c0d4471' \ -H 'Authorization: Bearer hd_live_your_key_here' ``` Response example: ```json { "dealer_id": "6a1c48d0e2f7b3915c0d4471", "dealer_name": "EXAMPLE CHEVROLET", "oem_franchises": "Chevrolet", "dealer_inventory_count": "706", "purchased": false } // A bare object, not an envelope. Own this rooftop and the same URL returns the // full projection with purchased: true - the id never changes. ``` A bare object, no envelope. Read purchased to know which projection you got. 404 dealer_not_found for an id we don't hold. ## Price a market, then buy exactly what you budgeted for Quote is free and never debits or reserves. item_count caps the purchase in both selection modes. ```python import requests, uuid BASE = "https://luxe.hermesdata.io/v1_1/dealers" H = {"Authorization": "Bearer hd_live_your_key_here"} FILTERS = {"dealer_state": "TX", "min_inventory": 100} quote = requests.post(f"{BASE}/purchase/quote", headers=H, json={"filters": FILTERS}).json() print(f"{quote['net_new']} new rooftops = {quote['credits_required']} credits") # Buy the first 25 of them. Same key on a retry = same order, never a second charge. order = requests.post(f"{BASE}/purchase", headers=H, json={ "idempotency_key": str(uuid.uuid4()), "filters": FILTERS, "item_count": 25, }).json() print("order", order["order_id"], "cost", order["credits_used"], "credits") # The rows come back inline, and everything you bought is now free to re-read. for row in order["data"]: print(row["dealer_name"], row["main_phone"], row["dealer_website_url"]) ``` ## Walk everything you own, however much that is Start without a cursor, then follow meta.next_cursor until it comes back null. Don't pair a cursor with page=2 or higher. ```python import requests BASE = "https://luxe.hermesdata.io/v1_1/dealers" H = {"Authorization": "Bearer hd_live_your_key_here"} params = {"page_size": 500} # no cursor on the first call while True: body = requests.get(f"{BASE}/owned/search", params=params, headers=H).json() for row in body["data"]: print(row["dealer_id"], row["dealer_name"]) cursor = body["meta"]["next_cursor"] if not cursor: # null terminates the walk break params = {"page_size": 500, "cursor": cursor} # never send page alongside # A cursor belongs to one segment and one data version. If the nightly rebuild # lands mid-walk you get 400 snapshot_expired - restart from the top. ``` ## Refresh the records you already bought Re-reading is free forever, so keep your copy current instead of re-buying. 500 ids per call; ids you don't own come back named, not dropped. ```python import requests BASE = "https://luxe.hermesdata.io/v1_1/dealers" H = {"Authorization": "Bearer hd_live_your_key_here"} my_ids = [row["dealer_id"] for row in my_database] # your side fresh, missing = {}, [] for i in range(0, len(my_ids), 500): # 500 is the cap body = requests.post(f"{BASE}/owned/records", headers=H, json={"ids": my_ids[i:i + 500]}).json() fresh.update({r["dealer_id"]: r for r in body["data"]}) missing += body["meta"]["not_owned"] print(f"refreshed {len(fresh)}, not owned by this key: {len(missing)}") ``` ## Go from a vehicle listing to the dealership selling it A v1.2 listing carries the dealer_id of the dealership that runs the site it came from - the same id this product uses. The join is one-to-one in both directions. ```python import requests H = {"Authorization": "Bearer hd_live_your_key_here"} LISTINGS = "https://luxe.hermesdata.io/v1_2/listings" DEALERS = "https://luxe.hermesdata.io/v1_1/dealers" listings = requests.get(f"{LISTINGS}/search", params={"state": "TX", "make": "Ford", "page_size": 100}, headers=H).json()["data"] # dealer_id is ABSENT on listings whose website we can't tie to a dealership. dealer_ids = {row["dealer_id"] for row in listings if row.get("dealer_id")} # Free: see who they are and whether you already own them. body = requests.post(f"{DEALERS}/purchase/quote", headers=H, json={"ids": sorted(dealer_ids)}).json() print(f"{len(dealer_ids)} rooftops, {body['net_new']} not yet owned " f"= {body['credits_required']} credits") # The other direction - matching listings rows against rooftops you already # hold - is the same key, straight through. mine = requests.get(f"{DEALERS}/owned/search", headers=H, params={"page_size": 500}).json()["data"] by_id = {r["dealer_id"]: r for r in mine} for row in listings: rooftop = by_id.get(row.get("dealer_id")) if rooftop: print(row["vin"], "->", rooftop["dealer_name"]) # entity_dealer_id is the OTHER question: which business a storefront belongs # to. Stores on one campus share it, so dedupe before you aggregate. campuses = {r["entity_dealer_id"] for r in mine if "entity_dealer_id" in r} print(f"{len(mine)} rooftops sit in {len(campuses)} distinct businesses") ``` ## Free API fields ```json [ "dealer_id", "dealer_name", "oem_franchises", "dealer_inventory_count", "purchased" ] ``` ## Paid API fields ```json [ "dealer_website_id", "dealer_website_url", "phone", "dealer_street", "dealer_city", "dealer_state", "dealer_zip", "dealer_country", "main_phone", "sales_phone", "service_phone", "parts_phone", "facebook", "instagram", "x_twitter", "youtube", "legal_business_name", "founded_year", "years_in_business", "total_employee_count", "decision_maker_count", "website_provider", "website_product", "martech_signals", "entity_dealer_id" ] ``` ## Full API record example ```json { "dealer_id": "6a1c48d0e2f7b3915c0d4471", "entity_dealer_id": "6a1c48d0e2f7b3915c0d4471", "dealer_website_id": "examplechevrolet.com", "dealer_name": "EXAMPLE CHEVROLET", "dealer_website_url": "www.examplechevrolet.com", "phone": "8175550142", "oem_franchises": "Chevrolet", "dealer_inventory_count": "706", "dealer_street": "3118 FT WORTH HWY", "dealer_city": "WEATHERFORD", "dealer_state": "TX", "dealer_zip": "76087", "dealer_country": "US", "main_phone": "8175550142", "sales_phone": "8175550142", "service_phone": "8175550188", "parts_phone": "6825550196", "facebook": "https://www.facebook.com/ExampleChevrolet", "instagram": "https://www.instagram.com/examplechevrolet/", "x_twitter": "https://twitter.com/examplechevy", "youtube": "https://www.youtube.com/c/examplechevrolet", "legal_business_name": "", "founded_year": "", "years_in_business": "", "total_employee_count": "38", "decision_maker_count": "13", "website_provider": "DealerOn", "website_product": "DealerOn Website Platform", "martech_signals": "Facebook Pixel / Conversions", "purchased": true } // Every value is a STRING, including the counts. A paid field we simply don't // have comes back as "" - an empty string means "unknown", not "redacted". // Redacted means the key is absent (see the search response above). // // entity_dealer_id names the BUSINESS this rooftop belongs to, not the rooftop. // It equals dealer_id for a standalone store and is shared by stores on one // campus, so use it to roll a campus up and never as a per-rooftop key. To // attribute a listing to this rooftop, join on dealer_id - the Listings API // stamps that same id on every row from this rooftop's website. Absent (never // null) when we cannot resolve. ``` ## CSV field reference Portal orders produce UTF-8 comma-separated files with a header row. These are portal CSV columns; API projections are documented separately above. Re-download owned records through My Orders. ### Identity & web - `dealer_name` (free): Dealer name. Public-facing dealership name. - `legal_business_name` (paid): Legal business name. Registered legal entity name, where known. - `dealer_website_url` (paid): Website. Primary website URL for the rooftop. - `dealer_id` (free): Dealer ID. Stable Hermes identifier for the rooftop. - `dealer_website_id` (paid): Website ID. Website host key (primary domain) for the rooftop. ### Location - `dealer_street` (paid): Street. Street address. - `dealer_city` (paid): City. City. - `dealer_state` (paid): State / province. State / province (2-letter code). - `dealer_zip` (paid): ZIP / postal code. ZIP / postal code. - `dealer_country` (paid): Country. Country — US or CA. ### Phone lines - `phone` (paid): Primary phone. Primary listed number for the rooftop. - `main_phone` (paid): Main line. Main switchboard line. - `sales_phone` (paid): Sales line. Sales department line. - `service_phone` (paid): Service line. Service department line. - `parts_phone` (paid): Parts line. Parts department line. ### Franchise & inventory - `oem_franchises` (free): OEM franchises. Pipe-delimited OEM franchises carried (e.g. Ford|Lincoln). - `dealer_inventory_count` (free): Inventory. Live vehicle inventory at this rooftop. ### Firmographics - `founded_year` (paid): Founded. Year the dealership was founded. - `years_in_business` (paid): Years in business. Years in operation. - `total_employee_count` (paid): Employees. Estimated total headcount. - `decision_maker_count` (paid): Decision makers. Estimated decision-makers on staff. ### Social profiles - `facebook` (paid): Facebook. Facebook page URL, where present. - `instagram` (paid): Instagram. Instagram profile URL, where present. - `x_twitter` (paid): X / Twitter. X / Twitter profile URL, where present. - `youtube` (paid): YouTube. YouTube channel URL, where present. ### Technographics - `website_provider` (paid): Website provider. Website platform vendor (e.g. Cars Commerce, Cox Automotive). - `website_product` (paid): Website product. Specific product / tier of that platform. - `martech_signals` (paid): Martech signals. Pipe-delimited marketing-tech detected (e.g. Facebook Pixel|Google Tag Manager). ## Record endpoint response headers ```json [ { "name": "X-Data-Version", "on": "every response", "note": "The export snapshot that served it - the same value as meta.data_version, and what your cursors are pinned to." }, { "name": "Retry-After", "on": "429", "note": "Seconds to wait before retrying. The X-RateLimit-* trio rides along on a 429 too." } ] ``` ## Errors ```json [ { "status": "400", "code": "invalid_cursor", "when": "Cursor malformed, minted in the other segment, or sent alongside page=2 or higher. An empty cursor= is fine - it just means no cursor" }, { "status": "400", "code": "snapshot_expired", "when": "Cursor was minted against an older data version - the nightly rebuild landed mid-walk. Restart the traversal" }, { "status": "400", "code": "invalid_query", "when": "page or page_size can't be parsed as a number. Filters are never rejected this way - see the note on filter parsing under Conventions" }, { "status": "400", "code": "invalid_body", "when": "Malformed JSON, or a field this endpoint doesn't know. Purchase and quote bodies reject unknown fields" }, { "status": "400", "code": "batch_empty", "when": "owned/records called with an empty ids list" }, { "status": "400", "code": "batch_too_large", "when": "More than 500 ids in one owned/records call" }, { "status": "400", "code": "missing_selection", "when": "A quote or purchase with neither ids nor filters" }, { "status": "400", "code": "missing_idempotency_key", "when": "A purchase with no idempotency_key, in the body or as an Idempotency-Key header" }, { "status": "401", "code": "invalid_api_key", "when": "Missing, malformed, unknown, or revoked bearer key" }, { "status": "402", "code": "insufficient_credits", "when": "The wallet can't cover the purchase - top up and retry with the same idempotency key" }, { "status": "402", "code": "spend_frozen", "when": "Spending is barred by an open dispute or a past-due subscription. Buying credits does not clear it" }, { "status": "403", "code": "product_not_entitled", "when": "The key isn't entitled to this product" }, { "status": "404", "code": "dealer_not_found", "when": "Unknown id on a point lookup" }, { "status": "429", "code": "rate_limited", "when": "Over the per-key budget of 100 requests/second, shared with the Vehicle Listings API. Carries Retry-After" }, { "status": "503", "code": "auth_unavailable", "when": "The key resolver is unreachable. Fails closed - it never grants access" } ] ```