{"openapi":"3.1.0","info":{"title":"Product Safety & Recalls API","version":"1.0.0","description":"Search CPSC, EU Safety Gate, UK FSA and Canada recalls, look up USDA FoodData nutrition, and parse GS1 Digital Link URIs from vendored official data or pure computation. Paid with x402 exact USDC on Base. No account is required.","contact":{"email":"support@brainiac.software"},"x-guidance":"BRAINIAC.software is a pay-per-call API for software agents. No account or API key is required.\nPayment uses x402 with exact USDC on Base (8453). Each paid resource accepts POST for the call; unpaid GET/HEAD return the same 402 payment challenge for discovery.\nHow to call an operation:\n1. POST JSON matching the requestBody. An unpaid POST (including empty body) returns 402 payment terms before body validation.\n2. Compare 402 payTo, asset, and network with /api/v1/catalog and /.well-known/x402 — not only with the 402 itself.\n3. Pay and retry with payment-signature. Invalid JSON/schema after payment-signature returns 400 and is not charged. Settlement (a charge) only on 2xx. payment-signature attached ≠ charged.\nIdempotency-Key: 64 hex chars from 32 random bytes. Reuse only for the same operation and body (replays stored response, including status=partial). A new key runs a fresh call.\nIdempotency after errors: unpaid 402 does not store the key. Post-signature 402/503 release it (retry same key). Pre-reserve schema 400 does not store it. Other post-signature responses (2xx/4xx/5xx) are stored: same key+body replays; different body → 409. Stored 4xx/5xx replays are not a second charge. Prefer a new key after fixing a 4xx; after 5xx reuse the same key only for the stored error.\nPost-signature 402/503 include prior-payment-attempt (nonce, settled false|unknown). A facilitator 502 is SETTLEMENT_UNKNOWN (stored under the Idempotency-Key; cross-instance replay needs the shared store; may already be charged) — check USDC authorizationState(payer, nonce) on Base before re-signing.\nSettlement signal: settled 2xx include payment-response. 4xx/5xx do not. Do not book a cost from payment-signature alone.\nCoverage billing: HTTP 200 with status complete, partial, or failed is charged at the full listed price. Retrying missing checks needs a new settled call. 4xx/5xx are not charged.\nmissing_items.reason: timeout/rate_limited → one delayed retry (new key); upstream_down → after recovery; not_supported → never.\nInvariants: any missing_items ⇒ not status complete; sources[] is provenance only (source, url, retrievedAt), never success/error keyed by check.\nFree lookup: GET /api/v1/results/{result_id} returns stored coverage JSON (404 RESULT_NOT_FOUND if unknown/expired; not a 402). Prior-Result-Id sets replaces_result_id.\nOutputs are prechecks/drafts for human review — not official determinations, legal advice, or certified filings."},"servers":[{"url":"https://www.brainiac.software"}],"paths":{"/api/v1/product-safety/cpsc-recall-search":{"post":{"operationId":"search_cpsc_product_recalls","summary":"Search CPSC product recalls","description":"Search US CPSC recalls by keyword, firm, recall number, UPC or date range in the vendored snapshot.","tags":["product-safety"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","minLength":2,"maxLength":120},"recallNumber":{"type":"string","minLength":1,"maxLength":40},"upc":{"type":"string","minLength":6,"maxLength":14},"firm":{"type":"string","minLength":1,"maxLength":120},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"limit":{"default":20,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false},"example":{"recallNumber":"27082"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"recalls":{"type":"array","items":{"type":"object","properties":{"recallId":{"type":"number"},"recallNumber":{"type":"string"},"recallDate":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"products":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"categoryId":{"type":"string"},"numberOfUnits":{"type":"string"}},"additionalProperties":true}},"importers":{"type":"array","items":{"type":"string"}},"manufacturerCountries":{"type":"array","items":{"type":"string"}}},"additionalProperties":true}},"snapshotDate":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"count":1,"recalls":[{"recallId":11060,"recallNumber":"27082","recallDate":"2026-11-12","title":"Allstar Recalls Sharper Image Tabletop and Infinity Fire Pits Due to Risk of Serious Injury from Burn and Fire Hazards","url":"https://www.cpsc.gov/Recalls/2027/Allstar-Recalls-Sharper-Image-Tabletop-and-Infinity-Fire-Pits-Due-to-Risk-of-Serious-…","products":[{"name":"Sharper Image Tabletop Fire Pits and Sharper Image Tabletop Infinity Fire Pits","type":"Outdoor Patio Heaters or Firepits (Manufactured)","categoryId":"895","numberOfUnits":"About 265,000"}],"importers":["Allstar Marketing Group, LLC, of Winston-Salem, North Carolina"],"manufacturerCountries":["China"]}],"snapshotDate":"2026-11-15","sources":[{"source":"CPSC Recalls Retrieval Web Service","url":"https://www.saferproducts.gov/RestWebServices/Recall?format=json","retrievedAt":"2026-11-15","status":"ok"}],"limitations":["Results read the vendored CPSC recall snapshot; saferproducts.gov is not called at request time."]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/product-safety/eu-safety-gate-alert":{"post":{"operationId":"search_eu_safety_gate_alerts","summary":"Search EU Safety Gate alerts","description":"Search EU Safety Gate (RAPEX) non-food product alerts from vendored English weekly reports since 2024.","tags":["product-safety"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"barcode":{"type":"string","minLength":1,"maxLength":40},"brand":{"type":"string","minLength":1,"maxLength":120},"query":{"type":"string","minLength":1,"maxLength":120},"category":{"type":"string","minLength":1,"maxLength":120},"riskType":{"type":"string","minLength":1,"maxLength":120},"notifyingCountry":{"type":"string","minLength":1,"maxLength":80},"level":{"type":"string","enum":["Serious risk","Other risk levels","Other types of alerts"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"limit":{"default":20,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false},"example":{"barcode":"5054298241091"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"alerts":{"type":"array","items":{"type":"object","properties":{"caseNumber":{"type":"string"},"publicationDate":{"type":"string"},"alertUrl":{"type":"string"},"category":{"type":"string"},"product":{"type":"string"},"brand":{"type":"string"},"name":{"type":"string"},"modelOrType":{"type":"string"},"barcode":{"type":"string"},"riskType":{"type":"string"},"notifyingCountry":{"type":"string"},"countryOfOrigin":{"type":"string"},"level":{"type":"string"},"weeklyReport":{"type":"string"}},"additionalProperties":true}},"snapshotDate":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"count":1,"alerts":[{"caseNumber":"SR/03208/26","publicationDate":"2026-11-10","alertUrl":"https://ec.europa.eu/safety-gate-alerts/screen/webReport/alertDetail/10118633","category":"Clothing, textiles and fashion items","product":"Children's jacket","brand":"Jojo Maman Bébé","name":"Baby Jacket Flower","modelOrType":"C52-683-145-000161","barcode":"5054298241091","riskType":"Chemical, Environment","notifyingCountry":"Luxembourg","countryOfOrigin":"People's Republic of China","level":"Serious risk","weeklyReport":"Report-2026-45"}],"snapshotDate":"2026-11-15","sources":[{"source":"EU Safety Gate weekly report XML (EN)","url":"https://ec.europa.eu/safety-gate-alerts/api/download/weeklyReport/list/xml/en","retrievedAt":"2026-11-15","status":"ok"}],"limitations":["Only English weekly reports from 2024 onward are vendored; earlier RAPEX history is not searched."]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/product-safety/fsa-allergy-alert-search":{"post":{"operationId":"search_fsa_allergy_and_food_alerts","summary":"Search FSA allergy and food alerts","description":"Search UK FSA allergy alerts, product recall information notices and food alerts for action.","tags":["product-safety"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"allergen":{"type":"string","minLength":1,"maxLength":40},"query":{"type":"string","minLength":1,"maxLength":120},"business":{"type":"string","minLength":1,"maxLength":120},"alertType":{"type":"array","items":{"type":"string","enum":["AA","PRIN","FAFA"]}},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"limit":{"default":20,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false},"example":{"allergen":"milk","business":"Tesco","from":"2026-11-01"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"alerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"created":{"type":"string"},"alertUrl":{"type":"string"},"business":{"type":"string"},"allergens":{"type":"array","items":{"type":"object","properties":{"notation":{"type":"string"},"label":{"type":"string"}},"additionalProperties":true}},"products":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"packSize":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":true}},"snapshotDate":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"count":1,"alerts":[{"id":"FSA-AA-53-2026","type":"AA","title":"Tesco recalls various Tesco Steak and Guinness Pie products because of undeclared milk","created":"2026-11-13","alertUrl":"https://www.food.gov.uk/news-alerts/alert/FSA-AA-53-2026","business":"Tesco","allergens":[{"notation":"milk","label":"Milk"}],"products":[{"name":"Tesco Steak and Guinness Pie","packSize":"200g"}]}],"snapshotDate":"2026-11-15","sources":[{"source":"FSA Food Alerts full view","url":"https://data.food.gov.uk/food-alerts/id?_limit=5000&_view=full","retrievedAt":"2026-11-15","status":"ok"}],"limitations":["Food Standards Scotland-only alerts are not in this feed."]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/product-safety/canada-health-recall-search":{"post":{"operationId":"search_canada_recalls_and_safety_alerts","summary":"Search Canada recalls and safety alerts","description":"Search Government of Canada Recalls and Safety Alerts open data in English or French.","tags":["product-safety"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":120},"organization":{"type":"string","minLength":1,"maxLength":120},"category":{"type":"string","minLength":1,"maxLength":120},"recallClass":{"type":"string","minLength":1,"maxLength":40},"includeArchived":{"default":false,"type":"boolean"},"language":{"default":"en","type":"string","enum":["en","fr"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"limit":{"default":20,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false},"example":{"query":"Jack'd Up Bites"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"recalls":{"type":"array","items":{"type":"object","properties":{"nid":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"},"organization":{"type":"string"},"issue":{"type":"string"},"category":{"type":"string"},"recallClass":{"type":"string"},"lastUpdated":{"type":"string"},"archived":{"type":"boolean"}},"additionalProperties":true}},"snapshotDate":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"count":1,"recalls":[{"nid":82929,"title":"Certain Plantropy brand Jack’d Up Bites Crispy Protein Bites recalled due to undeclared milk","url":"https://recalls-rappels.canada.ca/en/alert-recall/certain-plantropy-brand-jack-bites-crispy-protein-bites-recalled-due-…","organization":"CFIA","issue":"Milk","category":"Candy, confectionary, snacks and sweeteners","recallClass":"Class 1","lastUpdated":"2026-11-13","archived":false}],"snapshotDate":"2026-11-15","sources":[{"source":"Government of Canada Recalls and Safety Alerts open data","url":"https://recalls-rappels.canada.ca/sites/default/files/opendata-donneesouvertes/HCRSAMOpenData.csv","retrievedAt":"2026-11-15","status":"ok"}],"limitations":["Archived rows are excluded unless includeArchived is true."]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/product-safety/usda-fooddata-nutrition":{"post":{"operationId":"look_up_usda_fooddata_nutrition","summary":"Look up USDA FoodData nutrition","description":"Return nutrient values per 100 g from USDA FoodData Central Foundation Foods and SR Legacy.","tags":["product-safety"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"fdcId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"query":{"type":"string","minLength":2,"maxLength":100},"dataType":{"type":"array","items":{"type":"string","enum":["Foundation","SR Legacy"]}},"nutrients":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"limit":{"default":10,"type":"integer","minimum":1,"maximum":50}},"additionalProperties":false},"example":{"fdcId":173410,"nutrients":["Energy","Protein","Total lipid (fat)","Carbohydrate, by difference","Sodium, Na"]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"foods":{"type":"array","items":{"type":"object","properties":{"fdcId":{"type":"number"},"description":{"type":"string"},"dataType":{"type":"string"},"per100g":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"unit":{"type":"string"},"amount":{"type":"number"}},"additionalProperties":true}}},"additionalProperties":true}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"foods":[{"fdcId":173410,"description":"Butter, salted","dataType":"SR Legacy","per100g":[{"name":"Energy","unit":"kcal","amount":717},{"name":"Energy","unit":"kJ","amount":3000},"…"]}],"sources":[{"source":"USDA FoodData Central Foundation Foods + SR Legacy","url":"https://fdc.nal.usda.gov/download-datasets","retrievedAt":"2026-11-15","status":"ok"}],"limitations":["Branded and FNDDS survey foods are not vendored."]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/product-safety/gs1-digital-link-parse":{"post":{"operationId":"parse_a_gs1_digital_link_uri","summary":"Parse a GS1 Digital Link URI","description":"Parse an uncompressed GS1 Digital Link URI into primary key, qualifiers and attributes; return canonical URI and element string.","tags":["product-safety"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"uri":{"type":"string","minLength":8,"maxLength":2048}},"required":["uri"],"additionalProperties":false},"example":{"uri":"https://example.com/01/09520123456788/10/ABC1/21/12345?17=180426&linkType=gs1:traceability"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"primaryKey":{"type":"object","properties":{"ai":{"type":"string"},"title":{"type":"string"},"value":{"type":"string"}},"additionalProperties":true},"qualifiers":{"type":"array","items":{"type":"object","properties":{"ai":{"type":"string"},"title":{"type":"string"},"value":{"type":"string"}},"additionalProperties":true}},"attributes":{"type":"array","items":{"type":"object","properties":{"ai":{"type":"string"},"title":{"type":"string"},"value":{"type":"string"}},"additionalProperties":true}},"otherParams":{"type":"object","properties":{"linkType":{"type":"string"}},"additionalProperties":true},"canonicalUri":{"type":"string"},"elementString":{"type":"string"},"errors":{"type":"array","items":{}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."}},"additionalProperties":true},"example":{"valid":true,"primaryKey":{"ai":"01","title":"GTIN","value":"09520123456788"},"qualifiers":[{"ai":"10","title":"BATCH/LOT","value":"ABC1"},{"ai":"21","title":"SERIAL","value":"12345"}],"attributes":[{"ai":"17","title":"USE BY or EXPIRY","value":"180426"}],"otherParams":{"linkType":"gs1:traceability"},"canonicalUri":"https://id.gs1.org/01/09520123456788/10/ABC1/21/12345?17=180426","elementString":"(01)09520123456788(17)180426(10)ABC1(21)12345","errors":[],"sources":[{"source":"GS1 Digital Link URI Syntax 1.7.0 + Barcode Syntax Dictionary","url":"https://ref.gs1.org/standards/digital-link/uri-syntax/","retrievedAt":"2026-11-15","status":"ok"}]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}