{"openapi":"3.1.0","info":{"title":"Mapi REST API","version":"1.0.0"},"servers":[{"url":"/v1"}],"paths":{"/me":{"get":{"summary":"Me","operationId":"me_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileView"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"MapiApiKey":[]}]}},"/wallet":{"get":{"summary":"Wallet","operationId":"wallet_wallet_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletView"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"MapiApiKey":[]}]}},"/cards":{"get":{"summary":"Cards","operationId":"cards_cards_get","parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardList"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Internal Server Error"}},"security":[{"MapiApiKey":[]}]},"post":{"summary":"Issue","operationId":"issue_cards_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[!-~]+$","title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Issue"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderView"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Internal Server Error"},"200":{"description":"Existing or resolved order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderView"}}}}},"security":[{"MapiApiKey":[]}]}},"/cards/{card_id}":{"get":{"summary":"Card","operationId":"card_cards__card_id__get","parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string","title":"Card Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardView"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Internal Server Error"}},"security":[{"MapiApiKey":[]}]}},"/cards/{card_id}/reveal":{"post":{"summary":"Reveal","operationId":"reveal_cards__card_id__reveal_post","parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string","title":"Card Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Confirmation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardDetails"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Internal Server Error"}},"security":[{"MapiApiKey":[]}]}},"/orders/{identity}":{"get":{"summary":"Order Status","operationId":"order_status_orders__identity__get","parameters":[{"name":"identity","in":"path","required":true,"schema":{"type":"string","title":"Identity"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderView"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Internal Server Error"}},"security":[{"MapiApiKey":[]}]}},"/cards/{card_id}/topups":{"post":{"summary":"Topup","operationId":"topup_cards__card_id__topups_post","parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string","title":"Card Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[!-~]+$","title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Topup"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderView"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Internal Server Error"},"200":{"description":"Existing or resolved order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderView"}}}}},"security":[{"MapiApiKey":[]}]}},"/cards/{card_id}/close":{"post":{"summary":"Close","operationId":"close_cards__card_id__close_post","parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string","title":"Card Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Close"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseResult"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Internal Server Error"}},"security":[{"MapiApiKey":[]}]}},"/wallet/invoices":{"post":{"summary":"Invoice","operationId":"invoice_wallet_invoices_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"pattern":"^[!-~]+$"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceView"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Internal Server Error"},"201":{"description":"Invoice is ready for payment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceView"}}}}},"security":[{"MapiApiKey":[]}]}},"/wallet/invoices/{identity}":{"get":{"summary":"Invoice Status","operationId":"invoice_status_wallet_invoices__identity__get","parameters":[{"name":"identity","in":"path","required":true,"schema":{"type":"string","title":"Identity"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceView"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Internal Server Error"}},"security":[{"MapiApiKey":[]}]}},"/transactions":{"get":{"summary":"Transactions","operationId":"transactions_transactions_get","parameters":[{"name":"card_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Card Id"}},{"name":"kind","in":"query","required":false,"schema":{"enum":["all","topup","spend","refund","issue","order","adjustment"],"type":"string","default":"all","title":"Kind"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionsView"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Internal Server Error"}},"security":[{"MapiApiKey":[]}]}},"/cards/{card_id}/transactions":{"get":{"summary":"Card Transactions","operationId":"card_transactions_cards__card_id__transactions_get","parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string","title":"Card Id"}},{"name":"kind","in":"query","required":false,"schema":{"enum":["all","topup","spend","refund","issue","order","adjustment"],"type":"string","default":"all","title":"Kind"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionsView"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Internal Server Error"}},"security":[{"MapiApiKey":[]}]}},"/webhook-endpoints":{"get":{"summary":"Endpoints","operationId":"endpoints_webhook_endpoints_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointList"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"MapiApiKey":[]}]},"post":{"summary":"Create Endpoint","operationId":"create_endpoint_webhook_endpoints_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Endpoint"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedEndpoint"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"MapiApiKey":[]}]}},"/webhook-endpoints/{identity}":{"delete":{"summary":"Drop Endpoint","operationId":"drop_endpoint_webhook_endpoints__identity__delete","parameters":[{"name":"identity","in":"path","required":true,"schema":{"type":"string","title":"Identity"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Internal Server Error"}},"security":[{"MapiApiKey":[]}]}},"/webhook-deliveries":{"get":{"summary":"Deliveries","operationId":"deliveries_webhook_deliveries_get","parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryList"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Internal Server Error"}},"security":[{"MapiApiKey":[]}]}},"/webhook-deliveries/{identity}/retry":{"post":{"summary":"Retry","operationId":"retry_webhook_deliveries__identity__retry_post","parameters":[{"name":"identity","in":"path","required":true,"schema":{"type":"string","title":"Identity"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Internal Server Error"}},"security":[{"MapiApiKey":[]}]}}},"components":{"schemas":{"AttemptView":{"properties":{"created_at":{"type":"string","title":"Created At"},"http_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Http Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["created_at","http_status","error"],"title":"AttemptView"},"CardDetails":{"properties":{"pan":{"type":"string","title":"Pan"},"cvv":{"type":"string","title":"Cvv"},"expiry_month":{"type":"string","title":"Expiry Month"},"expiry_year":{"type":"string","title":"Expiry Year"}},"type":"object","required":["pan","cvv","expiry_month","expiry_year"],"title":"CardDetails"},"CardList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CardView"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["items","total","has_more"],"title":"CardList"},"CardView":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"product":{"type":"string","title":"Product"},"masked_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Masked Number"},"last_four":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Four"},"balance_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance Cents"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"closure":{"anyOf":[{"$ref":"#/components/schemas/ClosureView"},{"type":"null"}]},"updated_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Updated At"},"stale":{"type":"boolean","title":"Stale","default":true}},"type":"object","required":["id","name","product","masked_number","closure"],"title":"CardView"},"Close":{"properties":{"confirmed":{"type":"boolean","title":"Confirmed"},"warning_version":{"type":"string","maxLength":32,"title":"Warning Version"}},"additionalProperties":false,"type":"object","required":["confirmed","warning_version"],"title":"Close"},"CloseResult":{"properties":{"status":{"type":"string","enum":["processing","review","requested","closed"],"title":"Status"},"warning":{"type":"string","title":"Warning"}},"type":"object","required":["status","warning"],"title":"CloseResult"},"ClosureView":{"properties":{"status":{"type":"string","enum":["processing","review","requested","closed"],"title":"Status"},"confirmed_at":{"type":"string","title":"Confirmed At"},"requested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested At"}},"type":"object","required":["status","confirmed_at","requested_at"],"title":"ClosureView"},"Confirmation":{"properties":{"confirmed":{"type":"boolean","title":"Confirmed"}},"additionalProperties":false,"type":"object","required":["confirmed"],"title":"Confirmation"},"CreatedEndpoint":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string","enum":["wallet.credited","order.completed","order.review","card.transaction","card.closed"]},"type":"array","title":"Events"},"signing_secret":{"type":"string","title":"Signing Secret"}},"type":"object","required":["id","url","events","signing_secret"],"title":"CreatedEndpoint"},"DeliveryList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DeliveryView"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"DeliveryList"},"DeliveryView":{"properties":{"id":{"type":"string","title":"Id"},"event_id":{"type":"string","title":"Event Id"},"type":{"type":"string","enum":["wallet.credited","order.completed","order.review","card.transaction","card.closed"],"title":"Type"},"endpoint_id":{"type":"string","title":"Endpoint Id"},"status":{"type":"string","enum":["pending","sending","delivered","failed","cancelled"],"title":"Status"},"attempt_count":{"type":"integer","title":"Attempt Count"},"http_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Http Status"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"created_at":{"type":"string","title":"Created At"},"attempts":{"items":{"$ref":"#/components/schemas/AttemptView"},"type":"array","title":"Attempts"}},"type":"object","required":["id","event_id","type","endpoint_id","status","attempt_count","http_status","last_error","created_at","attempts"],"title":"DeliveryView"},"Endpoint":{"properties":{"url":{"type":"string","maxLength":500,"title":"Url"},"events":{"items":{"type":"string","enum":["wallet.credited","order.completed","order.review","card.transaction","card.closed"]},"type":"array","maxItems":5,"minItems":1,"uniqueItems":true,"title":"Events"}},"additionalProperties":false,"type":"object","required":["url","events"],"title":"Endpoint"},"EndpointList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EndpointView"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"EndpointList"},"EndpointView":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string","enum":["wallet.credited","order.completed","order.review","card.transaction","card.closed"]},"type":"array","title":"Events"},"created_at":{"type":"integer","title":"Created At"}},"type":"object","required":["id","url","events","created_at"],"title":"EndpointView"},"ErrorData":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"request_id":{"type":"string","title":"Request Id"}},"type":"object","required":["code","message","request_id"],"title":"ErrorData"},"ErrorEnvelope":{"properties":{"error":{"$ref":"#/components/schemas/ErrorData"}},"type":"object","required":["error"],"title":"ErrorEnvelope"},"Invoice":{"properties":{"amount_cents":{"type":"integer","maximum":100000.0,"minimum":25.0,"title":"Amount Cents"}},"additionalProperties":false,"type":"object","required":["amount_cents"],"title":"Invoice"},"InvoiceView":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","enum":["processing","awaiting_payment","paid","expired","review","failed"],"title":"Status"},"invoice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invoice Id"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Cents"}},"type":"object","required":["id","status"],"title":"InvoiceView"},"Issue":{"properties":{"amount_cents":{"type":"integer","maximum":100000.0,"minimum":100.0,"title":"Amount Cents"},"product":{"type":"string","enum":["ai","plus"],"title":"Product"},"name":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","required":["amount_cents","product"],"title":"Issue"},"OrderView":{"properties":{"id":{"type":"string","title":"Id"},"mode":{"type":"string","enum":["issue","topup"],"title":"Mode"},"product":{"type":"string","title":"Product"},"target_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Id"},"card_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Id"},"total_cents":{"type":"integer","title":"Total Cents"},"credit_cents":{"type":"integer","title":"Credit Cents"},"purchase_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Purchase Cents"},"fee_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fee Cents"},"issue_fee_cents":{"type":"integer","title":"Issue Fee Cents"},"reserve_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reserve Cents"},"status":{"type":"string","enum":["processing","review","submitted","completed","released"],"title":"Status"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","mode","product","target_id","card_id","total_cents","credit_cents","purchase_cents","fee_cents","issue_fee_cents","reserve_cents","status","created_at"],"title":"OrderView"},"ProfileView":{"properties":{"user_id":{"type":"integer","title":"User Id"},"email":{"type":"string","title":"Email"},"telegram_linked":{"type":"boolean","title":"Telegram Linked"},"kyc_status":{"type":"string","title":"Kyc Status"}},"type":"object","required":["user_id","email","telegram_linked","kyc_status"],"title":"ProfileView"},"Success":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok"}},"type":"object","required":["ok"],"title":"Success"},"Topup":{"properties":{"amount_cents":{"type":"integer","maximum":100000.0,"minimum":100.0,"title":"Amount Cents"}},"additionalProperties":false,"type":"object","required":["amount_cents"],"title":"Topup"},"TransactionView":{"properties":{"id":{"type":"string","title":"Id"},"card_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Id"},"card_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Name"},"kind":{"type":"string","title":"Kind"},"status":{"type":"string","title":"Status"},"cents":{"type":"integer","title":"Cents"},"fee_cents":{"type":"integer","title":"Fee Cents"},"title":{"type":"string","title":"Title"},"occurred_at":{"type":"string","title":"Occurred At"},"account":{"type":"string","enum":["wallet","card"],"title":"Account"}},"type":"object","required":["id","card_id","card_name","kind","status","cents","fee_cents","title","occurred_at","account"],"title":"TransactionView"},"TransactionsView":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TransactionView"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["items","total","has_more"],"title":"TransactionsView"},"WalletView":{"properties":{"currency":{"type":"string","const":"USD","title":"Currency"},"balance_cents":{"type":"integer","title":"Balance Cents"}},"type":"object","required":["currency","balance_cents"],"title":"WalletView"}},"securitySchemes":{"MapiApiKey":{"type":"http","scheme":"bearer","bearerFormat":"mapi_live_…"}}}}