Location Capability¶
The Location capability lets platforms discover, search, and look up a business's physical locations — stores, restaurants, pickup lockers. It is vertical-agnostic and serves flows such as:
- Local pickup: finding nearby stores that offer pickup, seeing their opening hours and where the chosen items are available.
- Service-area check: learning whether a location can serve a buyer's
address (the
servesrelation).
The capability is optional: no other BCP capability depends on it.
| Capability | Description |
|---|---|
br.dev.bcp.common.location.search |
Search by free text, explicit spatial relations (distance, serves), and filters (hours, amenities, items). |
br.dev.bcp.common.location.lookup |
Lookup of one or more locations by identifier, optionally refined by the same relations and filters. |
Discovery¶
{
"ucp": {
"version": "2026-11-16",
"capabilities": {
"br.dev.bcp.common.location.search": [
{
"version": "2026-11-16",
"spec": "https://bcp.dev.br/draft/specification/location",
"schema": "https://bcp.dev.br/draft/schemas/common/location_search.json"
}
],
"br.dev.bcp.common.location.lookup": [
{
"version": "2026-11-16",
"spec": "https://bcp.dev.br/draft/specification/location",
"schema": "https://bcp.dev.br/draft/schemas/common/location_lookup.json"
}
]
}
}
}
Key Concepts¶
- Location: a physical entity that can be found on a map, with a name, address, opening hours, and geographic coordinates.
- Amenities: static features, services, or facilities of the location, in a map keyed by reverse-DNS identifier. See Amenity Vocabulary.
- Item availability: the
itemsfilter asks whether the business can supply now all the referenced items at a location. Returning the location is a coarse, provisional assertion, not per-item detail or a reservation. - Proximity and service: two explicit, distinct spatial relations —
distance(an inclusive radius around a point provided by the platform) andserves(whether the location can serve a provided target). The business is authoritative overserves, and the protocol does not expose the coverage geometry. - Opening hours: a weekly schedule (
hours) and date-specific exceptions (exception_hours), interpreted in the location'stimezone.
Relationship to Other Capabilities¶
- Stable identifiers. Search and lookup return
Location.idvalues that are stable within the business's scope. The ID selects only the physical entity; it does not determine a fulfillment mode, guarantee availability, or fix terms. Downstream capabilities negotiate and revalidate everything — for example, an ID submitted asselected_destination_idin the fulfillment extension. - Provisional discovery, authoritative checkout. Location responses reflect the business's current conditions at query time and are not a commitment. Final location-dependent terms (such as pickup) MUST be negotiated at checkout; discovery signals SHOULD NOT be cached or reused across sessions without revalidation.
Opening Hours¶
Representation¶
hoursis a list of regular weekly intervals withday,opens, andcloses.dayis the stable identifier of the day the interval starts (monday…sunday), not localized text; the platform MAY translate it for presentation. Times inHH:MM, 24-hour.exception_hoursis a list of date-specific intervals or full closures, with inclusive local boundsvalid_fromandvalid_through(YYYY-MM-DD). Withopensandcloses, it is an interval; without both, it is a full closure.titleis only a presentation label.timezoneis the IANA identifier of the location's canonical time zone (for exampleAmerica/Sao_Paulo).
Evaluation¶
Intervals are open at opens and closed at closes (10:00–17:00 is open
immediately before 17:00 and closed at 17:00). If closes is earlier than
opens, the interval crosses midnight. The exact pair 00:00–23:59
represents the whole civil day; pairs with opens equal to closes are
invalid.
- Several
hoursentries on the samedayform split shifts. An omitted day starts no regular interval. Absenthoursmeans an unknown schedule, not closed. - An exception replaces the regular schedule on each covered date. Exception ranges that overlap without being identical are invalid; entries with identical bounds can coexist as split shifts, but a full closure stands alone. Array order gives no precedence.
- For a temporary closure, the business keeps
hoursand adds anexception_hoursentry withoutopens/closes.
Business. When emitting hours or exception_hours, the business MUST
express all values in the location's canonical time zone, MUST include a
valid IANA timezone, MUST NOT vary the time zone by requester, and
MUST emit only schedules that follow the rules above.
Platform. The platform MUST evaluate the schedule in the returned
timezone, MAY convert concrete occurrences to another time zone for
presentation, MUST NOT infer that a location with an absent or invalid
schedule is open, and MUST NOT use title to decide whether it is open.
{
"id": "loc_paulista",
"name": "Paulista Store",
"timezone": "America/Sao_Paulo",
"exception_hours": [
{
"title": "Christmas Eve",
"valid_from": "2026-12-24",
"valid_through": "2026-12-24",
"opens": "09:00",
"closes": "14:00"
},
{
"title": "Christmas",
"valid_from": "2026-12-25",
"valid_through": "2026-12-25"
}
]
}
Amenities¶
Responses represent amenities as a map keyed by identifier. The business
MUST provide in each entry a non-empty, plain-text, buyer-facing
description — preferably a short, localized label. An entry without
description is schema-invalid, and the platform MUST reject the response
rather than infer text from the key.
The description is enough to present any amenity. The platform MAY enrich
recognized amenities with icons or grouping, but MUST NOT suppress an entry
merely because it does not recognize the identifier, nor infer semantics from
an unknown identifier.
Amenity Vocabulary¶
BCP defines an open, reverse-DNS vocabulary. The business SHOULD use a well-known identifier when it accurately describes the amenity and MAY define others in a namespace it controls. Non-exhaustive list:
| Identifier | Domain | Definition |
|---|---|---|
br.dev.bcp.amenity.wi_fi |
Common | Wireless internet accessible to the buyer on site. |
br.dev.bcp.amenity.parking |
Common | Dedicated on-site parking. |
br.dev.bcp.amenity.shopping.curbside_pickup |
Retail | Spaces for pickup without entering the store. |
br.dev.bcp.amenity.shopping.in_store_pickup |
Retail | Pickup counter or area inside the store. |
Search¶
br.dev.bcp.common.location.search searches locations by free text, explicit
spatial relations, context, and filters.
Request¶
Request body for location search. The distance and serves relations and every supplied filters predicate combine with AND; query does not relax them.
| Name | Type | Required | Description |
|---|---|---|---|
| query | string | No | Free-text search query for natural language location search (e.g., 'restaurants near me that deliver', 'hotels with pool'). |
| context | object | No | Provisional buyer signals for relevance and localization—not authoritative data. Businesses SHOULD use these values when verified inputs (e.g., shipping address) are absent, and MAY ignore or down-rank them if inconsistent with higher-confidence signals (authenticated account, risk detection) or regulatory constraints (export controls). Eligibility and policy enforcement MUST occur at checkout time using binding transaction data. Context SHOULD be non-identifying and can be disclosed progressively—coarse signals early, finer resolution as the session progresses. Higher-resolution data (shipping address, billing address) supersedes context. |
| signals | object | No | Environment data provided by the platform to support authorization and abuse prevention. Values MUST NOT be buyer-asserted claims — platforms provide signals based on direct observation or independently verifiable third-party attestations. All signal keys MUST use reverse-domain naming to ensure provenance and prevent collisions when multiple extensions contribute to the shared namespace. |
| distance | object | No | Optional explicit-center radius predicate. When present, it combines with serves and every supplied filters predicate using AND. |
| serves | object | No | Optional authoritative service-target predicate. When present, it combines with distance and every supplied filters predicate using AND. |
| filters | object | No | Filter criteria to narrow Location Search and Lookup results. All supplied filters combine with AND. |
| pagination | object | No | Pagination parameters for requests. |
Response¶
| Name | Type | Required | Description |
|---|---|---|---|
| ucp | any | Yes | BCP metadata for location responses. |
| locations | Array[object] | Yes | Locations matching the search criteria. |
| pagination | object | No | Pagination information in responses. |
| messages | Array[object] | No | Errors, warnings, or informational messages about the search results. |
Request Grammar¶
| Input | Meaning |
|---|---|
query |
Free-text retrieval ("grocery store near me that delivers"). |
distance |
Relation between the candidate location and a center with an inclusive radius, provided by the platform. |
serves |
Relation between the candidate location and an explicit service target provided by the platform. |
filters |
Predicates over location facts: hours, amenities, items, and extension filters. |
context / signals |
Provisional hints for relevance and localization; never spatial proof. |
pagination |
Shape of the results page. |
Every explicit structured constraint is conjunctive:
The business MAY use query to narrow and rank results as text retrieval,
but MUST NOT treat the text as creating a distance/serves relation or a
filter, nor relax an explicit constraint because of it.
Bounded browsing. A request without a spatial relation is valid: {},
only context/signals, only pagination, or only filters are a browse
bounded by the business's default selection — never a spatial assertion or an
export. Context hints and IP-derived locality MAY influence ranking, but
MUST NOT be treated as proof of proximity or service.
Rejection and empty results. A request that fails the schema uses the
binding's invalid-request mechanism, which also carries the semantic errors for
distance, serves, and unsupported filters. A valid search with no results
MUST return an empty locations; it is not an error and requires no
message.
distance¶
See Location Distance in the Schema Reference for the canonical field definition.
- The platform MUST provide
distance.centerwhenever it sendsdistance; the business MUST NOT derive the center fromcontext,signals, IP, orserves. - The distance is the shortest geodesic on the WGS 84 ellipsoid between the
center and the location's authoritative
geo, in meters. The business MUST compare the unrounded value withdistance.max(equality matches) and MUST NOT apply tolerance, swap operands, cap the radius, or use route distance. - A business that cannot honor the requested
distance.maxMUST reject with an actionable error, without silently reducing the radius. - A location without usable
geodoes not match (not an error). The relation implies no ordering by distance.
serves¶
See Location Serves in the Schema Reference for the canonical field definition.
servesis a map with one entry:point(a WGS 84 coordinate),address(a coarse locality, with at least one ofaddress_country,address_region, orpostal_codenon-empty), or a negotiated extension target.- The explicit target is authoritative. Omitting
servescreates no implicit check, and the business MUST NOT derive a target fromcontext,signals, or IP. - A location matches when at least one fulfillment method available there can, provisionally, serve the target. This does not expose coverage geometry, reserve capacity, or guarantee checkout.
- A business that cannot evaluate a well-formed target (for example, a postal code system it does not model) MUST return an actionable error, without falling back to a coarser interpretation.
- A location that matches
servesandfilters.itemssatisfies each independently — it does not prove that the same method delivers those items to that target.
Filters¶
See Location Filter in the Schema Reference for the canonical field definition.
All filters combine with AND. A business that receives a filter it does not support MUST reject the request with an actionable error, without ignoring it.
hours.open_at: an RFC 3339 instant (withZor an offset). The business MUST evaluate it exactly as sent, converted to the location'stimezone, and return the location only if it can establish that it is open at that instant.amenities: the location matches only if its amenity map contains all requested keys, by exact equality (prefixes are not wildcards). The business MUST include each requested key in the map of every returned location; the platform MUST reject as non-conformant a location that omits it.items: a non-empty array of distinct item identifiers. The location matches only if the business can supply now all the items there. An unknown, unavailable, or unevaluable item makes the location not match (no diagnostic). The result does not evaluate quantities, choose a fulfillment method, reserve items, or predict future availability; the business MUST revalidate everything later.
Pagination¶
limit is the requested page size, not a guaranteed one. Without limit, the
business MUST apply a default (10 is RECOMMENDED) and MAY return
fewer results; the platform MUST NOT assume the count equals the request.
This never authorizes reducing distance.max. Cursors are opaque.
Example: Grocery Stores Serving a Point and Open at an Instant¶
{
"query": "grocery store near me",
"context": {
"address_country": "BR",
"address_region": "SP",
"postal_code": "01310-100"
},
"serves": {
"point": { "latitude": -23.5614, "longitude": -46.6559 }
},
"filters": {
"hours": { "open_at": "2026-05-18T13:00:00Z" },
"amenities": ["br.dev.bcp.amenity.shopping.curbside_pickup"]
}
}
{
"ucp": {
"version": "2026-11-16",
"capabilities": {
"br.dev.bcp.common.location.search": [
{ "version": "2026-11-16" }
]
}
},
"locations": [
{
"id": "loc_paulista",
"name": "Example Market Paulista",
"address": {
"street_address": "Avenida Paulista, 1000",
"address_locality": "São Paulo",
"address_region": "SP",
"address_country": "BR",
"postal_code": "01310-100"
},
"geo": { "latitude": -23.5630, "longitude": -46.6543 },
"amenities": {
"br.dev.bcp.amenity.shopping.curbside_pickup": {
"description": "Pickup without leaving your car"
},
"br.dev.bcp.amenity.parking": {
"description": "On-site parking"
},
"com.example.amenity.montagem": {
"description": "Furniture assembly by appointment"
}
},
"timezone": "America/Sao_Paulo",
"hours": [
{ "day": "monday", "opens": "08:00", "closes": "22:00" }
]
}
]
}
At the provided instant it is Monday, 10:00 in America/Sao_Paulo, within the
returned interval. The custom amenity remains presentable from its
description, with no standardized meaning.
Lookup¶
br.dev.bcp.common.location.lookup resolves identifiers into locations: in
batch or a single location (useful for a detail page).
Identifiers¶
ids accepts an array of identifiers. The business MUST accept the
canonical Location.id and MAY accept aliases. The business MUST
deduplicate identifiers and return each location only once.
Correlation. Response order is not guaranteed. Each location carries
inputs, with one entry per requested identifier that resolved to it (id
copied exactly from the request). The business MUST NOT include a location
without an inputs entry.
Batch size. The business SHOULD accept at least 10 identifiers and
MAY impose a maximum (counted after deduplication). Above it, the business
MUST process the first distinct identifiers, in request order, and include
an info message with code: "batch_limit_applied" stating the maximum and
how many were not processed. Unprocessed identifiers are not "not found"; the
platform MAY send them in a new request.
Refinement. After resolving the identifiers, optional distance, serves,
and filters refine the set, with the same semantics as search,
combined with AND. An identifier that does not resolve, or a location that
fails a criterion, simply does not appear; the request still succeeds. The
business MAY attach a not_found info message for an unresolved
identifier.
Request¶
Request body for batch location lookup. The Business resolves and deduplicates ids before applying distance, serves, and every supplied filters predicate; all structured predicates combine with AND.
| Name | Type | Required | Description |
|---|---|---|---|
| ids | Array[string] | Yes | Identifiers of the Locations to look up. The Business MUST support canonical Location.id values and MAY support secondary or alias identifiers. |
| distance | object | No | Optional explicit-center radius predicate applied after ID resolution. It combines with serves and every supplied filters predicate using AND. |
| serves | object | No | Optional authoritative service-target predicate applied after ID resolution. It combines with distance and every supplied filters predicate using AND. |
| filters | object | No | Filter criteria to narrow Location Search and Lookup results. All supplied filters combine with AND. |
| context | object | No | Provisional buyer signals for relevance and localization—not authoritative data. Businesses SHOULD use these values when verified inputs (e.g., shipping address) are absent, and MAY ignore or down-rank them if inconsistent with higher-confidence signals (authenticated account, risk detection) or regulatory constraints (export controls). Eligibility and policy enforcement MUST occur at checkout time using binding transaction data. Context SHOULD be non-identifying and can be disclosed progressively—coarse signals early, finer resolution as the session progresses. Higher-resolution data (shipping address, billing address) supersedes context. |
| signals | object | No | Environment data provided by the platform to support authorization and abuse prevention. Values MUST NOT be buyer-asserted claims — platforms provide signals based on direct observation or independently verifiable third-party attestations. All signal keys MUST use reverse-domain naming to ensure provenance and prevent collisions when multiple extensions contribute to the shared namespace. |
Response¶
| Name | Type | Required | Description |
|---|---|---|---|
| ucp | any | Yes | BCP metadata for location responses. |
| locations | Array[Location] | Yes | Locations matching the requested identifiers and refinements. May contain fewer Locations if some identifiers do not resolve or their resolved Locations are filtered out, or more if one identifier resolves to multiple Locations. When multiple identifiers resolve to the same Location, one returned Location carries all corresponding inputs entries. |
| messages | Array[object] | No | Errors, warnings, or informational messages about the requested Locations, including batch_limit_applied when the Business processes only its configured maximum number of identifiers. |
Example: Canonical Identifier and Alias¶
{
"ucp": {
"version": "2026-11-16",
"capabilities": {
"br.dev.bcp.common.location.lookup": [
{ "version": "2026-11-16" }
]
}
},
"locations": [
{
"id": "loc_paulista",
"inputs": [
{ "id": "loc_paulista" },
{ "id": "loja-paulista" }
],
"name": "Paulista Store",
"timezone": "America/Sao_Paulo",
"hours": [
{ "day": "monday", "opens": "09:00", "closes": "21:00" },
{ "day": "tuesday", "opens": "09:00", "closes": "12:00" },
{ "day": "tuesday", "opens": "13:00", "closes": "21:00" },
{ "day": "saturday", "opens": "10:00", "closes": "18:00" }
],
"exception_hours": [
{ "title": "Christmas", "valid_from": "2026-12-25", "valid_through": "2026-12-25" }
]
}
]
}
The two Tuesday entries form a split shift; Sunday has no regular interval; the
exception without opens/closes is a full closure.
Example: Partial Success¶
{
"ucp": {
"version": "2026-11-16",
"capabilities": {
"br.dev.bcp.common.location.lookup": [
{ "version": "2026-11-16" }
]
}
},
"locations": [
{
"id": "loc_paulista",
"inputs": [{ "id": "loc_paulista" }],
"name": "Paulista Store"
}
],
"messages": [
{
"type": "info",
"code": "not_found",
"content": "We could not find the location associated with loc_inexistente."
}
]
}
Shared Entities¶
Location¶
See Location in the Schema Reference for the canonical field definition.
Context¶
Optional hints about the buyer's location and market, for relevance and
localization only. The business MUST NOT use them in place of explicit
distance, serves, or filters.items operands.
See Context in the Schema Reference for the canonical field definition.
Messages¶
| Type | When to use | Example codes |
|---|---|---|
error |
Business errors | Business-defined codes |
warning |
Important condition | permanently_closed, temporary_closure |
info |
Diagnostics or context that does not fail the operation | not_found, holiday_hours_active, batch_limit_applied |
Transport¶
The operations are transport-neutral payloads. The upstream REST
(POST /locations/search, POST /locations/lookup) and MCP
(search_locations, lookup_locations) bindings are not vendored in this BCP
release, like the other services/ files.
Security and Privacy¶
- Coarse by default. Platforms SHOULD send coarse location hints (postal code, rounded coordinates) during discovery and share precise location only with buyer consent or when the buyer chooses a location.
- Availability probing. Businesses SHOULD rate-limit requests with
filters.items. - Internal locations. Businesses MUST exclude from results locations not accessible to the buyer (ghost kitchens, distribution centers).
- Address integrity. Platforms SHOULD verify signatures on location payloads before displaying them.
- Retention. Businesses MUST NOT retain precise location beyond the request lifecycle without explicit buyer consent (see also the buyer consent extension); logs SHOULD truncate coordinates (for example, two decimal places, ~1 km).