{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"Before + After anonymous public reads","version":"1.0.0","description":"Eleven bounded, read-only public operations. Every operation carries its limits as `x-rate-limit`, `x-response-byte-max`, `x-timeout-ms` and, when it reads a body, `x-request-byte-max`. Operations whose `x-rate-limit` names the same `bucket` share one count. They do not provide medical advice, hold times, guarantee prices or availability, or authorize identity, consent, booking, or payment actions. A human must use the hosted Before + After experience for every consequential action."},"servers":[{"url":"https://trybeforeandafter.com"}],"security":[],"paths":{"/api/ai-search":{"post":{"operationId":"search","summary":"Search public providers","description":"Returns bounded public provider slugs. Natural-language input stays in JSON rather than a URL. Parser refusal is represented by parseOk=false and does not claim a match.","security":[],"x-read-only":true,"x-rate-limit":{"limit":20,"windowSeconds":60,"key":"trusted client IP","bucket":"ai_search_client"},"x-request-byte-max":8192,"x-response-byte-max":32768,"x-timeout-ms":10000,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"},"example":{"query":"gentle treatment options under $400","market":"austin"}}}},"responses":{"200":{"description":"Bounded eligible-provider result. This is discovery output, not medical advice or a booking guarantee.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"},"example":{"providerSlugs":["synthetic-provider"],"relaxed":["price"],"parseOk":true}}}},"400":{"$ref":"#/components/responses/SearchInvalidRequest"},"415":{"$ref":"#/components/responses/SearchUnsupportedMediaType"},"429":{"$ref":"#/components/responses/SearchRateLimited"},"500":{"$ref":"#/components/responses/SearchInternalError"}}}},"/api/brands/{provider-slug}/offer":{"post":{"operationId":"get_offer","summary":"Read one verified public offer","description":"Returns one bounded public fixed-total offer and its provenance: an active Service with a current price check, one flat total in cents, never a per-unit, per-area, consultation or ranged price. Anything else is not offered (404).","security":[],"x-read-only":true,"x-rate-limit":{"limit":60,"windowSeconds":60,"key":"trusted client IP","bucket":"agent_offer_client"},"x-request-byte-max":1024,"x-response-byte-max":2048,"x-timeout-ms":5000,"parameters":[{"name":"provider-slug","in":"path","required":true,"description":"Canonical public provider slug.","schema":{"$ref":"#/components/schemas/ProviderSlug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferRequest"},"examples":{"unambiguous":{"value":{}},"serviceSelected":{"value":{"service":"Example service"}}}}}},"responses":{"200":{"description":"One current fixed-total offer. Direct the human to the hosted experience to reserve it.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOffer"},"example":{"providerSlug":"synthetic-provider","providerName":"Synthetic Provider","serviceName":"Example service","priceMinCents":12000,"priceMaxCents":null,"priceUnit":"flat","pricingVerifiedAt":"2026-08-01T00:00:00.000Z","priceValidUntil":"2027-01-28T00:00:00.000Z","pricingSource":"operator_verified","freshness":"current"}}}},"400":{"$ref":"#/components/responses/OfferInvalidRequest"},"404":{"$ref":"#/components/responses/OfferNotFound"},"415":{"$ref":"#/components/responses/OfferUnsupportedMediaType"},"429":{"$ref":"#/components/responses/OfferRateLimited"},"500":{"$ref":"#/components/responses/OfferInternalError"}}}},"/api/brands/{slug}/availability":{"get":{"operationId":"check_availability","summary":"Check observed public availability","description":"Returns a fresh bounded observation or an explicit empty fallback. Slots are observations at fetchedAt, not holds or booking promises. Re-probe observations older than 60 seconds before representing them as current.","security":[],"x-read-only":true,"x-rate-limit":{"limit":60,"windowSeconds":60,"key":"trusted client IP","bucket":"availability_client","refusal":"HTTP 200 safe error fallback"},"x-response-byte-max":32768,"x-timeout-ms":14000,"x-cache-results":false,"parameters":[{"name":"slug","in":"path","required":true,"description":"Canonical public provider slug.","schema":{"$ref":"#/components/schemas/ProviderSlug"}},{"name":"service","in":"query","required":true,"description":"Exactly one canonical public Service name. Duplicate or normalized values are rejected.","schema":{"$ref":"#/components/schemas/AvailabilityService"}},{"name":"from","in":"query","required":false,"description":"Optional canonical UTC instant with milliseconds. Duplicate values are rejected.","schema":{"$ref":"#/components/schemas/CanonicalInstant"}},{"name":"days","in":"query","required":false,"description":"Optional whole-day window. Duplicate and non-canonical numeric values are rejected.","schema":{"type":"integer","minimum":1,"maximum":14,"default":7}}],"responses":{"200":{"description":"A bounded live observation or explicit empty fallback. Any fallbackReason forbids a live-availability claim.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAvailabilityResponse"},"examples":{"live":{"value":{"slug":"synthetic-provider","integrated":true,"fetchedAt":"2026-09-01T12:00:00.000Z","dates":[{"date":"2026-09-02","slots":[{"startAt":"2026-09-02T14:00:00.000Z"}]}]}},"fallback":{"value":{"slug":"synthetic-provider","integrated":false,"fetchedAt":"2026-09-01T12:00:00.000Z","dates":[],"fallbackReason":"not_integrated"}}}}}},"400":{"$ref":"#/components/responses/AvailabilityInvalidRequest"},"404":{"$ref":"#/components/responses/AvailabilityNotFound"}}}},"/api/agent-catalog/v1/shortlist":{"get":{"operationId":"shortlist_providers","summary":"Shortlist public providers with evidence","description":"Returns the public market page's own list for the same market, treatment, budget and sort, cut to 20, with request-open facts. Every claim names its evidence and observation time or is explicitly unavailable; nothing missing is a negative fact. Unsupported claims are refused with stable reasons. No model, scheduler, or vendor is called. To start from a customer's words, POST them to this path instead.","security":[],"x-read-only":true,"x-contract":"bna.agent-catalog.shortlist.v1","x-rate-limit":{"limit":30,"windowSeconds":60,"key":"trusted client IP","bucket":"agent_shortlist_client"},"x-response-byte-max":65536,"x-timeout-ms":5000,"x-max-providers":20,"parameters":[{"name":"market","in":"query","required":true,"description":"Canonical public market slug.","schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},{"name":"treatment","in":"query","required":false,"description":"Treatment taxonomy slug. A slug outside the taxonomy is refused (treatment_not_in_taxonomy), never guessed.","schema":{"type":"string","maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},{"name":"budgetMax","in":"query","required":false,"description":"Whole-dollar total budget. Excludes only flat prices above it, as the public page does.","schema":{"type":"string","pattern":"^[1-9][0-9]{0,5}$"}},{"name":"sort","in":"query","required":false,"description":"The public page's sort.","schema":{"enum":["ba_score","price","rating","reviews"],"default":"ba_score"}},{"name":"claims","in":"query","required":false,"description":"Up to 8 distinct comma-separated claim names the caller wants answered beyond the standard claims. Each is refused with a stable reason.","schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}(?:,[a-z][a-z0-9_]{0,39}){0,7}$"}}],"responses":{"200":{"description":"The shortlist.","headers":{"Cache-Control":{"$ref":"#/components/headers/PublicMaxAge"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortlistResponse"},"example":{"contract":"bna.agent-catalog.shortlist.v1","observedAt":"2026-10-01T12:00:00.000Z","maxAgeSeconds":60,"intent":{"market":"austin","treatment":"botox","budgetMaxDollars":400,"sort":"ba_score"},"interpretation":null,"market":{"slug":"austin","name":"Austin","live":true},"humanUrl":"https://trybeforeandafter.com/austin?treatments=botox&priceMax=400","totalMatched":1,"truncated":false,"providers":[{"rank":1,"providerSlug":"synthetic-provider","providerName":"Synthetic Provider","neighborhood":null,"profileUrl":"https://trybeforeandafter.com/synthetic-provider","claims":{"offer":{"status":"supported","value":{"serviceName":"Botox","treatment":"botox","priceMinCents":35000,"priceMaxCents":null,"priceUnit":"flat","pricingSource":"operator_verified","checkedByBna":true},"evidence":{"kind":"service_price_check","basis":"record","ref":"ev_000000000000000000000000","observedAt":"2026-09-20T00:00:00.000Z","validUntil":"2027-03-19T00:00:00.000Z"}},"withinBudget":{"status":"supported","value":true,"evidence":{"kind":"service_price_check","basis":"record","ref":"ev_000000000000000000000000","observedAt":"2026-09-20T00:00:00.000Z","validUntil":"2027-03-19T00:00:00.000Z"}},"requestsOpen":{"status":"supported","value":false,"evidence":{"kind":"request_gate","basis":"live_read","ref":null,"observedAt":"2026-10-01T12:00:00.000Z","validUntil":null}},"bnaApproved":{"status":"unavailable","reason":"approval_time_not_recorded"},"googleRating":{"status":"unavailable","reason":"no_google_listing"}}}],"refusals":[{"subject":"claim","value":"available_now","reason":"live_availability_requires_check_availability"}]}}}},"400":{"$ref":"#/components/responses/ShortlistInvalidRequest"},"404":{"$ref":"#/components/responses/ShortlistMarketNotFound"},"429":{"$ref":"#/components/responses/ShortlistRateLimited"},"500":{"$ref":"#/components/responses/ShortlistInternalError"}}},"post":{"operationId":"shortlist_providers_from_request","summary":"Shortlist public providers from a customer's words","description":"Reads the customer's words with the deterministic interpreter `bna.shortlist-intent.lexicon.v1` (no model). Only three things become filters: a treatment named from the live taxonomy, a dollar budget given as an upper bound (\"under $400\", \"$400 or less\"), and a fixed sort phrase (\"cheapest\", \"top rated\", \"most reviews\"). It then returns exactly the `shortlist_providers` result for that intent. A refusal with subject `request` says when the words held a treatment, money figure or sort it could not read (including rates such as \"$12 per unit\" and non-dollar amounts), named more than one treatment or sort, or negated one; claims the contract never makes (availability, credentials, insurance, financing, guarantees, medical judgment, \"best\") are refused with stable reasons. Any other preference in the words (a neighborhood, a style, a day or time it did not recognise) is not a filter and is not reported: never present it as satisfied by this list. The words are never echoed, and every response is `no-store`.","security":[],"x-read-only":true,"x-contract":"bna.agent-catalog.shortlist.v1","x-rate-limit":{"limit":30,"windowSeconds":60,"key":"trusted client IP","bucket":"agent_shortlist_client"},"x-request-byte-max":4096,"x-response-byte-max":65536,"x-timeout-ms":5000,"x-intent-method":"bna.shortlist-intent.lexicon.v1","x-model-calls":0,"x-max-providers":20,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortlistRequest"},"example":{"market":"austin","request":"top rated botox under $400, open now"}}}},"responses":{"200":{"description":"The shortlist for the intent the words support.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortlistResponse"},"example":{"contract":"bna.agent-catalog.shortlist.v1","observedAt":"2026-10-01T12:00:00.000Z","maxAgeSeconds":60,"intent":{"market":"austin","treatment":"botox","budgetMaxDollars":400,"sort":"rating"},"market":{"slug":"austin","name":"Austin","live":true},"humanUrl":"https://trybeforeandafter.com/austin?treatments=botox&priceMax=400&sort=rating","totalMatched":1,"truncated":false,"providers":[{"rank":1,"providerSlug":"synthetic-provider","providerName":"Synthetic Provider","neighborhood":null,"profileUrl":"https://trybeforeandafter.com/synthetic-provider","claims":{"offer":{"status":"supported","value":{"serviceName":"Botox","treatment":"botox","priceMinCents":35000,"priceMaxCents":null,"priceUnit":"flat","pricingSource":"operator_verified","checkedByBna":true},"evidence":{"kind":"service_price_check","basis":"record","ref":"ev_000000000000000000000000","observedAt":"2026-09-20T00:00:00.000Z","validUntil":"2027-03-19T00:00:00.000Z"}},"withinBudget":{"status":"supported","value":true,"evidence":{"kind":"service_price_check","basis":"record","ref":"ev_000000000000000000000000","observedAt":"2026-09-20T00:00:00.000Z","validUntil":"2027-03-19T00:00:00.000Z"}},"requestsOpen":{"status":"supported","value":false,"evidence":{"kind":"request_gate","basis":"live_read","ref":null,"observedAt":"2026-10-01T12:00:00.000Z","validUntil":null}},"bnaApproved":{"status":"unavailable","reason":"approval_time_not_recorded"},"googleRating":{"status":"unavailable","reason":"no_google_listing"}}}],"refusals":[{"subject":"claim","value":"available_now","reason":"live_availability_requires_check_availability"}],"interpretation":{"method":"bna.shortlist-intent.lexicon.v1"}}}}},"400":{"$ref":"#/components/responses/ShortlistInvalidRequest"},"404":{"$ref":"#/components/responses/ShortlistMarketNotFound"},"415":{"$ref":"#/components/responses/ShortlistUnsupportedMediaType"},"429":{"$ref":"#/components/responses/ShortlistRateLimited"},"500":{"$ref":"#/components/responses/ShortlistInternalError"}}}},"/api/agent-catalog/v1/services":{"get":{"operationId":"list_services","summary":"List a provider's public services","description":"Every active public service of one provider with its price, price unit and conditions as the profile shows them.","parameters":[{"name":"provider","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ProviderSlug"}}],"x-read-only":true,"x-contract":"bna.service-inventory.v1","x-rate-limit":{"limit":60,"windowSeconds":60,"key":"trusted client IP","bucket":"agent_offer_client"},"x-response-byte-max":262144,"x-timeout-ms":5000,"responses":{"200":{"description":"The provider's service inventory.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractDocument"}}}},"400":{"$ref":"#/components/responses/CatalogError"},"404":{"$ref":"#/components/responses/CatalogError"},"429":{"$ref":"#/components/responses/CatalogError"},"503":{"$ref":"#/components/responses/CatalogError"}},"security":[]}},"/api/agent-catalog/v1/services/{serviceId}":{"get":{"operationId":"get_service","summary":"Read one public service","description":"The same detail the service page renders: price and conditions, inclusions, service area, fulfillment, the human page and, when it can be requested or bought, the action link.","parameters":[{"name":"provider","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ProviderSlug"}},{"name":"serviceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"x-read-only":true,"x-contract":"bna.service-detail.v1","x-rate-limit":{"limit":60,"windowSeconds":60,"key":"trusted client IP","bucket":"agent_offer_client"},"x-response-byte-max":32768,"x-timeout-ms":5000,"responses":{"200":{"description":"One service.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractDocument"}}}},"400":{"$ref":"#/components/responses/CatalogError"},"404":{"$ref":"#/components/responses/CatalogError"},"429":{"$ref":"#/components/responses/CatalogError"},"503":{"$ref":"#/components/responses/CatalogError"}},"security":[]}},"/api/agent-catalog/v1/catalog":{"get":{"operationId":"find_services","summary":"Read a provider's service catalog","description":"The provider's services mapped to B+A's service vocabulary, with what each includes and where it is offered.","parameters":[{"name":"provider","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ProviderSlug"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":120},"description":"Optional words to rank offerings by."}],"x-read-only":true,"x-contract":"bna.service-catalog.v1","x-rate-limit":{"limit":60,"windowSeconds":60,"key":"trusted client IP","bucket":"agent_offer_client"},"x-response-byte-max":262144,"x-timeout-ms":5000,"responses":{"200":{"description":"The catalog.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractDocument"}}}},"400":{"$ref":"#/components/responses/CatalogError"},"404":{"$ref":"#/components/responses/CatalogError"},"429":{"$ref":"#/components/responses/CatalogError"},"503":{"$ref":"#/components/responses/CatalogError"}},"security":[]}},"/api/agent-catalog/v1/vocabulary":{"get":{"operationId":"get_service_vocabulary","summary":"Read the service vocabulary","description":"B+A's industries, categories and service names that catalog entries map to.","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":120},"description":"Optional words to rank offerings by."}],"x-read-only":true,"x-contract":"bna.service-vocabulary.v1","x-rate-limit":{"limit":60,"windowSeconds":60,"key":"trusted client IP","bucket":"agent_offer_client"},"x-response-byte-max":65536,"x-timeout-ms":5000,"responses":{"200":{"description":"The vocabulary.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractDocument"}}}},"400":{"$ref":"#/components/responses/CatalogError"},"429":{"$ref":"#/components/responses/CatalogError"},"503":{"$ref":"#/components/responses/CatalogError"}},"security":[]}},"/api/brands/{provider-slug}/checkout-offer":{"post":{"operationId":"get_checkout_offer","summary":"Price an order at a provider's checkout","description":"The exact total, terms and drop-off times the provider's checkout would show for a service, size and quantity. Nothing is held or charged; send the person to `checkoutUrl` to pay.","parameters":[{"name":"provider-slug","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ProviderSlug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"service":{"type":"string","maxLength":160},"size":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"},"quantity":{"type":"integer","minimum":1},"dropOff":{"type":"string","format":"date-time"},"grade":{"enum":["synthetic_blend","full_synthetic"]},"vehicle":{"type":"object","additionalProperties":false,"required":["year","make","model"],"properties":{"year":{"type":["string","integer"]},"make":{"type":"string","maxLength":40},"model":{"type":"string","maxLength":60},"engine":{"type":"string","maxLength":40}}}}}}}},"x-read-only":true,"x-contract":"bna.checkout-offer.v1","x-rate-limit":{"limit":60,"windowSeconds":60,"key":"trusted client IP","bucket":"agent_offer_client"},"x-request-byte-max":1024,"x-response-byte-max":16384,"x-timeout-ms":5000,"responses":{"200":{"description":"The priced order.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractDocument"}}}},"400":{"$ref":"#/components/responses/CatalogError"},"404":{"$ref":"#/components/responses/CatalogError"},"415":{"$ref":"#/components/responses/CatalogError"},"429":{"$ref":"#/components/responses/CatalogError"},"500":{"$ref":"#/components/responses/CatalogError"}},"security":[]}},"/api/agent-catalog/v1/vehicle-offers":{"get":{"operationId":"get_vehicle_offers","summary":"Get one car's offers at a provider","description":"Each offer a provider has for one car (year, make, model): its own page URL, title and price, from the same generator as the page and checkout. Wheel repair is priced per wheel by wheel size; an oil change is an exact total for that car and oil package, or discuss_with_provider with no price.","parameters":[{"name":"provider","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ProviderSlug"}},{"name":"year","in":"query","required":true,"schema":{"type":"string","pattern":"^(19[89]\\d|20\\d\\d)$"}},{"name":"make","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":60}},{"name":"model","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":60}}],"x-read-only":true,"x-contract":"bna.vehicle-offers.v1","x-rate-limit":{"limit":60,"windowSeconds":60,"key":"trusted client IP","bucket":"agent_offer_client"},"x-response-byte-max":32768,"x-timeout-ms":5000,"responses":{"200":{"description":"One car's offers at one provider.","headers":{"Cache-Control":{"$ref":"#/components/headers/PublicMaxAge"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractDocument"}}}},"400":{"$ref":"#/components/responses/CatalogError"},"404":{"$ref":"#/components/responses/CatalogError"},"429":{"$ref":"#/components/responses/CatalogError"},"503":{"$ref":"#/components/responses/CatalogError"}},"security":[]}}},"components":{"headers":{"NoStore":{"description":"The response must not be stored.","schema":{"type":"string","const":"no-store"}},"NoReferrer":{"description":"Do not send referrer information.","schema":{"type":"string","const":"no-referrer"}},"NoSniff":{"description":"Do not infer a different content type.","schema":{"type":"string","const":"nosniff"}},"NoIndex":{"description":"Do not index, follow, or archive the response.","schema":{"type":"string","const":"noindex, nofollow, noarchive"}},"RetryAfter":{"description":"Whole seconds until another request should be attempted.","schema":{"type":"string","pattern":"^[1-9]\\d*$"}},"PublicMaxAge":{"description":"Identical for every caller; may be reused for up to 60 seconds.","schema":{"type":"string","const":"public, max-age=60"}}},"schemas":{"ProviderSlug":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"SearchRequest":{"type":"object","additionalProperties":false,"required":["query","market"],"properties":{"query":{"type":"string","minLength":1,"maxLength":500,"x-utf8-byte-max":500,"description":"Natural-language discovery text. It is not medical advice input and is never returned in the response."},"market":{"type":"string","minLength":1,"maxLength":64,"enum":["austin","dallas","houston","san-antonio","los-angeles","new-york","miami","chicago","phoenix","denver","seattle","nashville"]}}},"SearchResponse":{"type":"object","additionalProperties":false,"required":["providerSlugs","relaxed","parseOk","hasBudgetFilter","hasWindowFilter","treatmentSlug","match","service","location"],"properties":{"providerSlugs":{"type":"array","maxItems":100,"items":{"type":"string","minLength":1,"maxLength":200}},"relaxed":{"type":"array","maxItems":3,"items":{"type":"string","enum":["price","window","neighborhood"]}},"parseOk":{"type":"boolean","description":"False means parsing refused or was unavailable; it does not mean the returned providers matched the query."},"hasBudgetFilter":{"type":"boolean","description":"Whether a price band was read. Never the value."},"hasWindowFilter":{"type":"boolean","description":"Whether a time window was read. Never the value."},"treatmentSlug":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"Canonical treatment slug extracted from the AI-parsed Intent, or null when the AI did not identify one. Kebab-case; NEVER raw query text."},"match":{"type":"string","enum":["matched","no_provider_here","service_unrecognized","browse"],"description":"A no-match is never filled with another service."},"service":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"location":{"type":["object","null"],"description":"A place named in the query wins over market.","properties":{"label":{"type":"string"},"source":{"type":"string","enum":["query","market"]},"marketSlug":{"type":["string","null"]},"conflict":{"type":"boolean"}}}}},"OfferRequest":{"type":"object","additionalProperties":false,"properties":{"service":{"type":"string","minLength":1,"maxLength":160,"x-utf8-byte-max":320,"description":"Optional exact public Service name. Provider-controlled unsafe or normalized text is rejected."}}},"PublicOffer":{"type":"object","additionalProperties":false,"required":["providerSlug","providerName","serviceName","priceMinCents","priceMaxCents","priceUnit","pricingVerifiedAt","priceValidUntil","pricingSource","freshness"],"properties":{"providerSlug":{"$ref":"#/components/schemas/ProviderSlug"},"providerName":{"type":"string","minLength":1,"maxLength":160},"serviceName":{"type":"string","minLength":1,"maxLength":160},"priceMinCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"priceMaxCents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"When present, it equals priceMinCents: an offer is one fixed total."},"priceUnit":{"type":"string","enum":["flat"]},"pricingVerifiedAt":{"type":"string","format":"date-time"},"priceValidUntil":{"type":"string","format":"date-time","description":"The end of the shared 180-day observation-validity window."},"pricingSource":{"type":"string","enum":["provider_managed","operator_verified"]},"freshness":{"type":"string","enum":["current","stale"]}}},"AvailabilityService":{"type":"string","minLength":1,"maxLength":80,"x-utf8-byte-max":160,"pattern":"^[\\p{L}\\p{N}][\\p{L}\\p{N} '&,\\-.]*$"},"CanonicalInstant":{"type":"string","maxLength":32,"pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"A real calendar instant whose parsed ISO serialization is byte-identical."},"AvailabilitySlot":{"type":"object","additionalProperties":false,"required":["startAt"],"properties":{"startAt":{"$ref":"#/components/schemas/CanonicalInstant"}}},"AvailabilityDate":{"type":"object","additionalProperties":false,"required":["date","slots"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"slots":{"type":"array","minItems":1,"maxItems":24,"uniqueItems":true,"items":{"$ref":"#/components/schemas/AvailabilitySlot"}}}},"PublicAvailabilityLive":{"type":"object","additionalProperties":false,"required":["slug","integrated","fetchedAt","dates"],"properties":{"slug":{"$ref":"#/components/schemas/ProviderSlug"},"integrated":{"const":true},"fetchedAt":{"$ref":"#/components/schemas/CanonicalInstant"},"dates":{"type":"array","minItems":1,"maxItems":14,"uniqueItems":true,"items":{"$ref":"#/components/schemas/AvailabilityDate"}}}},"PublicAvailabilityIntegratedFallback":{"type":"object","additionalProperties":false,"required":["slug","integrated","fetchedAt","dates","fallbackReason"],"properties":{"slug":{"$ref":"#/components/schemas/ProviderSlug"},"integrated":{"const":true},"fetchedAt":{"$ref":"#/components/schemas/CanonicalInstant"},"dates":{"type":"array","maxItems":0},"fallbackReason":{"type":"string","enum":["unavailable","timeout","error"]}}},"PublicAvailabilityNonIntegratedFallback":{"type":"object","additionalProperties":false,"required":["slug","integrated","fetchedAt","dates","fallbackReason"],"properties":{"slug":{"$ref":"#/components/schemas/ProviderSlug"},"integrated":{"const":false},"fetchedAt":{"$ref":"#/components/schemas/CanonicalInstant"},"dates":{"type":"array","maxItems":0},"fallbackReason":{"type":"string","enum":["not_integrated","error"]}}},"PublicAvailabilityResponse":{"oneOf":[{"$ref":"#/components/schemas/PublicAvailabilityLive"},{"$ref":"#/components/schemas/PublicAvailabilityIntegratedFallback"},{"$ref":"#/components/schemas/PublicAvailabilityNonIntegratedFallback"}]},"InvalidRequestError":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"const":"invalid_request"}}},"UnsupportedMediaTypeError":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"const":"unsupported_media_type"}}},"RateLimitedError":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"const":"rate_limited"}}},"InternalError":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"const":"internal_error"}}},"OfferNotFoundError":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"const":"offer_not_found"}}},"AvailabilityNotFoundError":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"const":"not_found"}}},"MarketNotFoundError":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"const":"market_not_found"}}},"ShortlistEvidence":{"type":"object","additionalProperties":false,"required":["kind","basis","ref","observedAt","validUntil"],"description":"The record a claim comes from. ref is an opaque, stable digest of the record and its version (null for the request gate, which is evaluated live at observedAt).","properties":{"kind":{"enum":["service_price_check","request_gate","listing_approval","google_review_snapshot"]},"basis":{"enum":["record","live_read"]},"ref":{"type":["string","null"],"pattern":"^ev_[0-9a-f]{24}$"},"observedAt":{"$ref":"#/components/schemas/CanonicalInstant"},"validUntil":{"oneOf":[{"$ref":"#/components/schemas/CanonicalInstant"},{"type":"null"}]}}},"ShortlistProvider":{"type":"object","additionalProperties":false,"required":["rank","providerSlug","providerName","neighborhood","profileUrl","claims"],"properties":{"rank":{"type":"integer","minimum":1,"maximum":20},"providerSlug":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9_]+(?:-[a-z0-9_]+)*$"},"providerName":{"type":"string","minLength":1,"maxLength":200},"neighborhood":{"type":["string","null"],"maxLength":200},"profileUrl":{"type":"string","format":"uri","pattern":"^https://trybeforeandafter\\.com/"},"claims":{"type":"object","additionalProperties":false,"required":["offer","withinBudget","requestsOpen","bnaApproved","googleRating"],"properties":{"offer":{"oneOf":[{"type":"object","additionalProperties":false,"required":["status","value","evidence"],"properties":{"status":{"const":"supported"},"value":{"type":"object","additionalProperties":false,"required":["serviceName","treatment","priceMinCents","priceMaxCents","priceUnit","pricingSource","checkedByBna"],"properties":{"serviceName":{"type":"string","minLength":1,"maxLength":200},"treatment":{"type":["string","null"]},"priceMinCents":{"type":"integer","minimum":0},"priceMaxCents":{"type":["integer","null"],"minimum":0},"priceUnit":{"enum":["flat"]},"pricingSource":{"enum":["provider_managed","operator_verified"]},"checkedByBna":{"type":"boolean"}}},"evidence":{"$ref":"#/components/schemas/ShortlistEvidence"}}},{"$ref":"#/components/schemas/ShortlistUnavailable"}]},"withinBudget":{"oneOf":[{"oneOf":[{"type":"object","additionalProperties":false,"required":["status","value","evidence"],"properties":{"status":{"const":"supported"},"value":{"const":true},"evidence":{"$ref":"#/components/schemas/ShortlistEvidence"}}},{"$ref":"#/components/schemas/ShortlistUnavailable"}]},{"type":"null"}],"description":"Null without a budget. Only a flat price whose whole range is within the budget meets it."},"requestsOpen":{"oneOf":[{"type":"object","additionalProperties":false,"required":["status","value","evidence"],"properties":{"status":{"const":"supported"},"value":{"type":"boolean"},"evidence":{"$ref":"#/components/schemas/ShortlistEvidence"}}},{"$ref":"#/components/schemas/ShortlistUnavailable"}]},"bnaApproved":{"oneOf":[{"type":"object","additionalProperties":false,"required":["status","value","evidence"],"properties":{"status":{"const":"supported"},"value":{"const":true},"evidence":{"$ref":"#/components/schemas/ShortlistEvidence"}}},{"$ref":"#/components/schemas/ShortlistUnavailable"}]},"googleRating":{"oneOf":[{"type":"object","additionalProperties":false,"required":["status","value","evidence"],"properties":{"status":{"const":"supported"},"value":{"type":"object","additionalProperties":false,"required":["rating","reviewCount"],"properties":{"rating":{"type":"number","minimum":1,"maximum":5},"reviewCount":{"type":"integer","minimum":1}}},"evidence":{"$ref":"#/components/schemas/ShortlistEvidence"}}},{"$ref":"#/components/schemas/ShortlistUnavailable"}]}}}}},"ShortlistReason":{"enum":["live_availability_requires_check_availability","medical_judgment_not_provided","credential_not_published","payment_terms_not_published","price_guarantee_not_offered","ranking_judgment_not_provided","unknown_claim","treatment_not_in_taxonomy","price_not_verified","price_check_expired","price_not_comparable_to_budget","price_range_exceeds_budget","evidence_changed_during_read","approval_time_not_recorded","no_google_listing","no_current_rating_observation","treatment_not_recognized","treatment_ambiguous","budget_not_understood","sort_ambiguous","negation_not_supported"]},"ShortlistRequest":{"type":"object","additionalProperties":false,"required":["market","request"],"properties":{"market":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Canonical public market slug."},"request":{"type":"string","minLength":1,"maxLength":500,"description":"The customer's words, at most 500 characters and containing at least one letter. Not medical advice input; never returned in the response."}}},"ShortlistResponse":{"type":"object","additionalProperties":false,"required":["contract","observedAt","maxAgeSeconds","intent","interpretation","market","humanUrl","totalMatched","truncated","providers","refusals"],"properties":{"contract":{"const":"bna.agent-catalog.shortlist.v1"},"observedAt":{"$ref":"#/components/schemas/CanonicalInstant"},"maxAgeSeconds":{"const":60},"intent":{"type":"object","additionalProperties":false,"required":["market","treatment","budgetMaxDollars","sort"],"properties":{"market":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"treatment":{"type":["string","null"]},"budgetMaxDollars":{"type":["integer","null"],"minimum":1,"maximum":999999},"sort":{"enum":["ba_score","price","rating","reviews"]}}},"interpretation":{"description":"Null for a structured GET; the interpreter version when the intent was read from words.","oneOf":[{"type":"null"},{"type":"object","additionalProperties":false,"required":["method"],"properties":{"method":{"const":"bna.shortlist-intent.lexicon.v1"}}}]},"market":{"type":"object","additionalProperties":false,"required":["slug","name","live"],"properties":{"slug":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"name":{"type":"string","minLength":1,"maxLength":200},"live":{"type":"boolean"}}},"humanUrl":{"type":"string","format":"uri","pattern":"^https://trybeforeandafter\\.com/","description":"The same list on the public market page."},"totalMatched":{"type":"integer","minimum":0},"truncated":{"type":"boolean"},"providers":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/ShortlistProvider"}},"refusals":{"type":"array","maxItems":18,"items":{"type":"object","additionalProperties":false,"required":["subject","value","reason"],"properties":{"subject":{"enum":["claim","treatment","request"],"description":"`request`: part of a customer's words the interpreter could not read; `value` names the part (treatment, budget, sort or negation)."},"value":{"type":"string","minLength":1,"maxLength":80},"reason":{"$ref":"#/components/schemas/ShortlistReason"}}}}}},"ShortlistUnavailable":{"type":"object","additionalProperties":false,"required":["status","reason"],"description":"The claim cannot be made from current evidence. It is never a negative fact.","properties":{"status":{"const":"unavailable"},"reason":{"$ref":"#/components/schemas/ShortlistReason"}}},"CatalogError":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"enum":["invalid_request","provider_not_found","service_not_found","offer_not_found","size_not_offered","unsupported_media_type","rate_limited","method_not_allowed","unavailable","internal_error"]}}},"ContractDocument":{"type":"object","required":["schema"],"properties":{"schema":{"type":"string"}},"description":"A versioned contract named by `schema`. Unknown claims are explicit (`known:false` with a reason), never a negative fact."}},"responses":{"SearchInvalidRequest":{"description":"Malformed, oversized, unsupported, or non-canonical JSON request.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"},"example":{"error":"invalid_request"}}}},"SearchUnsupportedMediaType":{"description":"The request is not JSON.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"},"example":{"error":"unsupported_media_type"}}}},"SearchRateLimited":{"description":"Distributed rate-limit refusal or limiter failure.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"},"example":{"error":"rate_limited"}}}},"SearchInternalError":{"description":"The bounded public projection could not be produced.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"},"example":{"error":"internal_error"}}}},"OfferInvalidRequest":{"description":"Malformed, oversized, non-canonical, or unexpected path/body/query input.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"},"example":{"error":"invalid_request"}}}},"OfferNotFound":{"description":"Uniform response for unknown, ineligible, missing, inactive, unverified, foreign, or ambiguous public supply.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferNotFoundError"},"example":{"error":"offer_not_found"}}}},"OfferUnsupportedMediaType":{"description":"The request is not JSON.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"},"example":{"error":"unsupported_media_type"}}}},"OfferRateLimited":{"description":"Distributed rate-limit refusal or limiter failure.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"},"example":{"error":"rate_limited"}}}},"OfferInternalError":{"description":"The bounded public projection could not be produced.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"},"example":{"error":"internal_error"}}}},"AvailabilityInvalidRequest":{"description":"Malformed, duplicate, unknown, normalized, or oversized path/query selectors.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"},"example":{"error":"invalid_request"}}}},"AvailabilityNotFound":{"description":"Uniform response for unknown or ineligible provider/service supply.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityNotFoundError"},"example":{"error":"not_found"}}}},"ShortlistInternalError":{"description":"Infrastructure failure. No partial shortlist is returned.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"},"example":{"error":"internal_error"}}}},"ShortlistInvalidRequest":{"description":"Missing market, or a malformed, duplicate, unknown, or non-canonical selector. Selectors are rejected, never rewritten.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"},"example":{"error":"invalid_request"}}}},"ShortlistMarketNotFound":{"description":"No active public market has this slug.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketNotFoundError"},"example":{"error":"market_not_found"}}}},"ShortlistRateLimited":{"description":"Distributed client limit exceeded or unavailable.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"},"example":{"error":"rate_limited"}}}},"ShortlistUnsupportedMediaType":{"description":"The request body is not JSON.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"$ref":"#/components/headers/NoReferrer"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"},"example":{"error":"unsupported_media_type"}}}},"CatalogError":{"description":"Stable error code; `rate_limited` carries Retry-After.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"X-Content-Type-Options":{"$ref":"#/components/headers/NoSniff"},"X-Robots-Tag":{"$ref":"#/components/headers/NoIndex"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogError"}}}}}}}