{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"2b6cd0e7-44ca-4159-816b-f35dfcd97945","name":"FoodBridgeCT API v1","description":"# FoodBridgeCT — Phase II REST API\n\nDiscover Central Texas food providers, nutrition profiles, and assistance programs. Every reviewed instance connects to both other models; collection generation derives examples from the current catalog.\n\n## Quick start\n\n1. Use the public API at `https://foodaccess.me/api/v1`.\n2. Keep the collection variable `baseUrl` as `https://foodaccess.me` (origin only, no trailing slash or /api/v1).\n3. Send a list request or run all three folders with Collection Runner.\n4. For the Part 3 database-backed API, follow `docs/BACKEND.md`, start the Flask backend, and set `baseUrl` to `http://localhost:8000`. Select Postman Desktop Agent; a Cloud Agent cannot reach your computer. `npm run dev` on port 5174 remains the legacy JSON-backed server. Saved examples are available without a running backend.\n\n**Authentication:** No Auth. Requests accept JSON and have no body. This is a read-only directory API with no authentication. POST examples verify 405 rejection; creation, updates, deletion, and server-side favorites are outside v1.\n\n**Hosting:** The public website uses React server rendering, Flask, and PostgreSQL behind Cloudflare Tunnel. Local Flask setup is documented in `docs/BACKEND.md`; exact production revision and HTTPS checks belong to the release gate.\n\n**Validation:** Every request has a backend-generated example and executable status/schema assertions. Default live assertions check filters, ordering, pagination, and cross-model relationship evidence without freezing catalog counts. Set `verificationMode=snapshot` for exact assertions against the controlled imported seed. 400, 404, and 405 cases pass when the documented error is returned. Regenerate saved examples after reviewing catalog changes.\n\n**Media:** Record responses include reviewed image metadata. The website renderer uses it for local images with visible attribution and composes map embeds separately.\n\n[Repository](https://gitlab.com/cs373-fall-2026-01/foodbridgect) · [Postman workspace](https://danacoates-5316873.postman.co/workspace/foodbridgect~fd7e203c-6225-4682-b55a-ef1b5a9fd84c/overview)\n\n# FoodBridgeCT API specification — v1\n\n**Status:** This is the Phase II implementation contract. The Phase I API was\nverified over public HTTPS on September 30, 2026; the expanded October 19 dataset\nhas been verified locally and must be redeployed and rechecked in Part 5. Examples\ndescribe reviewed snapshots, not current food availability.\n\n## 1. Scope and architecture\n\nThe API lets clients discover food providers, compare nutrition profiles, and explore\nassistance programs and their documented connections. Version 1 is read-only and\nrequires no authentication. The public API runs at `https://foodaccess.me/api/v1`.\nThe Part 3 PostgreSQL-backed Flask API uses `http://localhost:8000` locally.\nThe older static-site development server at `http://localhost:5174` retains its\nJSON-backed compatibility API until Part 4 connects the frontend to Flask.\n\n```text\nWebsite or Postman\n       |\n       | GET /api/v1/...\n       v\nFlask routes -> request validation -> SQL queries -> JSON response\n                                          |\n                                          v\n                         PostgreSQL records and source evidence\n                         providers <-> programs <-> nutrition\n                              <---------------------->\n```\n\nThe Flask application factory is `backend.main:create_app`. It requires\n`DATABASE_URL`, uses SQLAlchemy against PostgreSQL 17, and never loads catalog\nJSON during requests. Reviewed imports remain a separate administration step.\nFiltering, counts, sorting, LIMIT and OFFSET execute in SQL; serializers hydrate\nonly the selected records and their evidence/relationships. Each request uses\none read-only REPEATABLE READ snapshot, including pagination metadata.\nSee [backend setup and verification](BACKEND.md) for Docker and native commands.\n\nAuthentication, record creation/editing/deletion, account management, and server-side\nfavorites are outside v1. Favorites remain browser-local. GitLab contribution\ncollection is separate from these directory endpoints.\n\n## 2. HTTP conventions\n\n| Property | Contract |\n| --- | --- |\n| Base path | `/api/v1` |\n| Public origin | `https://foodaccess.me` |\n| Local origin | `http://localhost:8000` for Flask; `5174` is the legacy static development server |\n| Resource methods | `GET`; requests have no body |\n| Request header | `Accept: application/json` |\n| Response header | `Content-Type: application/json; charset=utf-8` |\n| Field naming | Existing catalog camelCase; query names are specified below |\n| IDs | Lowercase slug matching `^[a-z0-9]+(?:-[a-z0-9]+)*$` |\n| Dates | `YYYY-MM-DD`; retrieval timestamps include a timezone |\n| Arrays | Always arrays, including when empty; related IDs must be unique |\n| Unknown values | Explicit `null` only where the schema permits it |\n\nCanonical resource paths have no trailing slash. The local server also accepts\na trailing slash without redirecting. Browser pages such as `/providers/` remain separate HTML routes.\nUnsupported write methods on a known resource return `405` with `Allow: GET`.\nDeploying frontend and API under the same origin avoids requiring cross-origin access;\nif they use different origins, configure the allowed frontend origin explicitly.\n\n`CORS_ORIGINS` is a comma-separated list of exact frontend origins. Allowed\norigins receive CORS headers on successes and errors; credentials are disabled.\nBrowser OPTIONS preflight requests are answered with 204 and advertise GET only.\nOrdinary OPTIONS and HEAD requests retain the 405 contract. Disallowed origins\nreceive no allow-origin header; CORS is a browser policy, not authentication.\n`GET /healthz` probes the database tables and returns `{\"status\":\"ok\"}` or 503.\nDatabase failures return uncached JSON `SERVICE_UNAVAILABLE`, with a generic\nmessage and no connection strings or SQL details. Production HTTPS checks remain\nPart 5 work; local passing tests do not establish public deployment status.\n\n## 3. Endpoint map\n\n| Method | Endpoint | Response |\n| --- | --- | --- |\n| GET | `/api/v1/providers` | `ListResponse<Provider>` |\n| GET | `/api/v1/providers/{id}` | `DetailResponse<Provider>` |\n| GET | `/api/v1/nutrition` | `ListResponse<Nutrition>` |\n| GET | `/api/v1/nutrition/{id}` | `DetailResponse<Nutrition>` |\n| GET | `/api/v1/programs` | `ListResponse<Program>` |\n| GET | `/api/v1/programs/{id}` | `DetailResponse<Program>` |\n\nReviewed Phase II IDs:\n\n| Model | IDs |\n| --- | --- |\n| Providers | `downtown`, `sunset-valley`, `mueller`, `aph-east-austin`, `haca-lakeside`, `austin-public-library`, `zavala-elementary`, `dove-springs-recreation-center`, `round-rock-serving-center`, `pan-american-recreation-center` |\n| Nutrition | `carrots`, `broccoli`, `spinach`, `golden-delicious-apple`, `banana`, `pinto-beans`, `brown-rice`, `baked-sweet-potato`, `tomato`, `cucumber` |\n| Programs | `snap`, `double-up`, `wic-fmnp`, `fresh-food-for-families`, `hope`, `csfp`, `backpack`, `feeding-futures-school-pantry`, `mobile-pantry`, `cacfp-afterschool-meals` |\n\nIDs are unique within their model, not necessarily across models. Detail endpoints\naccept no query parameters. To navigate a relationship, use its model and ID to\nrequest the corresponding detail endpoint; there is no separate relationship endpoint.\n\n## 4. Search, filtering, sorting, and pagination\n\n### Shared list parameters\n\n| Parameter | Type | Default | Meaning |\n| --- | --- | --- | --- |\n| `q` | string | empty | Substring search across the model's five card fields |\n| `page` | integer >= 1 | `1` | Requested result page |\n| `per_page` | integer, 1–100 | `3` | Maximum records per page |\n| `sort` | allowed field name | `name` | Field used for sorting |\n| `order` | `asc` or `desc` | `asc` | Sort direction |\n\n### Model-specific parameters\n\nEvery name listed below is a separate query parameter. Each numeric range has two\nindependent bounds; for example, `fiber_min=2.5&fiber_max=3`.\n\n| Model | Text filters | Numeric filters | Allowed sort fields / fields searched by `q` |\n| --- | --- | --- | --- |\n| Providers | `name`, `type`, `city`, `zip`, `programNames` | None | `name`, `type`, `city`, `zip`, `programNames` |\n| Nutrition | `name` | `energy_min`, `energy_max`, `protein_min`, `protein_max`, `fiber_min`, `fiber_max`, `sodium_min`, `sodium_max` | `name`, `energy`, `protein`, `fiber`, `sodium` |\n| Programs | `name`, `type`, `audience`, `area` | `providerCount_min`, `providerCount_max` | `name`, `type`, `audience`, `area`, `providerCount` |\n\nProviders also accept `open_day`, a full weekday name (case-insensitive).\nFor example, `open_day=saturday` matches only providers whose reviewed `hours`\nexplicitly name Saturday. Unknown/varying schedules are excluded from a specific\nday; results are not a claim that a site is currently open. Empty values mean any\nday; unrecognized nonempty values return 400. This filter does not add a sort\nfield or change the five-field general search contract.\n\n### Processing rules\n\n1. Validate the entire query before querying data. Reject unknown or repeated keys,\n   unsupported sort fields/orders, and invalid numeric values with `400 INVALID_QUERY`.\n   Parameter names, field names, and `asc`/`desc` are case-sensitive.\n2. Text queries containing a null character (`%00`) match no records, since\n   PostgreSQL text cannot contain that character. This preserves compatibility\n   with the original API rather than reporting a database outage.\n   Trim text queries and match case-insensitive substrings. An empty text filter is\n   ignored. For `q`, join the five displayed values with spaces; represent numbers\n   without units and join array values with commas and spaces. Null contributes no text.\n   `programNames` matches the joined program-name list; it does not match program IDs.\n3. Combine `q` and individual filters with AND. Numeric bounds are inclusive,\n   finite, and nonnegative. Provider-count bounds must be integers. An empty numeric\n   parameter or a minimum greater than its maximum is invalid. Null nutrients never\n   satisfy a numeric bound. Reject non-finite values such as `NaN` and `Infinity`.\n4. Sort numbers numerically and text by case-folded lexical order. ZIP codes stay\n   strings. For `programNames`, sort the case-folded program names, join with `, `,\n   and compare that string. Null values sort last in both directions. Break all ties\n   by ID ascending, regardless of the primary sort direction.\n5. Count matching records, then paginate. `total` counts matches before pagination;\n   `pages = ceil(total / per_page)`. A valid page beyond the last returns empty\n   `data` while retaining the actual `total`, `pages`, and requested `page`.\n\nInteger parameters accept decimal digits only. Percent-encode query values in URLs;\nfor example, `type=Produce%20incentive`. The API uses `fiber_min`, not the static\nwebsite's `filter-fiber-min` browser-state parameter. `saved` is not an API parameter.\n\n## 5. Response envelopes\n\nThe notation below describes schemas, not executable backend code. Every declared\nfield is required unless marked optional. List items and detail `data` use the same\ncomplete entity schema; list responses do not include top-level relationship evidence.\n\n```text\nListResponse<T> {\n  data: T[],\n  meta: {\n    total: integer >= 0,\n    page: integer >= 1,\n    per_page: integer in [1, 100],\n    pages: integer >= 0\n  }\n}\n\nDetailResponse<T> {\n  data: T,\n  relationships: Relationship[]\n}\n\nErrorResponse {\n  error: {\n    code: string,\n    message: string\n  }\n}\n```\n\nAn empty successful list is `200`, not `404`:\n\n```json\n{\"data\": [], \"meta\": {\"total\": 0, \"page\": 1, \"per_page\": 3, \"pages\": 0}}\n```\n\n## 6. Entity schemas\n\n### Fields shared by every entity\n\n| Field | Type | Meaning |\n| --- | --- | --- |\n| `id` | string | Stable model-specific slug |\n| `name` | string | Resource's display name |\n| `description` | string | Reviewed explanatory text |\n| `snapshotDate` | date string | Date of the reviewed facts, not the request date |\n| `sources` | string[] | Official source URLs |\n| `sourceIds` | string[] | Identifiers of supporting source snapshots |\n| `provenance` | SourceEvidence[] | Retrieval and checksum metadata |\n| `media` | Media object | Reviewed local image path, alt text, caption, credit, source, width, and height |\n\n### Provider extends the shared fields\n\n| Field | Type | Meaning |\n| --- | --- | --- |\n| `type` | string | Service-site type, initially `Farmers’ market` |\n| `city` | string | Municipality from the published address |\n| `zip` | string | Five digits; preserve leading zeros |\n| `address` | string | Full published service address |\n| `organization` | string | Operating organization |\n| `hours` | string | Published schedule in the snapshot |\n| `visit` | string | Practical visit guidance and limitations |\n| `programs` | string[] | Related program IDs |\n| `nutrition` | string[] | Related nutrition IDs |\n| `programNames` | string[] | Display names derived from related programs |\n| `sourceLocationId` | positive integer, optional | Stable source-system location ID when supplied by the CTFB locator |\n\n### Nutrition extends the shared fields\n\n| Field | Type | Meaning |\n| --- | --- | --- |\n| `fdcId` | positive integer | USDA FoodData Central identifier |\n| `category` | string | Source food category |\n| `preparation` | string | Preparation form, initially raw |\n| `dataType` | string | Source dataset, initially `SR Legacy` |\n| `basis` | string | `per 100 g edible portion` |\n| `units` | object | `{\"energy\":\"kcal\",\"protein\":\"g\",\"fiber\":\"g\",\"sodium\":\"mg\"}` |\n| `energy` | nonnegative number or null | Energy in kcal per 100 g |\n| `protein` | nonnegative number or null | Protein in g per 100 g |\n| `fiber` | nonnegative number or null | Dietary fiber in g per 100 g |\n| `sodium` | nonnegative number or null | Sodium in mg per 100 g |\n| `providers` | string[] | Related provider IDs |\n| `programs` | string[] | Related program IDs |\n\nMissing nutrients remain null, never zero. Values describe the stated preparation\nand measurement basis; they are not a serving recommendation or inventory claim.\n\n### Program extends the shared fields\n\n| Field | Type | Meaning |\n| --- | --- | --- |\n| `type` | string | Benefit, incentive, or other program category |\n| `audience` | string | Source-described intended participants |\n| `area` | string | Documented service area |\n| `action` | string | Recommended next step and assistance information |\n| `providers` | string[] | Linked provider IDs |\n| `nutrition` | string[] | Linked nutrition IDs |\n| `providerCount` | nonnegative integer | Length of `providers`, not the entire program network |\n\n### SourceEvidence\n\n| Field | Type | Meaning |\n| --- | --- | --- |\n| `id` | string | Source identifier referenced by `sourceIds` |\n| `name` | string | Human-readable source label |\n| `url` | string | Source URL without API credentials |\n| `retrievedAt` | timestamp string | Actual retrieval time with timezone |\n| `path` | string | Repository-relative evidence path under `data/`; metadata, not an API route |\n| `sha256` | 64-character lowercase hex string | SHA-256 of the saved evidence bytes |\n| `evidenceFormat` | string | Description of the saved evidence format |\n| `archiveSha256` | string, optional | Historical archive checksum; not a replacement for `sha256` |\n\nThe backend must not return access tokens, absolute filesystem paths, or credentials.\nExisting saved provenance includes `archiveSha256`; new sources may omit it.\n\n## 7. Relationship schema and interpretation\n\n```text\nRelationship {\n  fromModel: \"providers\" | \"programs\",\n  fromId: string,\n  toModel: \"programs\" | \"nutrition\",\n  toId: string,\n  kind: \"documented\" | \"illustrative\" | \"derived\",\n  explanation: string,\n  sources: string[],\n  sourceIds: string[],\n  viaPrograms: string[]  // required for derived edges; absent otherwise\n}\n```\n\n| Stored direction | Kind | Interpretation |\n| --- | --- | --- |\n| Provider -> Program | `documented` | Officially documented participation |\n| Program -> Nutrition | `illustrative` | Food illustrates a source-mentioned category; not promised distribution or eligibility |\n| Provider -> Nutrition | `derived` | Connection through the provider's documented programs; not evidence of current inventory |\n\nOnly these three direction/kind combinations are valid. Relationships are stored\nonce but navigable in both directions. Each detail response includes every edge\nwhere the requested model and ID appear at either end. A derived edge's\n`viaPrograms` must refer to programs connecting that provider to that food.\nKeep related ID arrays reciprocal and derive `programNames` and `providerCount`\nfrom the same relationships. Return evidence edges in stable order by\n`fromModel`, `fromId`, `toModel`, then `toId`.\n\nFor example, `/providers/mueller` under the API base path returns Mueller's provider\nrecord plus its incident provider-program and provider-nutrition edges. Follow a\nprogram ID with `GET /api/v1/programs/{id}` to retrieve that program's evidence.\n\n## 8. Example requests and responses\n\n| Request | Expected result for the reviewed Phase II snapshot |\n| --- | --- |\n| `GET /api/v1/providers?q=78723` | Mueller only |\n| `GET /api/v1/providers?zip=78701` | Austin Public Library, HACA Lakeside, then Downtown |\n| `GET /api/v1/programs?type=Produce%20incentive` | Double Up only |\n| `GET /api/v1/nutrition?fiber_min=2.5&sort=sodium` | First page: banana, pinto beans, broccoli; `total=5`, `pages=2` |\n| `GET /api/v1/nutrition?name=broccoli` | The complete response below |\n| `GET /api/v1/providers/mueller` | One provider plus its incident relationship edges |\n| `GET /api/v1/nutrition?per_page=1&page=2&sort=name` | Broccoli; `total=10`, `pages=10` |\n| `GET /api/v1/nutrition?page=5` | Empty data; `total=10`, `pages=4` |\n\nComplete example: `GET /api/v1/nutrition?name=broccoli`, HTTP `200`:\n\n```json\n{\n  \"data\": [\n    {\n      \"id\": \"broccoli\",\n      \"name\": \"Broccoli, raw\",\n      \"fdcId\": 170379,\n      \"category\": \"Vegetables\",\n      \"preparation\": \"Raw\",\n      \"basis\": \"per 100 g edible portion\",\n      \"energy\": 34.0,\n      \"protein\": 2.82,\n      \"fiber\": 2.6,\n      \"sodium\": 33.0,\n      \"description\": \"This USDA profile describes broccoli, raw. Compare its energy, protein, fiber, and sodium using the same 100 g basis as the other foods in this directory. Cooking and added ingredients change the nutrient profile. Values come from USDA SR Legacy data and are not per serving or a dietary recommendation.\",\n      \"sources\": [\n        \"https://fdc.nal.usda.gov/food-details/170379/nutrients\"\n      ],\n      \"snapshotDate\": \"2026-09-27\",\n      \"sourceIds\": [\n        \"170379\"\n      ],\n      \"dataType\": \"SR Legacy\",\n      \"units\": {\n        \"energy\": \"kcal\",\n        \"protein\": \"g\",\n        \"fiber\": \"g\",\n        \"sodium\": \"mg\"\n      },\n      \"media\": {\n        \"image\": {\n          \"path\": \"broccoli.svg\",\n          \"alt\": \"Illustration of raw broccoli\",\n          \"caption\": \"Original food illustration; not an indication of current provider stock\",\n          \"credit\": \"FoodBridgeCT\",\n          \"source\": \"/about/\",\n          \"width\": 640,\n          \"height\": 420\n        }\n      },\n      \"providers\": [\n        \"downtown\",\n        \"sunset-valley\",\n        \"mueller\",\n        \"aph-east-austin\",\n        \"zavala-elementary\",\n        \"round-rock-serving-center\"\n      ],\n      \"programs\": [\n        \"snap\",\n        \"double-up\",\n        \"wic-fmnp\",\n        \"fresh-food-for-families\",\n        \"feeding-futures-school-pantry\"\n      ],\n      \"provenance\": [\n        {\n          \"id\": \"170379\",\n          \"name\": \"USDA FoodData Central record 170379\",\n          \"url\": \"https://api.nal.usda.gov/fdc/v1/food/170379\",\n          \"retrievedAt\": \"2026-09-27T17:21:00.952969+00:00\",\n          \"archiveSha256\": \"391f8cde74e6b78a555b40b164d6d0156e4b9c092b88d2b5bdab818d720f1730\",\n          \"path\": \"raw/170379.json\",\n          \"sha256\": \"292cf663dd8a7c600ef619296884c334500fc9aa858b777f032b64b242314f4d\",\n          \"evidenceFormat\": \"USDA JSON\"\n        }\n      ]\n    }\n  ],\n  \"meta\": {\n    \"total\": 1,\n    \"page\": 1,\n    \"per_page\": 3,\n    \"pages\": 1\n  }\n}\n```\n\n## 9. Errors\n\n| Status | Code | When |\n| --- | --- | --- |\n| 200 | — | Valid list or known detail resource |\n| 400 | `INVALID_QUERY` | Invalid query or malformed detail ID |\n| 404 | `NOT_FOUND` | Valid slug with no matching record, or unknown API route |\n| 405 | `METHOD_NOT_ALLOWED` | Unsupported method on a known resource; include `Allow: GET` |\n| 500 | `INTERNAL_ERROR` | Unexpected server failure |\n| 503 | `SERVICE_UNAVAILABLE` | PostgreSQL is unavailable to the Flask backend |\n\nExamples:\n\n```json\n{\"error\": {\"code\": \"INVALID_QUERY\", \"message\": \"fiber_min must not exceed fiber_max\"}}\n```\n\n```json\n{\"error\": {\"code\": \"NOT_FOUND\", \"message\": \"Record not found\"}}\n```\n\n```json\n{\"error\": {\"code\": \"INTERNAL_ERROR\", \"message\": \"An unexpected error occurred\"}}\n```\n\nClients should branch on `code`, not the human-readable message. Error responses\nuse the same JSON content type as successful responses. Log diagnostic details\nserver-side; never return stack traces, credentials, or filesystem details.\n\n## 10. Running and testing\n\nUse the public API without starting a local server:\n\n```sh\ncurl \"https://foodaccess.me/api/v1/providers\"\n```\n\nFor the Part 3 Flask/PostgreSQL API, follow [BACKEND.md](BACKEND.md), then run\n`npm run test:postman` against `http://localhost:8000`. To test isolated databases\nand HTTP together, set `TEST_DATABASE_URL` and run `python -m backend.check`.\n\nFor legacy static-site development:\n\n```sh\nnpm ci\nnpm run dev\n```\n\nOpen `http://localhost:5174` for the website. For example:\n\n```sh\ncurl \"http://localhost:5174/api/v1/providers?q=78723\"\ncurl \"http://localhost:5174/api/v1/nutrition?fiber_min=2.5&sort=sodium\"\ncurl \"http://localhost:5174/api/v1/programs/snap\"\n```\n\nUse `npm run dev -- --port 8080` to change ports. `npm run share` serves both\nwebsite and API on the LAN. Restart after changing source or catalog data.\nThe Python standard-library server is a local development server. Publishing only\n`dist/` to a static host does not deploy the API; public API hosting requires a\nPython server process. The current public deployment runs that process on EC2\nand exposes both website and API through Cloudflare Tunnel.\n\n`npm run check` runs automated HTTP and query tests, builds the site, and checks\nlocal links. `npm run check:browser` also verifies same-origin API access alongside\nthe website. The acceptance requirements are:\n\n- All six endpoints return the specified envelopes and complete entity fields.\n- Every list supports its five sort fields, both orders, applicable filters,\n  case-insensitive search, and combined queries.\n- Pagination works for empty matches and requests beyond the last page.\n- Numeric sorting is numeric; null values stay last and never match numeric bounds.\n- Unknown/repeated parameters, invalid ranges, bad IDs, and unsupported methods\n  return the documented errors without leaking internal details.\n- All 30 reviewed records can be reached through their related IDs, and detail\n  evidence preserves documented, illustrative, and derived meanings.\n- The server can start and answer requests without live source APIs or credentials.\n- Automated tests exercise these behaviors against a running HTTP server.\n\nThe collection is maintained in the [FoodBridgeCT Postman workspace](https://danacoates-5316873.postman.co/workspace/foodbridgect~fd7e203c-6225-4682-b55a-ef1b5a9fd84c/overview).\nImport `api/foodbridgect.postman_collection.json` into Postman. Its default\n`baseUrl` is `https://foodaccess.me`, with no trailing slash or `/api/v1`; each\nrequest already includes the API path. For local development, change it to\n`http://localhost:5174` (or your chosen port) and select **Desktop Agent**.\nCloud Agent cannot reach your local backend. Saved response examples can be inspected offline.\n\nThe collection includes **57 executable requests** in Providers, Nutrition, and\nPrograms folders: all six endpoint patterns, all 30 instance IDs, search and\ncombined filters, numeric ranges and ordering, pagination, empty matches, and\nnegative cases. Each request includes its purpose, an example generated by the\nbackend's dispatcher, and status/schema assertions. Detail assertions check\nconnections to both other models and evidence meaning. Negative requests pass\nwhen their expected `400`, `404`, or `405` is returned, including `Allow: GET` for\nunsupported writes. Collection-level checks verify JSON and `Cache-Control`.\n\nUse **Run collection** to execute all folders against the public API, or override `baseUrl` to test a running local server.\nID/order and pagination assertions target the reviewed September 27 and October\n19, 2026 snapshots. Run `npm run api` to regenerate examples and assertions after reviewed\ncatalog changes. The complete contract in this file is also embedded in the\ncollection description, so graders can read it within Postman. Automated Python\nHTTP tests check every saved example against the running server.\n\nImage metadata is part of each entity response; map embeds are assembled by the\nwebsite renderer from provider addresses. The website's multimedia presentation\nremains separate from the API's source and relationship evidence schemas.\nThe API is publicly accessible without authentication. Access to the editable\nPostman workspace depends on its separate workspace permissions.\n\n\n## Deployment metadata (outside API v1)\n\nThe Flask and React services each provide `GET /version`, returning\n`{\"revision\":\"<full deployed Git SHA>\"}` with `Cache-Control: no-store`.\nDocker runtime images set this from the `RELEASE_SHA` build argument; native\nunconfigured development returns `development`. This does not query PostgreSQL\nor replace `/healthz`. `/healthz` verifies database-backed service availability.\nThe legacy static compatibility server does not implement these deployment\nroutes. The six `/api/v1` route patterns and the 57-request Postman contract are\nunchanged; the separate `scripts/release_check.py` verifies production metadata,\nTLS, CORS, HTML, and canonical routing. See [deployment](DEPLOYMENT.md).\n\n## Live and controlled-seed Postman checks\n\nThe exported collection defaults to `verificationMode=live`: schema, requested\nfilters, stable sorting, pagination arithmetic, unique IDs, and relationship\nevidence are checked without assuming a nine-record total. Saved examples remain\nreviewed snapshots. For a disposable database imported from the exact catalog\nused to generate the collection, pass `--env-var verificationMode=snapshot` to\nNewman. This additionally asserts exact generated IDs/order and metadata.\n`backend.check` and the backend Compose gate set snapshot mode explicitly.\nRegenerate both exports with `python3 scripts/make_api.py` after reviewed changes.\n\nPhotographs may include optional `media.image.variants`, an array of local WebP\n`path` and positive integer `width` candidates. Original media, attribution, and\nalt text remain authoritative; renderers select a candidate using `srcset/sizes`.\n\n### Optional provider transit media\n\n`media.transit` carries reviewed scheduled-bus enrichment: `providerId`, source\nURL, feed version, retrieval date, service-window dates, evidence path/SHA, and\n`stops`. Each stop has a code/name/coordinates, scheduled route IDs/names,\n`straightLineMeters`, and pedestrian `walkMeters`/`walkMinutes`. Walking values\nare approximate mapped pedestrian routes, not live journey/arrival estimates.\nThe source is validated at import and stored in the existing media JSONB field.\nMissing enrichment never means that a provider has no public transport.\n\n### Optional nutrition preparation video\n\n`media.video` contains `foodId`, an allowlisted 11-character `youtubeId`, title,\ncreator, educational recipe `source`, `videoSource`, review date, and source\nextract path/SHA. It is reviewed enrichment stored in the existing media JSONB\nfield; numeric nutrient values still describe the original food preparation.\nThe website renders an on-demand embedded player plus always-visible source and\nwatch links. Invalid IDs/sources, wrong-food assignments, and metadata differing\nfrom the hashed source extract fail import validation.\n","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"13905587","team":46416059,"collectionId":"2b6cd0e7-44ca-4159-816b-f35dfcd97945","publishedId":"2sBYHURz16","public":true,"publicUrl":"https://documenter-api.postman.tech/view/13905587/2sBYHURz16","privateUrl":"https://go.postman.co/documentation/13905587-2b6cd0e7-44ca-4159-816b-f35dfcd97945","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.12.14","publishDate":"2026-10-21T19:06:53.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://postman-image-service.postman.com/api/cloudinary-proxy/postman/image/upload/t_team_logo_pubdoc/v1/team/39b0f8b8d3b951d9fefe6a0f7662230302f4ad2cb9e656bb724160559c81a87b","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2sBYHURz16"}