Citera home
Browse documentation

Local

Local

Read locations, run Local, and manage recommendations and location data.

Summarize with AIChatGPTClaudePerplexity

Product response envelope

Current product endpoints return a resource envelope: data.object, data.brand_id, data.page, and nested data.data containing the dashboard data. Pagination fields for these endpoints are inside data.data. Unknown measurements remain null; verified zeros remain 0. Sensitive values are redacted.

Write operations require the appropriate scopes on your key. Draft and calendar edits do not publish content. External effects require the confirmation rules described below.

All Local endpoints require the local_geo plan feature.

GET …/local (local:read), operation get_local

Query: run_id (optional UUID in the brand), limit (default 50), offset cursor. data: runs, locations, recommendations and — with run_id — that run’s observations, scorecards, trends. Empty measurements are not proof of success.

POST …/local/runs (local:write), operation run_local

Body: { "confirm": true }. Costs 5 credits. Uses enqueue_local_geo_run, which reuses an active run and enforces the plan, confirmed locations and the 24-hour manual-run limit (429 rate_limited). Returns { run_id, poll_with: "rankad_get_local", job_system: "local_geo_runs" }. Poll GET …/local?run_id=…, not /jobs.

PATCH …/local/recommendations/{recommendation_id}, operation set_local_recommendation_status

Body: { "status": "open" | "done" | "dismissed" }. Records the customer decision; it does not claim the issue was measured as resolved.

POST …/local/locations / PATCH …/local/locations/{location_id}, operations create_local_location / update_local_location

Body field

Rules

name, city

required, 1–200 chars

country_code

required, ISO 3166-1 alpha-2 uppercase

services

required array (≤ 50, each 1–200 chars)

geo_source

required: dataset | manual | none

needs_confirmation

required boolean

region (≤ 200), address (≤ 500)

optional, nullable

latitude (−90..90), longitude (−180..180)

optional, nullable

has_storefront

optional boolean

pinned_place_id (≤ 300), pinned_cid (≤ 100)

optional, nullable

status

optional: active | paused

The same schema is used for PATCH, so send the full required set. The database enforces the active-location plan cap (429 quota_exceeded). Saving a location does not run a scan.

Request examples

Choose a language for each endpoint. Set your assigned HTTPS API origin and environment variables, then replace the <placeholders>. These examples do not run requests in your browser.

GET/v1/brands/{brand_id}/local

Required scope: local:read · Response: 200

: "${CITERA_API_BASE_URL:?Set CITERA_API_BASE_URL}"
: "${CITERA_API_KEY:?Set CITERA_API_KEY}"
: "${BRAND_ID:?Set BRAND_ID}"
curl --fail-with-body --connect-timeout 10 --max-time 30 -X GET "${CITERA_API_BASE_URL%/}/v1/brands/${BRAND_ID}/local" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer ${CITERA_API_KEY}"
POST/v1/brands/{brand_id}/local/runs

Required scope: local:write · Response: 200

This is a write operation. Review the body and confirmation requirements before running it.

: "${CITERA_API_BASE_URL:?Set CITERA_API_BASE_URL}"
: "${CITERA_API_KEY:?Set CITERA_API_KEY}"
: "${BRAND_ID:?Set BRAND_ID}"
# Review this write and replace every <placeholder> before running.
curl --fail-with-body --connect-timeout 10 --max-time 30 -X POST "${CITERA_API_BASE_URL%/}/v1/brands/${BRAND_ID}/local/runs" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer ${CITERA_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"confirm":true}'
PATCH/v1/brands/{brand_id}/local/recommendations/{recommendation_id}

Required scope: local:write · Response: 200

This is a write operation. Review the body and confirmation requirements before running it.

: "${CITERA_API_BASE_URL:?Set CITERA_API_BASE_URL}"
: "${CITERA_API_KEY:?Set CITERA_API_KEY}"
: "${BRAND_ID:?Set BRAND_ID}"
: "${RECOMMENDATION_ID:?Set RECOMMENDATION_ID}"
# Review this write and replace every <placeholder> before running.
curl --fail-with-body --connect-timeout 10 --max-time 30 -X PATCH "${CITERA_API_BASE_URL%/}/v1/brands/${BRAND_ID}/local/recommendations/${RECOMMENDATION_ID}" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer ${CITERA_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"status":"done"}'
POST/v1/brands/{brand_id}/local/locations

Required scope: local:write · Response: 200

This is a write operation. Review the body and confirmation requirements before running it.

: "${CITERA_API_BASE_URL:?Set CITERA_API_BASE_URL}"
: "${CITERA_API_KEY:?Set CITERA_API_KEY}"
: "${BRAND_ID:?Set BRAND_ID}"
# Review this write and replace every <placeholder> before running.
curl --fail-with-body --connect-timeout 10 --max-time 30 -X POST "${CITERA_API_BASE_URL%/}/v1/brands/${BRAND_ID}/local/locations" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer ${CITERA_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"name":"Main location","city":"Trollhättan","country_code":"SE","services":["Marketing consulting"],"geo_source":"none","needs_confirmation":true}'
PATCH/v1/brands/{brand_id}/local/locations/{location_id}

Required scope: local:write · Response: 200

This is a write operation. Review the body and confirmation requirements before running it.

: "${CITERA_API_BASE_URL:?Set CITERA_API_BASE_URL}"
: "${CITERA_API_KEY:?Set CITERA_API_KEY}"
: "${BRAND_ID:?Set BRAND_ID}"
: "${LOCATION_ID:?Set LOCATION_ID}"
# Review this write and replace every <placeholder> before running.
curl --fail-with-body --connect-timeout 10 --max-time 30 -X PATCH "${CITERA_API_BASE_URL%/}/v1/brands/${BRAND_ID}/local/locations/${LOCATION_ID}" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer ${CITERA_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"name":"Main location","city":"Trollhättan","country_code":"SE","services":["Marketing consulting"],"geo_source":"none","needs_confirmation":true}'