Legacy v1

Vehicle Sellers & Locations

Last updated:

API reference for searching vehicle sellers and dealerships by location with advanced filtering options.

Docs for the previous API generation. v1 endpoints keep working, but new work should target v2. See v2 documentation.

The locations endpoints cover vehicle sellers: dealerships, individual sellers, and auction houses. Search sellers by geographic location, filter by seller type, and retrieve their inventory counts and contact details.

Search sellers by location

GET /v1/locations/search

Search sellers by geographic location and filters. Each result includes the seller's address, dealership affiliation (if any), and active listing count.

Required parameters

ParameterTypeDescription
latnumberLatitude coordinate for location-based search (-90 to 90).
lngnumberLongitude coordinate for location-based search (-180 to 180).

Optional parameters

ParameterTypeDescription
radiusnumberSearch radius in kilometers (default: 50, max: 500).
namestringFilter by seller or dealership name (case-insensitive partial match).
sellerTypestringFilter by seller type: individual, dealership, auction, or aggregator.
websiteDomainstringFilter by website domain (e.g., "example-motors.ca").
hasActiveListingsbooleanOnly include sellers with active vehicle listings (default: false).
limitnumberMaximum number of results to return (default: 50, max: 100).
offsetnumberNumber of results to skip for pagination (default: 0).
curl "https://api.cardog.app/v1/locations/search" \
  -H "x-api-key: your-api-key" \
  -G \
  -d "lat=43.6532" \
  -d "lng=-79.3832" \
  -d "radius=25" \
  -d "name=Toyota" \
  -d "sellerType=dealership" \
  -d "hasActiveListings=true" \
  -d "limit=10"
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: "your-api-key" });

// Search for dealerships near a location
const results = await client.locations.search({
  lat: 43.6532,
  lng: -79.3832,
  radius: 25,
  name: "Toyota",
  sellerType: "dealership",
  hasActiveListings: true,
  limit: 10,
});

for (const seller of results.results) {
  console.log(`${seller.name} - ${seller.distance}km away`);
  console.log(`Active listings: ${seller.totalActiveListings}`);
}
import requests
response = requests.get('https://api.cardog.app/v1/locations/search', params={
  'lat': 43.6532,
  'lng': -79.3832,
  'radius': 25,
  'name': 'Toyota',
  'sellerType': 'dealership',
  'hasActiveListings': True,
  'limit': 10
}, headers={'x-api-key': 'your-api-key'})
data = response.json()

Example

2 keys
"response": {
"results": [
0: {9 items},
1: {9 items}
],
"meta": {
"total": 2,
"params": {8 items}
}
}

Get seller details

GET /v1/locations/:id

Retrieve one seller by its identifier. The response includes contact details, address, dealership affiliation, and active listing count.

Path parameters

ParameterTypeDescription
idstringThe unique UUID identifier of the seller.
curl "https://api.cardog.app/v1/locations/d904fcbb-8859-4a60-a1b1-7f250e77fe62" \
  -H "x-api-key: your-api-key"
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: "your-api-key" });

// Get detailed seller information
const seller = await client.locations.getById("d904fcbb-8859-4a60-a1b1-7f250e77fe62");

console.log(seller.name);
console.log(seller.phone);
console.log(seller.address?.city, seller.address?.state);
console.log(`${seller.totalActiveListings} active listings`);
import requests
seller_id = 'd904fcbb-8859-4a60-a1b1-7f250e77fe62'
response = requests.get(
  f'https://api.cardog.app/v1/locations/{seller_id}',
  headers={'x-api-key': 'your-api-key'}
)
data = response.json()

Example

8 keys
"response": {
"id": "d904fcbb-8859-4a60-a1b1-7f250e77fe62",
"name": "Downtown Toyota",
"type": "dealership",
"email": "sales@downtowntoyota.com",
"phone": "+1-416-555-0123",
"address": {
"id": 1234,
"street": "123 Queen St W",
"city": "Toronto",
"state": "ON",
"postalCode": "M5H 2M9",
"country": "CA",
"latitude": "43.6532",
"longitude": "-79.3832"
},
"dealership": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Downtown Toyota",
"primaryDomain": "downtowntoyota.com"
},
"totalActiveListings": 127
}

Response objects

Seller object

FieldTypeDescription
idstringUnique identifier for the seller.
namestringDisplay name of the seller or dealership.
typestringType of seller: individual, dealership, auction, or aggregator.
emailstring | nullContact email address (may be null for privacy).
phonestring | nullContact phone number (may be null for privacy).
addressobject | nullPhysical address information (see Address object below).
dealershipobject | nullDealership information if seller is affiliated with a dealership.
totalActiveListingsnumberNumber of active vehicle listings from this seller.
distancenumberDistance from search coordinates in kilometers (only in search results).

Address object

FieldTypeDescription
idnumber | nullUnique identifier for the address.
streetstring | nullStreet address line.
citystring | nullCity name.
statestring | nullState or province code.
postalCodestring | nullZIP or postal code.
countrystring | nullCountry code (e.g., "US", "CA").
latitudestring | nullLatitude coordinate as string.
longitudestring | nullLongitude coordinate as string.

Dealership object

FieldTypeDescription
idstringUnique identifier for the dealership.
namestringOfficial dealership name.
primaryDomainstring | nullPrimary website domain for the dealership.

Error responses

The locations API uses standard HTTP status codes and returns an error body with details:

StatusDescription
400 Bad RequestInvalid parameters (e.g., coordinates out of range, invalid seller type).
404 Not FoundSeller with the specified ID does not exist.
500 Internal Server ErrorServer error occurred while processing the request.

Example

3 keys
"response": {
"error": "Validation Error",
"message": "Invalid request parameters",
"details": [
0: {2 items}
]
}

Usage examples

Find Toyota dealerships in Toronto

curl "https://api.cardog.app/v1/locations/search" \
  -H "x-api-key: your-api-key" \
  -G \
  -d "lat=43.6532" \
  -d "lng=-79.3832" \
  -d "radius=50" \
  -d "name=Toyota" \
  -d "sellerType=dealership" \
  -d "hasActiveListings=true"

Find all sellers with active listings nearby

curl "https://api.cardog.app/v1/locations/search" \
  -H "x-api-key: your-api-key" \
  -G \
  -d "lat=40.7128" \
  -d "lng=-74.0060" \
  -d "radius=25" \
  -d "hasActiveListings=true" \
  -d "limit=20"

Paginate through results

# First page
curl "https://api.cardog.app/v1/locations/search" \
  -H "x-api-key: your-api-key" \
  -G \
  -d "lat=34.0522" \
  -d "lng=-118.2437" \
  -d "limit=50" \
  -d "offset=0"

# Second page
curl "https://api.cardog.app/v1/locations/search" \
  -H "x-api-key: your-api-key" \
  -G \
  -d "lat=34.0522" \
  -d "lng=-118.2437" \
  -d "limit=50" \
  -d "offset=50"

Was this helpful?