{"openapi":"3.1.0","info":{"title":"Murph Product Data API","version":"1.0.0","description":"Normalized food, supplement, and exact-linked product-test data. Missing product tests are an evidence gap, not a safety finding."},"tags":[{"name":"Products","description":"Search and retrieve current source-backed product records."},{"name":"Specification","description":"Machine-readable API contract."}],"paths":{"/api/public/v1/products/search":{"post":{"operationId":"searchProducts","summary":"Search supplements and branded foods","description":"Returns separately ranked supplement and branded-food matches. The submitted query is not echoed in the response.","tags":["Products"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProductSearchRequest"},"example":{"query":"example product","kinds":["supplement","food"],"limitPerKind":6}}}},"responses":{"200":{"description":"Grouped product matches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProductSearchResponse"},"example":{"schema":"murph.public-products.v1","results":{"supplements":[],"foods":[]}}}}},"400":{"description":"Invalid JSON or request fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProductApiError"}}}},"413":{"description":"Request body exceeds 4 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProductApiError"}}}},"415":{"description":"Content-Type must be application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProductApiError"}}}},"429":{"description":"Per-IP request limit exceeded by the upstream firewall. The response body and headers are platform-defined and are not part of this API contract."},"500":{"description":"Unexpected server failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProductApiError"}}}},"503":{"description":"Product labels are temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProductApiError"}}}}}}},"/api/public/v1/products/{productRef}":{"get":{"operationId":"getProduct","summary":"Get normalized product evidence","description":"Returns label contents, nutrition, up to 20 exact-linked product-test observations, explicit counts, provenance, and known evidence gaps.","tags":["Products"],"security":[],"parameters":[{"name":"productRef","in":"path","required":true,"description":"Opaque product record identifier. It is not authorization.","schema":{"$ref":"#/components/schemas/PublicProductRef"},"example":"supplement_ZHNsZDoxMjM"}],"responses":{"200":{"description":"Normalized product evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProductDetailResponse"}}}},"404":{"description":"Product record not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProductApiError"}}}},"429":{"description":"Per-IP request limit exceeded by the upstream firewall. The response body and headers are platform-defined and are not part of this API contract."},"500":{"description":"Unexpected server failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProductApiError"}}}},"503":{"description":"Product labels are temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProductApiError"}}}}}}},"/api/public/v1/openapi.json":{"get":{"operationId":"getPublicProductsOpenApi","summary":"Get the OpenAPI document","tags":["Specification"],"security":[],"responses":{"200":{"description":"OpenAPI 3.1 document.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}}},"components":{"schemas":{"PublicProductApiError":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INVALID_JSON","INVALID_REQUEST","REQUEST_BODY_TOO_LARGE","UNSUPPORTED_MEDIA_TYPE","PRODUCT_NOT_FOUND","LABELS_UNAVAILABLE","INTERNAL_ERROR"]},"message":{"type":"string","minLength":1,"maxLength":512},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"PublicProductDetailResponse":{"type":"object","properties":{"schema":{"type":"string","const":"murph.public-products.v1"},"product":{"type":"object","properties":{"productRef":{"type":"string","minLength":6,"maxLength":1035,"pattern":"^(?:supplement|food)_[A-Za-z0-9_-]{1,1024}$"},"kind":{"type":"string","enum":["supplement","food"]},"name":{"type":"string","minLength":1,"maxLength":512},"brand":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"upc":{"anyOf":[{"type":"string","maxLength":32,"pattern":"^\\d+$"},{"type":"null"}]},"marketStatus":{"type":"string","enum":["active","off_market"]},"serving":{"anyOf":[{"type":"object","properties":{"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"unit":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"grams":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]}},"required":["description","amount","unit","grams"],"additionalProperties":false},{"type":"null"}]},"ingredients":{"type":"object","properties":{"structure":{"type":"string","enum":["structured","statement_only","unavailable"]},"statement":{"anyOf":[{"type":"string","minLength":1,"maxLength":16000},{"type":"null"}]},"otherStatement":{"anyOf":[{"type":"string","minLength":1,"maxLength":16000},{"type":"null"}]},"active":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":512},"amount":{"anyOf":[{"type":"object","properties":{"value":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"unit":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"display":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]}},"required":["value","unit","display"],"additionalProperties":false},{"type":"null"}]},"dailyValuePercent":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":2000},{"type":"null"}]},"children":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":512},"amount":{"anyOf":[{"type":"object","properties":{"value":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"unit":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"display":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]}},"required":["value","unit","display"],"additionalProperties":false},{"type":"null"}]},"dailyValuePercent":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":2000},{"type":"null"}]}},"required":["name","amount","dailyValuePercent","notes"],"additionalProperties":false}}},"required":["name","amount","dailyValuePercent","notes","children"],"additionalProperties":false}},"other":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":512},"amount":{"anyOf":[{"type":"object","properties":{"value":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"unit":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"display":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]}},"required":["value","unit","display"],"additionalProperties":false},{"type":"null"}]},"dailyValuePercent":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":2000},{"type":"null"}]},"children":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":512},"amount":{"anyOf":[{"type":"object","properties":{"value":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"unit":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"display":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]}},"required":["value","unit","display"],"additionalProperties":false},{"type":"null"}]},"dailyValuePercent":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":2000},{"type":"null"}]}},"required":["name","amount","dailyValuePercent","notes"],"additionalProperties":false}}},"required":["name","amount","dailyValuePercent","notes","children"],"additionalProperties":false}}},"required":["structure","statement","otherStatement","active","other"],"additionalProperties":false},"nutrition":{"type":"object","properties":{"basis":{"type":"string","enum":["per_serving","per_100_g","mixed","unavailable"]},"rows":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":512},"amount":{"anyOf":[{"type":"object","properties":{"value":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"unit":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"display":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]}},"required":["value","unit","display"],"additionalProperties":false},{"type":"null"}]},"dailyValuePercent":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"basis":{"type":"string","enum":["per_serving","per_100_g","source_unspecified"]}},"required":["name","amount","dailyValuePercent","basis"],"additionalProperties":false}}},"required":["basis","rows"],"additionalProperties":false},"productTests":{"type":"object","properties":{"status":{"type":"string","enum":["no_known_product_tests","known_product_tests"]},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"returned":{"type":"integer","minimum":0,"maximum":20},"truncated":{"type":"boolean"},"observations":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":512},"analyte":{"type":"object","properties":{"key":{"type":"string","maxLength":128,"pattern":"^[a-z0-9][a-z0-9_]*$"},"name":{"type":"string","minLength":1,"maxLength":256}},"required":["key","name"],"additionalProperties":false},"result":{"type":"object","properties":{"operator":{"type":"string","enum":["eq","lt","lte","gt","gte","range","not_detected","detected","trace"]},"value":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"upperValue":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"qualifier":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"detectionLimit":{"anyOf":[{"type":"object","properties":{"value":{"type":"number","minimum":0},"unit":{"type":"string","minLength":1,"maxLength":64}},"required":["value","unit"],"additionalProperties":false},{"type":"null"}]},"quantificationLimit":{"anyOf":[{"type":"object","properties":{"value":{"type":"number","minimum":0},"unit":{"type":"string","minLength":1,"maxLength":64}},"required":["value","unit"],"additionalProperties":false},{"type":"null"}]},"reportingLimit":{"anyOf":[{"type":"object","properties":{"value":{"type":"number","minimum":0},"unit":{"type":"string","minLength":1,"maxLength":64}},"required":["value","unit"],"additionalProperties":false},{"type":"null"}]},"uncertainty":{"anyOf":[{"type":"object","properties":{"value":{"type":"number","minimum":0},"unit":{"type":"string","minLength":1,"maxLength":64}},"required":["value","unit"],"additionalProperties":false},{"type":"null"}]},"unit":{"type":"string","minLength":1,"maxLength":64},"basis":{"type":"string","minLength":1,"maxLength":256}},"required":["operator","value","unit","basis"],"additionalProperties":false},"normalizedResult":{"anyOf":[{"type":"object","properties":{"value":{"type":"number","minimum":0},"upperValue":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"unit":{"type":"string","minLength":1,"maxLength":64},"basis":{"type":"string","minLength":1,"maxLength":256}},"required":["value","unit","basis"],"additionalProperties":false},{"type":"null"}]},"source":{"type":"object","properties":{"key":{"type":"string","maxLength":128,"pattern":"^[a-z][a-z0-9_]*$"},"name":{"type":"string","minLength":1,"maxLength":256},"url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri","pattern":"^https?:\\/\\/"},{"type":"null"}]},"reportTitle":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"reportDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["key","name","url","reportTitle","reportDate"],"additionalProperties":false},"testedProduct":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"brand":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"upc":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"sourceProductId":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"matchMethod":{"type":"string","enum":["exact_upc","exact_source_id","manual_confirmed"]}},"required":["name","brand","upc","sourceProductId","matchMethod"],"additionalProperties":false},"sample":{"type":"object","properties":{"evidenceType":{"type":"string","enum":["laboratory_measurement","regulatory_laboratory","regulatory_finding","xrf_screening","manufacturer_coa"]},"samplingContext":{"type":"string","maxLength":128,"pattern":"^[a-z][a-z0-9_]*$"},"sourceSampleId":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"sampleCount":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reportedUpc":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}]},"lotCode":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"bestBy":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"packageSize":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"collectedOn":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"testedOn":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"labName":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"testMethod":{"anyOf":[{"type":"string","minLength":1,"maxLength":2000},{"type":"null"}]}},"required":["evidenceType","samplingContext","sourceSampleId","lotCode","bestBy","packageSize","collectedOn","testedOn","labName","testMethod"],"additionalProperties":false},"labName":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"testMethod":{"anyOf":[{"type":"string","minLength":1,"maxLength":2000},{"type":"null"}]},"screening":{"anyOf":[{"type":"object","properties":{"comparison":{"type":"string","enum":["exceeds","does_not_exceed"]},"threshold":{"type":"object","properties":{"value":{"type":"number","minimum":0},"unit":{"type":"string","minLength":1,"maxLength":64},"basis":{"type":"string","minLength":1,"maxLength":256},"authority":{"type":"string","minLength":1,"maxLength":512},"name":{"type":"string","minLength":1,"maxLength":512},"url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri","pattern":"^https?:\\/\\/"},{"type":"null"}]}},"required":["value","unit","basis","authority","name","url"],"additionalProperties":false},"screeningPolicy":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"assumedBodyWeightKg":{"type":"number","exclusiveMinimum":0},"assumedServingsPerDay":{"type":"number","exclusiveMinimum":0},"servingGrams":{"type":"number","exclusiveMinimum":0},"exposure":{"type":"object","properties":{"value":{"type":"number","minimum":0},"unit":{"type":"string","minLength":1,"maxLength":64},"basis":{"type":"string","minLength":1,"maxLength":256}},"required":["value","unit","basis"],"additionalProperties":false},"ratio":{"type":"number","minimum":0}},"required":["id","assumedBodyWeightKg","assumedServingsPerDay","servingGrams","exposure","ratio"],"additionalProperties":false}},"required":["comparison","threshold"],"additionalProperties":false},{"type":"null"}]}},"required":["id","analyte","result","normalizedResult","source","testedProduct","labName","testMethod","screening"],"additionalProperties":false}},"alerts":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"analyte":{"type":"object","properties":{"key":{"type":"string","maxLength":128,"pattern":"^[a-z0-9][a-z0-9_]*$"},"name":{"type":"string","minLength":1,"maxLength":256}},"required":["key","name"],"additionalProperties":false},"concernLevel":{"type":"string","enum":["low","medium","high"]},"result":{"type":"object","properties":{"operator":{"type":"string","enum":["eq","lt","lte","gt","gte","range","not_detected","detected","trace"]},"value":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"upperValue":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"qualifier":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"detectionLimit":{"anyOf":[{"type":"object","properties":{"value":{"type":"number","minimum":0},"unit":{"type":"string","minLength":1,"maxLength":64}},"required":["value","unit"],"additionalProperties":false},{"type":"null"}]},"quantificationLimit":{"anyOf":[{"type":"object","properties":{"value":{"type":"number","minimum":0},"unit":{"type":"string","minLength":1,"maxLength":64}},"required":["value","unit"],"additionalProperties":false},{"type":"null"}]},"reportingLimit":{"anyOf":[{"type":"object","properties":{"value":{"type":"number","minimum":0},"unit":{"type":"string","minLength":1,"maxLength":64}},"required":["value","unit"],"additionalProperties":false},{"type":"null"}]},"uncertainty":{"anyOf":[{"type":"object","properties":{"value":{"type":"number","minimum":0},"unit":{"type":"string","minLength":1,"maxLength":64}},"required":["value","unit"],"additionalProperties":false},{"type":"null"}]},"unit":{"type":"string","minLength":1,"maxLength":64},"basis":{"type":"string","minLength":1,"maxLength":256}},"required":["operator","value","unit","basis"],"additionalProperties":false},"threshold":{"type":"object","properties":{"value":{"type":"number","minimum":0},"unit":{"type":"string","minLength":1,"maxLength":64},"basis":{"type":"string","minLength":1,"maxLength":256},"authority":{"type":"string","minLength":1,"maxLength":512},"name":{"type":"string","minLength":1,"maxLength":512},"url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri","pattern":"^https?:\\/\\/"},{"type":"null"}]}},"required":["value","unit","basis","authority","name","url"],"additionalProperties":false},"screeningPolicy":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"assumedBodyWeightKg":{"type":"number","exclusiveMinimum":0},"assumedServingsPerDay":{"type":"number","exclusiveMinimum":0},"servingGrams":{"type":"number","exclusiveMinimum":0},"exposure":{"type":"object","properties":{"value":{"type":"number","minimum":0},"unit":{"type":"string","minLength":1,"maxLength":64},"basis":{"type":"string","minLength":1,"maxLength":256}},"required":["value","unit","basis"],"additionalProperties":false},"ratio":{"type":"number","minimum":0}},"required":["id","assumedBodyWeightKg","assumedServingsPerDay","servingGrams","exposure","ratio"],"additionalProperties":false},"source":{"type":"object","properties":{"key":{"type":"string","maxLength":128,"pattern":"^[a-z][a-z0-9_]*$"},"name":{"type":"string","minLength":1,"maxLength":256},"url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri","pattern":"^https?:\\/\\/"},{"type":"null"}]},"reportTitle":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"reportDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["key","name","url","reportTitle","reportDate"],"additionalProperties":false},"testedProduct":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"brand":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"upc":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"sourceProductId":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"matchMethod":{"type":"string","enum":["exact_upc","exact_source_id","manual_confirmed"]}},"required":["name","brand","upc","sourceProductId","matchMethod"],"additionalProperties":false},"sample":{"type":"object","properties":{"evidenceType":{"type":"string","enum":["laboratory_measurement","regulatory_laboratory","regulatory_finding","xrf_screening","manufacturer_coa"]},"samplingContext":{"type":"string","maxLength":128,"pattern":"^[a-z][a-z0-9_]*$"},"sourceSampleId":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"sampleCount":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reportedUpc":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}]},"lotCode":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"bestBy":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"packageSize":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"collectedOn":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"testedOn":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"labName":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"testMethod":{"anyOf":[{"type":"string","minLength":1,"maxLength":2000},{"type":"null"}]}},"required":["evidenceType","samplingContext","sourceSampleId","lotCode","bestBy","packageSize","collectedOn","testedOn","labName","testMethod"],"additionalProperties":false}},"required":["analyte","concernLevel","result","threshold","source","testedProduct"],"additionalProperties":false}}},"required":["status","total","returned","truncated","observations","alerts"],"additionalProperties":false,"description":"Exact-linked product tests. Missing tests are an evidence gap, not a safety finding."},"source":{"type":"object","properties":{"key":{"type":"string","maxLength":128,"pattern":"^[a-z][a-z0-9_]*$"},"name":{"type":"string","minLength":1,"maxLength":256},"recordId":{"type":"string","minLength":1,"maxLength":512},"url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri","pattern":"^https?:\\/\\/"},{"type":"null"}]},"releaseDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"importedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["key","name","recordId","url","releaseDate","lastSeenAt","importedAt"],"additionalProperties":false},"unknowns":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["NO_LINKED_PRODUCT_TESTS","INGREDIENTS_STATEMENT_ONLY","INGREDIENTS_UNAVAILABLE","NUTRITION_UNAVAILABLE","SERVING_MASS_UNAVAILABLE","FORMULA_REVISION_NOT_TRACKED","LABEL_CONTENT_OMITTED","TESTED_LOT_NOT_REPORTED","TEST_LAB_NOT_REPORTED","TEST_METHOD_NOT_REPORTED","TEST_THRESHOLD_NOT_COMPARABLE"]},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","minLength":1,"maxLength":1000}},"required":["code","title","description"],"additionalProperties":false}}},"required":["productRef","kind","name","brand","upc","marketStatus","serving","ingredients","nutrition","productTests","source","unknowns"],"additionalProperties":false}},"required":["schema","product"],"additionalProperties":false},"PublicProductRef":{"type":"string","minLength":6,"maxLength":1035,"pattern":"^(?:supplement|food)_[A-Za-z0-9_-]{1,1024}$"},"PublicProductSearchRequest":{"type":"object","properties":{"query":{"type":"string","minLength":2,"maxLength":128},"kinds":{"default":["supplement","food"],"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["supplement","food"]},"uniqueItems":true},"limitPerKind":{"default":6,"type":"integer","minimum":1,"maximum":10}},"required":["query"],"additionalProperties":false},"PublicProductSearchResponse":{"type":"object","properties":{"schema":{"type":"string","const":"murph.public-products.v1"},"results":{"type":"object","properties":{"supplements":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"productRef":{"type":"string","minLength":6,"maxLength":1035,"pattern":"^(?:supplement|food)_[A-Za-z0-9_-]{1,1024}$"},"name":{"type":"string","minLength":1,"maxLength":512},"brand":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"upc":{"anyOf":[{"type":"string","maxLength":32,"pattern":"^\\d+$"},{"type":"null"}]},"source":{"type":"object","properties":{"key":{"type":"string","maxLength":128,"pattern":"^[a-z][a-z0-9_]*$"},"name":{"type":"string","minLength":1,"maxLength":256}},"required":["key","name"],"additionalProperties":false},"productTests":{"type":"object","properties":{"status":{"type":"string","enum":["no_known_product_tests","known_product_tests"]},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["status","total"],"additionalProperties":false},"kind":{"type":"string","const":"supplement"}},"required":["productRef","name","brand","upc","source","productTests","kind"],"additionalProperties":false}},"foods":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"productRef":{"type":"string","minLength":6,"maxLength":1035,"pattern":"^(?:supplement|food)_[A-Za-z0-9_-]{1,1024}$"},"name":{"type":"string","minLength":1,"maxLength":512},"brand":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"upc":{"anyOf":[{"type":"string","maxLength":32,"pattern":"^\\d+$"},{"type":"null"}]},"source":{"type":"object","properties":{"key":{"type":"string","maxLength":128,"pattern":"^[a-z][a-z0-9_]*$"},"name":{"type":"string","minLength":1,"maxLength":256}},"required":["key","name"],"additionalProperties":false},"productTests":{"type":"object","properties":{"status":{"type":"string","enum":["no_known_product_tests","known_product_tests"]},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["status","total"],"additionalProperties":false},"kind":{"type":"string","const":"food"}},"required":["productRef","name","brand","upc","source","productTests","kind"],"additionalProperties":false}}},"required":["supplements","foods"],"additionalProperties":false}},"required":["schema","results"],"additionalProperties":false}}}}