{"openapi":"3.1.0","info":{"title":"LoyalPass Vendor API","version":"1.0.0","description":"Read and decide status match requests for your loyalty programs. Responses never contain member names or contact details."},"servers":[{"url":"https://admin.loyalpass.ai/api/public/v1"}],"security":[{"connectionKey":[]}],"components":{"securitySchemes":{"connectionKey":{"type":"http","scheme":"bearer","description":"Connection key from the Vendor page (starts with lp_)."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"MatchRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"state":{"type":"string","enum":["submitted","approved","declined"]},"is_renewal":{"type":"boolean"},"target_program_id":{"type":"string","format":"uuid"},"tier_offered_id":{"type":["string","null"],"format":"uuid"},"submitted_at":{"type":"string","format":"date-time"},"decided_at":{"type":["string","null"],"format":"date-time"}}},"WebhookEvent":{"type":"object","required":["id","type","data"],"properties":{"id":{"type":"string","description":"Stable per request and event type; use it to ignore repeats."},"type":{"type":"string","enum":["match_request.submitted","match_request.decided","match_request.granted","test"]},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"state":{"type":"string"},"target_program_id":{"type":"string","format":"uuid"},"tier_offered_id":{"type":["string","null"]},"submitted_at":{"type":"string","format":"date-time"},"decided_at":{"type":["string","null"],"format":"date-time"},"granted":{"type":"boolean"}}}}}}},"paths":{"/match-requests":{"get":{"operationId":"listMatchRequests","summary":"List match requests for your programs","description":"Newest first.","parameters":[{"name":"state","in":"query","schema":{"type":"string","enum":["submitted","approved","declined"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Requests","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MatchRequest"}}}}}}},"401":{"description":"Missing or unknown key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Vendor account is not active","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/match-requests/{id}/decision":{"post":{"operationId":"decideMatchRequest","summary":"Approve or decline a submitted request","description":"Approval is not a status grant.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["decision"],"properties":{"decision":{"type":"string","enum":["approve","decline"]},"note":{"type":"string","maxLength":1000}}}}}},"responses":{"200":{"description":"Decided","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string"}}}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or unknown key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"already_decided or consent_withdrawn","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/match-requests/{id}/grant":{"post":{"operationId":"confirmMatchGrant","summary":"Confirm the status is active in your program","description":"Issues one invoice for the match fee. Safe to retry.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Granted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string"},"selection_id":{"type":"string"},"invoice":{"type":"object","properties":{"status":{"type":"string","enum":["created","existing","pending"]},"amount_minor":{"type":"integer"},"currency":{"type":"string"},"reason":{"type":"string"}}}}}}}},"401":{"description":"Missing or unknown key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"not_approved, consent_withdrawn or grant_details_incomplete","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"matchRequestEvent":{"post":{"summary":"Request event sent to your notification address","description":"Signed with LoyalPass-Signature: t=<unix seconds>,v1=HMAC-SHA256(signing secret, \"<t>.<raw body>\").","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Return any 2xx to acknowledge."}}}}}}