{"openapi":"3.1.0","info":{"title":"China Bank Offers Facts API","version":"0.1.0","description":"Source-linked bank card offer facts for agents. No rankings or recommendations."},"servers":[{"url":"https://agent-offers-api-replitzip.replit.app"}],"externalDocs":{"description":"Agent discovery and remote MCP details","url":"https://agent-offers-api-replitzip.replit.app/docs"},"x-agent-capabilities":{"supportedBanks":"/v1/supported-banks","remoteMcp":{"transport":"streamable-http","endpoint":"/mcp","tools":["list_supported_banks","search_offers"]}},"paths":{"/v1/offers/search":{"post":{"operationId":"searchOfferFacts","summary":"Search structured bank card offer facts","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}}},"responses":{"200":{"description":"Facts or a trustworthy non-result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"400":{"description":"Malformed JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Payment required under x402 v2","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"}}}},"409":{"description":"Payment credential replay or terminal state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid structured filters or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-client search rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds until this client may retry.","schema":{"type":"integer","minimum":1}},"X-RateLimit-Limit":{"schema":{"type":"integer","minimum":1}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}}}},"503":{"description":"Insufficient coverage or settlement reconciliation pending","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InsufficientCoverageResponse"},{"$ref":"#/components/schemas/Error"}]}}}}}}},"/v1/banks/{bank_code}/offers/search":{"post":{"operationId":"searchBankOfferFacts","summary":"Search one published bank through a stable market alias","parameters":[{"name":"bank_code","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Z0-9][A-Z0-9_-]{0,63}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankSearchFilters"}}}},"responses":{"200":{"description":"A bounded bank data snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankSearchResponse"}}}},"402":{"description":"Payment required under x402 v2","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"}}}},"422":{"description":"Unsupported bank or invalid filters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Published bank is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/supported-banks":{"get":{"operationId":"listSupportedBanks","summary":"List queryable banks and current data status without payment","responses":{"200":{"description":"Current bank capability snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportedBanksSnapshot"}}}}}}},"/v1/coverage":{"get":{"operationId":"getCoverage","responses":{"200":{"description":"Current coverage declaration"}}}},"/v1/status":{"get":{"operationId":"getStatus","responses":{"200":{"description":"Service and pipeline health"}}}},"/v1/sample":{"get":{"operationId":"getSyntheticSample","responses":{"200":{"description":"Synthetic schema example"}}}}},"components":{"schemas":{"SearchRequest":{"type":"object","properties":{"bank_codes":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"}},"card_types":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["credit","debit"]}},"regions":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"}},"merchant":{"type":"string","maxLength":200},"payment_channels":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"}},"active_at":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"limit":{"default":20,"type":"integer","exclusiveMinimum":0,"maximum":100},"cursor":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}]}},"additionalProperties":false,"anyOf":[{"required":["bank_codes"]},{"required":["card_types"]},{"required":["regions"]},{"required":["merchant"]},{"required":["payment_channels"]}],"allOf":[{"if":{"properties":{"cursor":{"type":"string"}},"required":["cursor"]},"then":{"required":["active_at"]}}]},"BankSearchFilters":{"type":"object","properties":{"card_types":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["credit","debit"]}},"regions":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"}},"merchant":{"type":"string","maxLength":200},"payment_channels":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$"}},"active_at":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"limit":{"default":100,"type":"integer","exclusiveMinimum":0,"maximum":100},"cursor":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}]}},"additionalProperties":false,"allOf":[{"if":{"properties":{"cursor":{"type":"string"}},"required":["cursor"]},"then":{"required":["active_at"]}}]},"AtomicOfferFact":{"type":"object","properties":{"offer_id":{"type":"string","pattern":"^off_[0-9A-HJKMNP-TV-Z]{26}$"},"campaign_id":{"type":"string","pattern":"^cmp_[0-9A-HJKMNP-TV-Z]{26}$"},"source_rule_key":{"type":"string","minLength":1},"sibling_relation":{"type":"string","enum":["independent","mutually_exclusive","stackable","all_of","one_of"]},"bank_code":{"type":"string","pattern":"^[A-Z0-9]{2,12}$"},"bank_name":{"type":"string","minLength":1},"activity_title":{"type":"string","minLength":1},"catalog_scope_label":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"access":{"type":"object","properties":{"mode":{"type":"string","enum":["public_deterministic","public_holder_state"]},"personalization_reason":{"type":"string","enum":["invitation_sms","platform_display_only","pregranted_reward","none"]}},"required":["mode","personalization_reason"],"additionalProperties":false},"holder_eligibility_regions":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"included":{"type":"array","items":{"type":"string","minLength":1}},"excluded":{"type":"array","items":{"type":"string","minLength":1}},"completeness":{"type":"string","enum":["complete","partial"]}},"required":["state","included","excluded","completeness"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["state","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable"}},"required":["state"],"additionalProperties":false}]},"transaction_geography":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"included":{"type":"array","items":{"type":"string","minLength":1}},"excluded":{"type":"array","items":{"type":"string","minLength":1}},"completeness":{"type":"string","enum":["complete","partial"]}},"required":["state","included","excluded","completeness"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["state","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable"}},"required":["state"],"additionalProperties":false}]},"merchant_service_geography":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"included":{"type":"array","items":{"type":"string","minLength":1}},"excluded":{"type":"array","items":{"type":"string","minLength":1}},"completeness":{"type":"string","enum":["complete","partial"]}},"required":["state","included","excluded","completeness"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["state","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable"}},"required":["state"],"additionalProperties":false}]},"card_eligibility":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"card_types":{"minItems":1,"type":"array","items":{"type":"string","enum":["credit","debit"]}},"all_products_eligible":{"type":"boolean"},"eligible_products":{"type":"array","items":{"type":"string","minLength":1}}},"required":["state","card_types","all_products_eligible","eligible_products"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["state","reason"],"additionalProperties":false}]},"merchant_scope":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"merchant_names":{"type":"array","items":{"type":"string","minLength":1}},"merchant_categories":{"type":"array","items":{"type":"string","minLength":1}},"store_scope_complete":{"type":"boolean"},"dynamic_store_set":{"type":"boolean"},"store_list_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["state","merchant_names","merchant_categories","store_scope_complete","dynamic_store_set","store_list_url"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["state","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable"}},"required":["state"],"additionalProperties":false}]},"qualification":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"expression":{"$ref":"#/$defs/__schema0"}},"required":["state","expression"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["state","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable"}},"required":["state"],"additionalProperties":false}]},"benefits":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"fixed"},"description":{"type":"string","minLength":1},"amount":{"type":"object","properties":{"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d{1,2})?$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false}},"required":["type","description","amount"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"random_range"},"description":{"type":"string","minLength":1},"min_amount":{"type":"object","properties":{"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d{1,2})?$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false},"max_amount":{"type":"object","properties":{"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d{1,2})?$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false}},"required":["type","description","min_amount","max_amount"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"percentage"},"description":{"type":"string","minLength":1},"rate":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d{1,4})?$"},"cap":{"anyOf":[{"type":"object","properties":{"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d{1,2})?$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]}},"required":["type","description","rate","cap"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"points"},"description":{"type":"string","minLength":1},"points":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","description","points"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["gift","service","voucher"]},"description":{"type":"string","minLength":1}},"required":["type","description"],"additionalProperties":false}]}},"benefit_composition":{"type":"string","enum":["single","all_of","one_of","bundle"]},"benefit_text":{"type":"string","minLength":1},"payment_route":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"platforms":{"type":"array","items":{"type":"string","minLength":1}},"wallets":{"type":"array","items":{"type":"string","minLength":1}},"card_networks":{"type":"array","items":{"type":"string","minLength":1}},"clearing_networks":{"type":"array","items":{"type":"string","minLength":1}},"interaction_modes":{"type":"array","items":{"type":"string","minLength":1}},"installment_terms":{"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}},"required":["state","platforms","wallets","card_networks","clearing_networks","interaction_modes","installment_terms"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["state","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable"}},"required":["state"],"additionalProperties":false}]},"lifecycle_windows":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["campaign","enrollment","qualification","claim","redemption","usage"]},"state":{"type":"string","const":"known"},"timing":{"type":"string","const":"absolute"},"start_at":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"end_at":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["type","state","timing","start_at","end_at"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["campaign","enrollment","qualification","claim","redemption","usage"]},"state":{"type":"string","const":"known"},"timing":{"type":"string","const":"relative"},"anchor":{"type":"string","minLength":1},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","enum":["day","week","calendar_month"]},"duration":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"description":{"type":"string","minLength":1}},"required":["type","state","timing","anchor","offset","unit","duration","description"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["campaign","enrollment","qualification","claim","redemption","usage"]},"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["type","state","reason"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["campaign","enrollment","qualification","claim","redemption","usage"]},"state":{"type":"string","const":"not_applicable"}},"required":["type","state"],"additionalProperties":false}]}},"recurrence":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"days_of_week":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"all_day":{"type":"boolean"},"time_windows":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"end":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":["start","end"],"additionalProperties":false}},"timezone":{"type":"string","minLength":1}},"required":["state","days_of_week","all_day","time_windows","timezone"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["state","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable"}},"required":["state"],"additionalProperties":false}]},"enrollment":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"required":{"type":"boolean"},"method":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"entry_url":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"url":{"type":"string","format":"uri"}},"required":["state","url"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["state","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable"}},"required":["state"],"additionalProperties":false}]}},"required":["state","required","method","entry_url"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["state","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable"}},"required":["state"],"additionalProperties":false}]},"quota":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"observable":{"type":"boolean"},"items":{"minItems":1,"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["count","money","points"]},"period":{"type":"string","minLength":1},"segment":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"value":{"anyOf":[{"type":"number","minimum":0},{"type":"object","properties":{"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d{1,2})?$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false}]}},"required":["unit","period","segment","value"],"additionalProperties":false}}},"required":["state","observable","items"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"observable":{"type":"boolean","const":false},"reason":{"type":"string","minLength":1}},"required":["state","observable","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable"}},"required":["state"],"additionalProperties":false}]},"usage_limits":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"items":{"minItems":1,"type":"array","items":{"type":"object","properties":{"scope":{"type":"string","enum":["per_customer","per_card","per_account","per_device"]},"period":{"type":"string","minLength":1},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["scope","period","count"],"additionalProperties":false}}},"required":["state","items"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["state","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable"}},"required":["state"],"additionalProperties":false}]},"stacking_policy":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"policy":{"type":"string","enum":["stackable","not_stackable","conditional"]},"summary":{"type":"string","minLength":1}},"required":["state","policy","summary"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["state","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable"}},"required":["state"],"additionalProperties":false}]},"refund_policy":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"summary":{"type":"string","minLength":1}},"required":["state","summary"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["state","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable"}},"required":["state"],"additionalProperties":false}]},"unstructured_conditions":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"items":{"type":"array","items":{"type":"string","minLength":1}}},"required":["state","items"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["state","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable"}},"required":["state"],"additionalProperties":false}]},"exclusions":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"known"},"items":{"type":"array","items":{"type":"string","minLength":1}}},"required":["state","items"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unknown"},"reason":{"type":"string","minLength":1}},"required":["state","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable"}},"required":["state"],"additionalProperties":false}]},"start_at":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"end_at":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"status":{"type":"string","enum":["scheduled","active","expired","withdrawn"]},"verification_state":{"type":"string","enum":["verified","stale"]},"source_url":{"type":"string","format":"uri"},"source_document_url":{"type":"string","format":"uri"},"source_type":{"type":"string","const":"bank_official"},"source_published_at":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"observed_at":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"last_verified_at":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"source_hash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"limitations":{"type":"array","items":{"type":"string","minLength":1}},"parse_warnings":{"type":"array","items":{"type":"string","minLength":1}}},"required":["offer_id","campaign_id","source_rule_key","sibling_relation","bank_code","bank_name","catalog_scope_label","access","holder_eligibility_regions","transaction_geography","merchant_service_geography","card_eligibility","merchant_scope","qualification","benefits","benefit_composition","benefit_text","payment_route","lifecycle_windows","recurrence","enrollment","quota","usage_limits","stacking_policy","refund_policy","unstructured_conditions","exclusions","start_at","end_at","status","verification_state","source_url","source_type","source_published_at","observed_at","last_verified_at","source_hash","version","limitations","parse_warnings"],"additionalProperties":false,"$defs":{"__schema0":{"type":"object","properties":{"operator":{"type":"string","enum":["all_of","any_of"]},"clauses":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","minLength":1},"operator":{"type":"string","enum":["eq","neq","in","not_in","gte","gt","lte","lt","contains","exists"]},"value":{"$ref":"#/$defs/__schema1"}},"required":["field","operator","value"],"additionalProperties":false},{"$ref":"#/$defs/__schema0"}]}}},"required":["operator","clauses"],"additionalProperties":false},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]}}},"Coverage":{"type":"object","properties":{"scope":{"type":"string","enum":["covered","not_covered","personalized_unobservable"]},"enumeration":{"type":"string","enum":["complete","partial"]},"ingestion":{"type":"string","enum":["complete","partial"]},"extraction":{"type":"string","enum":["complete","partial"]},"freshness":{"type":"string","enum":["fresh","overdue"]},"source_health":{"type":"string","enum":["healthy","degraded","unavailable"]},"discovered_source_item_count":{"type":"integer","minimum":0},"fetched_source_item_count":{"type":"integer","minimum":0},"parsed_source_item_count":{"type":"integer","minimum":0},"source_item_quarantined_count":{"type":"integer","minimum":0},"extracted_rule_count":{"type":"integer","minimum":0},"published_rule_count":{"type":"integer","minimum":0},"excluded_rule_count":{"type":"integer","minimum":0},"rule_quarantined_count":{"type":"integer","minimum":0},"missing_sources":{"type":"array","items":{"type":"string"}},"limitations":{"type":"array","items":{"type":"string"}}},"required":["scope","enumeration","ingestion","extraction","freshness","source_health","discovered_source_item_count","fetched_source_item_count","parsed_source_item_count","source_item_quarantined_count","extracted_rule_count","published_rule_count","excluded_rule_count","rule_quarantined_count","missing_sources","limitations"],"additionalProperties":false},"NormalizedFilters":{"type":"object","properties":{"bank_codes":{"type":"array","items":{"type":"string"}},"card_types":{"type":"array","items":{"type":"string","enum":["credit","debit"]}},"regions":{"type":"array","items":{"type":"string"}},"merchant":{"type":"string"},"payment_channels":{"type":"array","items":{"type":"string"}},"active_at":{"type":"string","format":"date-time"},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":["active_at","limit"],"additionalProperties":false},"SearchResponse":{"type":"object","properties":{"request_id":{"type":"string"},"normalized_filters":{"$ref":"#/components/schemas/NormalizedFilters"},"data_as_of":{"type":"string","format":"date-time"},"coverage":{"$ref":"#/components/schemas/Coverage"},"result_state":{"type":"string","enum":["found","no_matching_offer","not_covered","personalized_unobservable"]},"results":{"type":"array","items":{"$ref":"#/components/schemas/AtomicOfferFact"}},"next_cursor":{"type":["string","null"]}},"required":["request_id","normalized_filters","data_as_of","coverage","result_state","results","next_cursor"],"additionalProperties":false},"BankSearchResponse":{"type":"object","properties":{"request_id":{"type":"string"},"bank":{"$ref":"#/components/schemas/BankCapabilityIdentity"},"normalized_filters":{"type":"object"},"snapshot_id":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"data_as_of":{"type":"string","format":"date-time"},"coverage":{"$ref":"#/components/schemas/Coverage"},"result_state":{"type":"string","enum":["offers_found","no_records_in_snapshot"]},"offers":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/AtomicOfferFact"}},"count":{"type":"integer","minimum":0,"maximum":100},"truncated":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["request_id","bank","normalized_filters","snapshot_id","data_as_of","coverage","result_state","offers","count","truncated","next_cursor"],"additionalProperties":false},"BankCapabilityIdentity":{"type":"object","properties":{"bank_code":{"type":"string"},"bank_name_zh":{"type":"string"},"bank_name_en":{"type":"string"}},"required":["bank_code","bank_name_zh","bank_name_en"],"additionalProperties":false},"BankCapability":{"type":"object","properties":{"bank_code":{"type":"string"},"bank_name_zh":{"type":"string"},"bank_name_en":{"type":"string"},"data_as_of":{"type":"string","format":"date-time"},"coverage_state":{"type":"string","enum":["complete","partial","degraded","stale","unavailable"]},"search_enabled":{"type":"boolean"},"source_ids":{"type":"array","items":{"type":"string"}},"published_offer_count":{"type":"integer","minimum":0},"limitations":{"type":"array","items":{"type":"string"}}},"required":["bank_code","bank_name_zh","bank_name_en","data_as_of","coverage_state","search_enabled","source_ids","published_offer_count","limitations"],"additionalProperties":false},"SupportedBanksSnapshot":{"type":"object","properties":{"coverage_version":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"generated_at":{"type":"string","format":"date-time"},"valid_until":{"type":"string","format":"date-time"},"banks":{"type":"array","items":{"$ref":"#/components/schemas/BankCapability"}}},"required":["coverage_version","generated_at","valid_until","banks"],"additionalProperties":false},"InsufficientCoverageResponse":{"type":"object","properties":{"request_id":{"type":"string"},"normalized_filters":{"$ref":"#/components/schemas/NormalizedFilters"},"data_as_of":{"type":"string","format":"date-time"},"coverage":{"$ref":"#/components/schemas/Coverage"},"error":{"type":"object","properties":{"code":{"const":"insufficient_coverage"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["request_id","normalized_filters","data_as_of","coverage","error"],"additionalProperties":false},"Error":{"type":"object","properties":{"request_id":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false}},"required":["request_id","error"],"additionalProperties":false}}}}