{"openapi":"3.0.3","info":{"title":"lma39ol Merchant Trust API","version":"1.0.0","description":"Merchant, admin, public trust, billing, and storefront integration endpoints."},"servers":[{"url":"/"}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"A merchant API key (prefixed `lma_`) for a store backend. Never expose it in browser or mobile-client code."},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"RatingScores":{"type":"object","properties":{"responsiveness":{"type":"integer","minimum":0,"maximum":5,"description":"How quickly the seller responded to inquiries."},"communicationQuality":{"type":"integer","minimum":0,"maximum":5},"problemResolution":{"type":"integer","minimum":0,"maximum":5},"productDescription":{"type":"integer","minimum":0,"maximum":5,"description":"Was the product as described."},"productQuality":{"type":"integer","minimum":0,"maximum":5},"deliveryTime":{"type":"integer","minimum":0,"maximum":5},"packaging":{"type":"integer","minimum":0,"maximum":5},"shippingCost":{"type":"integer","minimum":0,"maximum":5},"deliveryCondition":{"type":"integer","minimum":0,"maximum":5}}}}},"security":[{"apiKeyAuth":[]}],"paths":{"/auth/register":{"post":{"summary":"Register a merchant account","security":[],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/auth/login":{"post":{"summary":"Log in as a merchant","security":[],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string"}},"required":["email","password"]}}}}}},"/auth/verify-email":{"post":{"summary":"Verify merchant email with a code","security":[],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/auth/resend-code":{"post":{"summary":"Resend a merchant verification code","security":[],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/auth/check-email":{"post":{"summary":"Begin merchant password recovery","security":[],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/auth/check-code":{"post":{"summary":"Check merchant password recovery code","security":[],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/auth/reset-password":{"post":{"summary":"Reset merchant password","security":[],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/auth/logout":{"post":{"summary":"Revoke all caller sessions","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/admin/auth/login":{"post":{"summary":"Log in as an administrator","security":[],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"}},"required":["username","password"]}}}}}},"/admin/auth/logout":{"post":{"summary":"Revoke all administrator sessions","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/merchants":{"get":{"summary":"List merchants (admin)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}},"delete":{"summary":"Delete a merchant (admin)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/merchants/change-balance":{"post":{"summary":"Change merchant balance (admin)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/merchants/change-status":{"post":{"summary":"Change merchant status (admin)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/merchants/update":{"post":{"summary":"Update owned merchant or admin-managed merchant","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/merchants/change-password":{"post":{"summary":"Change merchant password","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/merchants/me/trust":{"get":{"summary":"Read current merchant trust badge","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/ratings/{ratingId}/reply":{"patch":{"summary":"Reply to an owned merchant review","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}},"parameters":[{"name":"ratingId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]}}}}}},"/ratings/{ratingId}/moderation":{"patch":{"summary":"Moderate a merchant review (admin)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}},"parameters":[{"name":"ratingId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["published","flagged","removed"]},"reason":{"type":"string","description":"Required for flagged and removed transitions."},"flags":{"type":"array","items":{"type":"string"}}},"required":["status"]}}}}}},"/payments/subscription":{"get":{"summary":"Read current merchant subscription","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/payments/checkout-sessions":{"post":{"summary":"Create a Stripe checkout session","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"planId":{"type":"string"}},"required":["planId"]}}}}}},"/payments/portal-sessions":{"post":{"summary":"Create a Stripe billing portal session","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/payments/subscription/cancel":{"post":{"summary":"Cancel merchant subscription","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/public/payments/plans":{"get":{"summary":"List public subscription plans","security":[],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/public/payments/webhook":{"post":{"summary":"Receive a Stripe-signed event","security":[],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}},"description":"Server-to-server only. Requires a valid Stripe-Signature header; not a browser integration."}},"/health":{"get":{"summary":"Service liveness","security":[],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/ready":{"get":{"summary":"Database and durable-store readiness","security":[],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/metrics":{"get":{"summary":"Prometheus metrics","security":[],"responses":{"200":{"description":"Request completed."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}},"description":"Requires a bearer METRICS_TOKEN when configured. Operator-only, not a dashboard user token."}},"/ratings":{"post":{"summary":"Submit a rating about a buyer","description":"Authenticated as a merchant, this always creates a private buyer-risk rating (not a public merchant score) — merchants cannot self-review. To collect a public, buyer-authored review instead, use the review-invitations flow below.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["orderReference"],"properties":{"orderReference":{"type":"string"},"orderValue":{"type":"number"},"responsiveness":{"type":"integer","minimum":0,"maximum":5,"description":"How quickly the seller responded to inquiries."},"communicationQuality":{"type":"integer","minimum":0,"maximum":5},"problemResolution":{"type":"integer","minimum":0,"maximum":5},"productDescription":{"type":"integer","minimum":0,"maximum":5,"description":"Was the product as described."},"productQuality":{"type":"integer","minimum":0,"maximum":5},"deliveryTime":{"type":"integer","minimum":0,"maximum":5},"packaging":{"type":"integer","minimum":0,"maximum":5},"shippingCost":{"type":"integer","minimum":0,"maximum":5},"deliveryCondition":{"type":"integer","minimum":0,"maximum":5},"comment":{"type":"string"}}}}}},"responses":{"201":{"description":"Rating created."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"429":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}},"get":{"summary":"List ratings","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Paginated ratings."},"429":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/ratings/buyer-risk":{"get":{"summary":"Private buyer-reliability risk summary","description":"Cancellation rate, return rate, and punctuality-derived risk banding (low/medium/high) for a buyer — for the merchant's own risk screening, never shown publicly.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"responses":{"200":{"description":"Risk summary."}}}},"/public/ratings/{ratingId}/report":{"post":{"summary":"Report a public review","description":"Public, rate-limited reporting accepts spam, fraud, abuse, privacy, incorrect, or other. Reporter identity is reduced to a one-way hash and is never returned.","security":[],"parameters":[{"name":"ratingId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["reason"],"properties":{"reason":{"type":"string","enum":["spam","fraud","abuse","privacy","incorrect","other"]},"details":{"type":"string","maxLength":1000}}}}}},"responses":{"200":{"description":"Report accepted for moderation review."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"404":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"429":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/review-invitations":{"post":{"summary":"Create a one-time review invitation (QR code)","description":"Issues a one-time token for a delivered order; print the returned QR code on a receipt or parcel insert so the buyer can scan it later to leave a verified, order-linked public review. Accepts a merchant JWT (dashboard) or an API key with ratings:write (store backend).","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["orderReference","buyer"],"properties":{"orderReference":{"type":"string"},"buyer":{"type":"object","required":["firstName","lastName"],"description":"At least one of email or phone is required for every channel; email is required when channel is email.","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"}}},"orderValue":{"type":"number"},"currency":{"type":"string","default":"MAD"},"expiresInDays":{"type":"integer","minimum":1,"maximum":90,"default":14},"channel":{"type":"string","enum":["qr","email","manual"],"default":"qr"},"locale":{"type":"string","enum":["en","fr","ar"],"default":"en"}}}}}},"responses":{"201":{"description":"Invitation created, including `reviewUrl` and a printable `qrCodeDataUrl`."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"409":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}},"get":{"summary":"List review invitations","description":"Accepts a merchant JWT (dashboard) or an API key with ratings:read (store backend).","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}}],"responses":{"200":{"description":"Paginated invitations."}}}},"/review-invitations/{invitationId}/reissue":{"post":{"summary":"Reissue an unused or opened invitation","description":"Rotates the one-time token while preserving the order and buyer identity. Email delivery is asynchronous; use Idempotency-Key for retries. Accepts a merchant JWT or an API key with ratings:write.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"name":"invitationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expiresInDays":{"type":"integer","minimum":1,"maximum":90,"default":14},"channel":{"type":"string","enum":["qr","email","manual"],"default":"qr"},"locale":{"type":"string","enum":["en","fr","ar"],"default":"en"}}}}}},"responses":{"201":{"description":"Replacement invitation with a fresh one-time token."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"404":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"409":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/review-invitations/batch":{"post":{"summary":"Create up to 100 review invitations in one request","description":"Returns per-item outcomes. The authenticated merchant is applied to every item and duplicate orders may produce partial failure results. Accepts a merchant JWT or an API key with ratings:write.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invitations"],"properties":{"invitations":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object"}}}}}}},"responses":{"200":{"description":"Batch outcome summary."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/review-invitations/analytics":{"get":{"summary":"Get invitation funnel analytics","description":"Accepts a merchant JWT or an API key with ratings:read.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"channel","in":"query","schema":{"type":"string","enum":["qr","email","manual"]}}],"responses":{"200":{"description":"Privacy-safe invitation funnel counts and conversion metrics."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/public/review-invitations/{token}":{"get":{"summary":"Read an invitation by its one-time token (buyer-facing, no auth)","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Privacy-safe invitation preview."},"404":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"409":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"410":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/public/review-invitations/{token}/review":{"post":{"summary":"Submit the review that redeems an invitation (buyer-facing, no auth)","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"responsiveness":{"type":"integer","minimum":0,"maximum":5,"description":"How quickly the seller responded to inquiries."},"communicationQuality":{"type":"integer","minimum":0,"maximum":5},"problemResolution":{"type":"integer","minimum":0,"maximum":5},"productDescription":{"type":"integer","minimum":0,"maximum":5,"description":"Was the product as described."},"productQuality":{"type":"integer","minimum":0,"maximum":5},"deliveryTime":{"type":"integer","minimum":0,"maximum":5},"packaging":{"type":"integer","minimum":0,"maximum":5},"shippingCost":{"type":"integer","minimum":0,"maximum":5},"deliveryCondition":{"type":"integer","minimum":0,"maximum":5},"comment":{"type":"string"}}}}}},"responses":{"201":{"description":"Review published; the invitation is consumed and cannot be reused."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"409":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"410":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/trust/merchants/{merchantId}":{"get":{"summary":"Public trust badge (embeddable on a storefront, no auth)","security":[],"parameters":[{"name":"merchantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Aggregated public trust score and dimension breakdown."},"404":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/trust/merchants/{merchantId}/profile":{"get":{"summary":"LMA39OL hosted verification profile","security":[],"parameters":[{"name":"merchantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Branded HTML verification profile."},"404":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/trust/merchants/{merchantId}/embed":{"get":{"summary":"Branded trust badge for iframe embeds","security":[],"parameters":[{"name":"merchantId","in":"path","required":true,"schema":{"type":"string"}},{"name":"variant","in":"query","schema":{"type":"string","enum":["standard","compact"],"default":"standard"}},{"name":"theme","in":"query","schema":{"type":"string","enum":["light","dark"],"default":"light"}}],"responses":{"200":{"description":"Branded HTML badge."},"404":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/trust/merchants/{merchantId}/badge.svg":{"get":{"summary":"Branded SVG trust badge for image-only integrations","security":[],"parameters":[{"name":"merchantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Accessible SVG trust badge."},"404":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/trust/badge.js":{"get":{"summary":"LMA39OL trust badge Web Component loader","security":[],"responses":{"200":{"description":"JavaScript loader for lma39ol-trust-badge."}}}},"/ratings/reports":{"get":{"summary":"List moderation reports for administrators","security":[{"bearerAuth":[]}],"parameters":[{"name":"merchantId","in":"query","schema":{"type":"string"}},{"name":"reason","in":"query","schema":{"type":"string","enum":["spam","fraud","abuse","privacy","incorrect","other"]}},{"name":"status","in":"query","schema":{"type":"string","enum":["published","flagged","removed"]}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Paginated privacy-safe moderation reports."},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/trust/merchants/{merchantId}/health":{"get":{"summary":"Check trust badge integration health and asset URLs","security":[],"parameters":[{"name":"merchantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Trust availability, assets, variants, and themes."},"404":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/payments/entitlements":{"get":{"summary":"Get the merchant's centralized feature entitlements","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Plan, subscription status, feature entitlements, and usage limits."},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/merchants/api-keys":{"post":{"summary":"Create a scoped merchant API key","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"environment":{"type":"string","enum":["test","development","production"]},"allowedIps":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string","enum":["ratings:read","ratings:write"]}}}}}}},"responses":{"201":{"description":"Plaintext API key returned once."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}},"get":{"summary":"List merchant API key metadata","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"API key metadata without plaintext key values."},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/merchants/api-keys/{apiKeyId}":{"delete":{"summary":"Revoke a merchant API key","security":[{"bearerAuth":[]}],"parameters":[{"name":"apiKeyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key revoked."},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"404":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/merchants/api-keys/{apiKeyId}/rotate":{"post":{"summary":"Rotate a merchant API key with bounded overlap","security":[{"bearerAuth":[]}],"parameters":[{"name":"apiKeyId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"overlapDays":{"type":"integer","minimum":1,"maximum":30,"default":7}}}}}},"responses":{"201":{"description":"Replacement plaintext API key returned once."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"404":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/merchants/webhooks":{"post":{"summary":"Register a merchant outbound webhook endpoint","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["review.invitation.created","review.submitted","webhook.test"]}}}}}}},"responses":{"201":{"description":"Webhook endpoint created; signing secret returned once."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}},"get":{"summary":"List merchant webhook endpoint metadata","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Webhook endpoint metadata without signing secrets."},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/merchants/webhooks/{endpointId}":{"delete":{"summary":"Deactivate a merchant webhook endpoint","security":[{"bearerAuth":[]}],"parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Endpoint deactivated."},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"404":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}},"/merchants/webhooks/{endpointId}/test":{"post":{"summary":"Queue a signed webhook test event","security":[{"bearerAuth":[]}],"parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Test event queued."},"400":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"401":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"403":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"404":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}},"409":{"description":"Request rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"errorCode":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object"}}}}}}}}}}}