External API docs

Get business by Google Place ID

Retrieve Openmart business records from Google Place IDs in a single call.

Overview

Use this endpoint when you have a Google Place ID (for example, from Google Maps) and want the matching Openmart business record. The response shape matches POST /api/v1/search content.

The response is keyed by google_place_id, not by Openmart ID. IDs that do not match any record are silently omitted. Accepts 1 to 100 IDs per call.

Before you start

Make sure you have:

  • an Openmart account
  • an API key
  • a tool to send API requests, such as Postman or curl

Authentication. We recommend sending your API key as Authorization: Bearer <your_api_key>. If your current integration already uses X-API-Key: <your_api_key>, it will continue to work.

GET with a body. This endpoint uses the HTTP GET method but requires the JSON array in the request body. Some HTTP clients, proxies, and CDNs silently drop bodies on GETs. If you see an empty-body 422, confirm your client is actually sending the body.

1

Example: Fetch a business by Google Place ID

Endpoint
GET https://api.openmart.ai/api/v1/business_records/list/google_place_id

cURL request

cURL
curl --request GET \
  --url https://api.openmart.ai/api/v1/business_records/list/google_place_id \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '["ChIJfeiVPq-AhYARoD84VjA_-Tg"]'

Response example

JSON
{
  "ChIJfeiVPq-AhYARoD84VjA_-Tg": {
    "brand_id": "cc7eb8ef-8a51-4a53-a1ab-d2a39c163952",
    "store_id": "54ff8cd5-7497-4f46-9c0c-c6b8c0d10d04",
    "business_name": "Curls are Fun",
    "root_domain": "antonioberducci.com",
    "city": "San Francisco",
    "state": "California",
    "country": "US",
    "from_sources": {
      "GOOGLE_MAP": {
        "id": "ChIJfeiVPq-AhYARoD84VjA_-Tg",
        "ref_url": "https://www.google.com/maps/place/?q=place_id:ChIJfeiVPq-AhYARoD84VjA_-Tg",
        "raw_associated_website": "http://www.antonioberducci.com/",
        "name": "Curls Are Fun"
      }
    }
  }
}

Key elements of the API response

Response element
object keyed by google_place_id
Description
Map from each input ID to its business record. IDs that do not match any record are OMITTED. The key is the place_id, not the Openmart ID — the server derives it by stripping the "GOOGLE_MAP@" prefix from the source_id.
Response element
<place_id>.from_sources.GOOGLE_MAP.id
Description
Echoes the Google place_id you supplied (useful for cross-checking the returned key).
Response element
<place_id>.business_name / root_domain / etc.
Description
Same shape as POST /api/v1/search results — see that page for the full field list.

All request parameters

Request body for GET /api/v1/business_records/list/google_place_id.

Request body

This endpoint takes a raw JSON array as the request body (no wrapper object).

body (raw JSON array)array[string]Required: Yes
Example: ["ChIJfeiVPq-AhYARoD84VjA_-Tg"]

Array of 1–100 Google Place IDs. IDs without a matching record are omitted from the response.

cURL example
cURL
curl --request GET \
  --url https://api.openmart.ai/api/v1/business_records/list/google_place_id \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '["ChIJfeiVPq-AhYARoD84VjA_-Tg","ChIJN1t_tDeuEmsRUsoyG83frY4"]'

If this request fails

Match the error number or message in the response, then use the action below.

Error 400 / 422“... is required” or another field error
Read the error or detail field, then fix the named input.
Error 401“Invalid API Key”
Check the complete key and authentication header.
Error 402“Credit limit reached”
Check the team balance before trying again.
Error 403“Forbidden” or “not allowed”
Check whether this key and account can use the action.
Error 404“Not Found”
Check the API address, version, and GET, POST, or DELETE method.
Error 429“Too many requests”
Wait, then retry with fewer requests running at once.
Error 500–504Server error or timeout
Wait briefly and retry. Avoid duplicating an async job.

See Troubleshooting & FAQ for step-by-step help and the information to include when asking for support.