Rust API client for openapi

A full API to use your BTCPay Server

For more information, please visit https://btcpayserver.org

Overview

This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.

Note from AE

In order to get openapi working We had to A) slightly change the swagger.json definiton (basically adding a few path variables and one unspecified definition), see the added swagger.json B) deal with some unparsedable oneOfEntries C) redefine the timespan structs to type redefentions. So it was not completly autogenerated.

Installation

Put the package under your project folder in a directory named openapi and add the following to Cargo.toml under [dependencies]:

openapi = { path = "./openapi" }

Documentation for API Endpoints

All URIs are relative to https://btcpay.example.com/api/v1

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- APIKeysApi | apikeyscreateapikey | POST /api/v1/api-keys | Create a new API Key APIKeysApi | apikeysdeleteapikey | DELETE /api/v1/api-keys/{apikey} | Revoke an API Key APIKeysApi | apikeysdeletecurrentapikey | DELETE /api/v1/api-keys/current | Revoke the current API Key *APIKeysApi* | apikeysgetcurrentapikey | GET /api/v1/api-keys/current | Get the current API Key information AppsApi | appscreatepointofsaleapp | POST /api/v1/stores/{storeId}/apps/pos | Create a new Point of Sale app *AppsApi* | appsdeletepointofsaleapp | DELETE /api/v1/apps/{appId} | Delete app AppsApi | appsgetpointofsaleapp | GET /api/v1/apps/{appId} | Get basic app data *AuthorizationApi* | apikeysauthorize | GET /api-keys/authorize | Authorize User *CustodiansApi* | custodiansaddstorecustodianaccount | POST /api/v1/stores/{storeId}/custodian-accounts | Add a custodial account to a store. *CustodiansApi* | custodiansdeletestorecustodianaccount | DELETE /api/v1/stores/{storeId}/custodian-accounts/{accountId} | Delete store custodian account *CustodiansApi* | custodiansgetstorecustodianaccount | GET /api/v1/stores/{storeId}/custodian-accounts/{accountId} | Get store custodian account *CustodiansApi* | custodiansgetstorecustodianaccountdepositaddress | GET /api/v1/stores/{storeId}/custodian-accounts/{accountId}/addresses/{paymentMethod} | Get a deposit address for custodian *CustodiansApi* | custodiansgetstorecustodianaccounttradequote | GET /api/v1/stores/{storeId}/custodian-accounts/{accountId}/trades/quote | Get quote for trading one asset for another *CustodiansApi* | custodiansgetstorecustodianaccountwithdrawalinfo | POST /api/v1/stores/{storeId}/custodian-accounts/{accountId}/withdrawals/{withdrawalId} | Get withdrawal info *CustodiansApi* | custodiansgetstorecustodianaccounts | GET /api/v1/stores/{storeId}/custodian-accounts | List store custodian accounts *CustodiansApi* | custodiansgetsupportedcustodians | GET /api/v1/custodians | List supported custodians CustodiansApi | custodiansstorecustodianaccounttrademarket | POST /api/v1/stores/{storeId}/custodian-accounts/{accountId}/trades/market | Trade one asset for another *CustodiansApi* | custodiansupdatestorecustodianaccount | PUT /api/v1/stores/{storeId}/custodian-accounts/{accountId} | Update custodial account *CustodiansApi* | custodianswithdrawfromstorecustodianaccount | POST /api/v1/stores/{storeId}/custodian-accounts/{accountId}/withdrawals | Withdraw to store wallet HealthApi | healthgethealth | GET /api/v1/health | Get health status InvoicesApi | invoicesactivatepaymentmethod | POST /api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods/{paymentMethod}/activate | Activate Payment Method *InvoicesApi* | invoicesarchiveinvoice | DELETE /api/v1/stores/{storeId}/invoices/{invoiceId} | Archive invoice *InvoicesApi* | invoicescreateinvoice | POST /api/v1/stores/{storeId}/invoices | Create a new invoice *InvoicesApi* | invoicesgetinvoice | GET /api/v1/stores/{storeId}/invoices/{invoiceId} | Get invoice *InvoicesApi* | invoicesgetinvoicepaymentmethods | GET /api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods | Get invoice payment methods *InvoicesApi* | invoicesgetinvoices | GET /api/v1/stores/{storeId}/invoices | Get invoices *InvoicesApi* | invoicesmarkinvoicestatus | POST /api/v1/stores/{storeId}/invoices/{invoiceId}/status | Mark invoice status InvoicesApi | invoicesunarchiveinvoice | POST /api/v1/stores/{storeId}/invoices/{invoiceId}/unarchive | Unarchive invoice InvoicesApi | invoicesupdateinvoice | PUT /api/v1/stores/{storeId}/invoices/{invoiceId} | Update invoice LightningInternalNodeApi | internallightningnodeapiconnecttonode | POST /api/v1/server/lightning/{cryptoCode}/connect | Connect to lightning node LightningInternalNodeApi | internallightningnodeapicreateinvoice | POST /api/v1/server/lightning/{cryptoCode}/invoices | Create lightning invoice *LightningInternalNodeApi* | internallightningnodeapigetbalance | GET /api/v1/server/lightning/{cryptoCode}/balance | Get node balance LightningInternalNodeApi | internallightningnodeapigetchannels | GET /api/v1/server/lightning/{cryptoCode}/channels | Get channels *LightningInternalNodeApi* | internallightningnodeapigetdepositaddress | POST /api/v1/server/lightning/{cryptoCode}/address | Get deposit address *LightningInternalNodeApi* | internallightningnodeapigetinfo | GET /api/v1/server/lightning/{cryptoCode}/info | Get node information LightningInternalNodeApi | internallightningnodeapigetinvoice | GET /api/v1/server/lightning/{cryptoCode}/invoices/{id} | Get invoice *LightningInternalNodeApi* | internallightningnodeapigetpayment | GET /api/v1/server/lightning/{cryptoCode}/payments/{paymentHash} | Get payment LightningInternalNodeApi | internallightningnodeapiopenchannel | POST /api/v1/server/lightning/{cryptoCode}/channels | Open channel *LightningInternalNodeApi* | internallightningnodeapipayinvoice | POST /api/v1/server/lightning/{cryptoCode}/invoices/pay | Pay Lightning Invoice LightningStoreApi | storelightningnodeapiconnecttonode | POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/connect | Connect to lightning node LightningStoreApi | storelightningnodeapicreateinvoice | POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices | Create lightning invoice *LightningStoreApi* | storelightningnodeapigetbalance | GET /api/v1/stores/{storeId}/lightning/{cryptoCode}/balance | Get node balance LightningStoreApi | storelightningnodeapigetchannels | GET /api/v1/stores/{storeId}/lightning/{cryptoCode}/channels | Get channels *LightningStoreApi* | storelightningnodeapigetdepositaddress | POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/address | Get deposit address *LightningStoreApi* | storelightningnodeapigetinfo | GET /api/v1/stores/{storeId}/lightning/{cryptoCode}/info | Get node information LightningStoreApi | storelightningnodeapigetinvoice | GET /api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/{id} | Get invoice *LightningStoreApi* | storelightningnodeapigetpayment | GET /api/v1/stores/{storeId}/lightning/{cryptoCode}/payments/{paymentHash} | Get payment LightningStoreApi | storelightningnodeapiopenchannel | POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/channels | Open channel *LightningStoreApi* | storelightningnodeapipayinvoice | POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/pay | Pay Lightning Invoice MiscelleneousApi | invoicecheckout | GET /i/{invoiceId} | Invoice checkout *MiscelleneousApi* | langcodes | GET /misc/lang | Language codes MiscelleneousApi | permissionsmetadata | GET /misc/permissions | Permissions metadata *NotificationsCurrentUserApi* | notificationsdeletenotification | DELETE /api/v1/users/me/notifications/{id} | Remove Notification *NotificationsCurrentUserApi* | notificationsgetnotification | GET /api/v1/users/me/notifications/{id} | Get notification *NotificationsCurrentUserApi* | notificationsgetnotifications | GET /api/v1/users/me/notifications | Get notifications *NotificationsCurrentUserApi* | notificationsupdatenotification | PUT /api/v1/users/me/notifications/{id} | Update notification *PaymentRequestsApi* | paymentrequestsarchivepaymentrequest | DELETE /api/v1/stores/{storeId}/payment-requests/{paymentRequestId} | Archive payment request *PaymentRequestsApi* | paymentrequestscreatepaymentrequest | POST /api/v1/stores/{storeId}/payment-requests | Create a new payment request *PaymentRequestsApi* | paymentrequestsgetpaymentrequest | GET /api/v1/stores/{storeId}/payment-requests/{paymentRequestId} | Get payment request *PaymentRequestsApi* | paymentrequestsgetpaymentrequests | GET /api/v1/stores/{storeId}/payment-requests | Get payment requests *PaymentRequestsApi* | paymentrequestsupdatepaymentrequest | PUT /api/v1/stores/{storeId}/payment-requests/{paymentRequestId} | Update payment request *PayoutProcessorsApi* | payoutprocessorsgetpayoutprocessors | GET /api/v1/payout-processors | Get payout processors *PullPaymentsManagementApi* | pullpaymentsarchivepullpayment | DELETE /api/v1/stores/{storeId}/pull-payments/{pullPaymentId} | Archive a pull payment *PullPaymentsManagementApi* | pullpaymentscreatepullpayment | POST /api/v1/stores/{storeId}/pull-payments | Create a new pull payment *PullPaymentsManagementApi* | pullpaymentsgetpullpayments | GET /api/v1/stores/{storeId}/pull-payments | Get store's pull payments *PullPaymentsPayoutPublicApi* | pullpaymentsgetpayout | GET /api/v1/pull-payments/{pullPaymentId}/payouts/{payoutId} | Get Payout PullPaymentsPublicApi | pullpaymentscreatepayout | POST /api/v1/pull-payments/{pullPaymentId}/payouts | Create Payout *PullPaymentsPublicApi* | pullpaymentsgetpayout | GET /api/v1/pull-payments/{pullPaymentId}/payouts/{payoutId} | Get Payout PullPaymentsPublicApi | pullpaymentsgetpayouts | GET /api/v1/pull-payments/{pullPaymentId}/payouts | Get Payouts *PullPaymentsPublicApi* | pullpaymentsgetpullpayment | GET /api/v1/pull-payments/{pullPaymentId} | Get Pull Payment *ServerInfoApi* | serverinfogetserverinfo | GET /api/v1/server/info | Get server info *StorePaymentMethodsApi* | storepaymentmethodsgetstorepaymentmethods | GET /api/v1/stores/{storeId}/payment-methods | Get store payment methods *StorePaymentMethodsLNURLPayApi* | storelnurlpaypaymentmethodsdeletelnurlpaypaymentmethod | DELETE /api/v1/stores/{storeId}/payment-methods/LNURL/{cryptoCode} | Remove store LNURL Pay payment method StorePaymentMethodsLNURLPayApi | storelnurlpaypaymentmethodsgetlnurlpaypaymentmethod | GET /api/v1/stores/{storeId}/payment-methods/LNURL/{cryptoCode} | Get store LNURL Pay payment method *StorePaymentMethodsLNURLPayApi* | storelnurlpaypaymentmethodsgetlnurlpaypaymentmethods | GET /api/v1/stores/{storeId}/payment-methods/LNURL | Get store LNURL payment methods StorePaymentMethodsLNURLPayApi | storelnurlpaypaymentmethodsupdatelnurlpaypaymentmethod | PUT /api/v1/stores/{storeId}/payment-methods/LNURL/{cryptoCode} | Update store LNURL Pay payment method *StorePaymentMethodsLightningNetworkApi* | storelightningnetworkpaymentmethodsdeletelightningnetworkpaymentmethod | DELETE /api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode} | Remove store Lightning Network payment method StorePaymentMethodsLightningNetworkApi | storelightningnetworkpaymentmethodsgetlightningnetworkpaymentmethod | GET /api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode} | Get store Lightning Network payment method *StorePaymentMethodsLightningNetworkApi* | storelightningnetworkpaymentmethodsgetlightningnetworkpaymentmethods | GET /api/v1/stores/{storeId}/payment-methods/LightningNetwork | Get store Lightning Network payment methods StorePaymentMethodsLightningNetworkApi | storelightningnetworkpaymentmethodsupdatelightningnetworkpaymentmethod | PUT /api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode} | Update store Lightning Network payment method *StorePaymentMethodsOnChainApi* | storeonchainpaymentmethodsdeleteonchainpaymentmethod | DELETE /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode} | Remove store on-chain payment method StorePaymentMethodsOnChainApi | storeonchainpaymentmethodsgenerateonchainwallet | POST /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/generate | Generate store on-chain wallet StorePaymentMethodsOnChainApi | storeonchainpaymentmethodsgetonchainpaymentmethod | GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode} | Get store on-chain payment method *StorePaymentMethodsOnChainApi* | storeonchainpaymentmethodsgetonchainpaymentmethodpreview | GET /api/v1/stores/{storeId}/payment-methods/OnChain/{cryptoCode}/preview | Preview store on-chain payment method addresses *StorePaymentMethodsOnChainApi* | storeonchainpaymentmethodsgetonchainpaymentmethods | GET /api/v1/stores/{storeId}/payment-methods/OnChain | Get store on-chain payment methods StorePaymentMethodsOnChainApi | storeonchainpaymentmethodspostonchainpaymentmethodpreview | POST /api/v1/stores/{storeId}/payment-methods/OnChain/{cryptoCode}/preview | Preview proposed store on-chain payment method addresses *StorePaymentMethodsOnChainApi* | storeonchainpaymentmethodsupdateonchainpaymentmethod | PUT /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode} | Update store on-chain payment method StoreWalletOnChainApi | storeonchainwalletscreateonchaintransaction | POST /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/transactions | Create store on-chain wallet transaction *StoreWalletOnChainApi* | storeonchainwalletsgetonchainfeerate | GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/feerate | Get store on-chain wallet fee rate *StoreWalletOnChainApi* | storeonchainwalletsgetonchainwalletreceiveaddress | GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/address | Get store on-chain wallet address StoreWalletOnChainApi | storeonchainwalletsgetonchainwallettransaction | GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/transactions/{transactionId} | Get store on-chain wallet transaction StoreWalletOnChainApi | storeonchainwalletsgetonchainwalletutxos | GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/utxos | Get store on-chain wallet UTXOS StoreWalletOnChainApi | storeonchainwalletspatchonchainwallettransaction | PATCH /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/transactions/{transactionId} | Patch store on-chain wallet transaction info StoreWalletOnChainApi | storeonchainwalletsshowonchainwalletoverview | GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet | Get store on-chain wallet overview StoreWalletOnChainApi | storeonchainwalletsshowonchainwallettransactions | GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/transactions | Get store on-chain wallet transactions StoreWalletOnChainApi | storeonchainwalletsunreserveonchainwalletreceiveaddress | DELETE /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/address | UnReserve last store on-chain wallet address StoresApi | storescreatestore | POST /api/v1/stores | Create a new store StoresApi | storesdeletestore | DELETE /api/v1/stores/{storeId} | Remove Store StoresApi | storesgetstore | GET /api/v1/stores/{storeId} | Get store StoresApi | storesgetstores | GET /api/v1/stores | Get stores StoresApi | storesupdatestore | PUT /api/v1/stores/{storeId} | Update store StoresEmailApi | storesgetstoreemailsettings | GET /api/v1/stores/{storeId}/email | Get store email settings StoresEmailApi | storessendstoreemail | POST /api/v1/stores/{storeId}/email/send | Send an email for a store *StoresEmailApi* | storesupdatestoreemailsettings | PUT /api/v1/stores/{storeId}/email | Update store email settings *StoresPayoutProcessorsApi* | greenfieldstoreautomatedlightningpayoutprocessorscontrollergetstorelightningautomatedpayoutprocessorsforpaymentmethod | GET /api/v1/stores/{storeId}/payout-processors/LightningAutomatedTransferSenderFactory/{paymentMethod} | Get configured store Lightning automated payout processors StoresPayoutProcessorsApi | greenfieldstoreautomatedlightningpayoutprocessorscontrollergetstorelightningautomatedtransfersenderfactory | GET /api/v1/stores/{storeId}/payout-processors/LightningAutomatedTransferSenderFactory | Get configured store Lightning automated payout processors *StoresPayoutProcessorsApi* | greenfieldstoreautomatedlightningpayoutprocessorscontrollerupdatestorelightningautomatedpayoutprocessor | PUT /api/v1/stores/{storeId}/payout-processors/LightningAutomatedTransferSenderFactory/{paymentMethod} | Update configured store Lightning automated payout processors *StoresPayoutProcessorsApi* | greenfieldstoreautomatedonchainpayoutprocessorscontrollergetstoreonchainautomatedpayoutprocessorsforpaymentmethod | GET /api/v1/stores/{storeId}/payout-processors/OnChainAutomatedTransferSenderFactory/{paymentMethod} | Get configured store onchain automated payout processors StoresPayoutProcessorsApi | greenfieldstoreautomatedonchainpayoutprocessorscontrollergetstoreonchainautomatedtransfersenderfactory | GET /api/v1/stores/{storeId}/payout-processors/OnChainAutomatedTransferSenderFactory | Get configured store onchain automated payout processors *StoresPayoutProcessorsApi* | greenfieldstoreautomatedonchainpayoutprocessorscontrollerupdatestoreonchainautomatedpayoutprocessorforpaymentmethod | PUT /api/v1/stores/{storeId}/payout-processors/OnChainAutomatedTransferSenderFactory/{paymentMethod} | Update configured store onchain automated payout processors StoresPayoutProcessorsApi | greenfieldstoreautomatedonchainpayoutprocessorscontrollerupdatestoreonchainautomatedtransfersenderfactory | PUT /api/v1/stores/{storeId}/payout-processors/OnChainAutomatedTransferSenderFactory | Update configured store onchain automated payout processors *StoresPayoutProcessorsApi* | storepayoutprocessorsgetstorepayoutprocessors | GET /api/v1/stores/{storeId}/payout-processors | Get store configured payout processors *StoresPayoutProcessorsApi* | storepayoutprocessorsremovestorepayoutprocessor | DELETE /api/v1/stores/{storeId}/payout-processors/{processor}/{paymentMethod} | Remove store configured payout processor *StoresPayoutsApi* | payoutscreatepayoutthroughstore | POST /api/v1/stores/{storeId}/payouts | Create Payout *StoresPayoutsApi* | pullpaymentsapprovepayout | POST /api/v1/stores/{storeId}/payouts/{payoutId} | Approve Payout StoresPayoutsApi | pullpaymentscancelpayout | DELETE /api/v1/stores/{storeId}/payouts/{payoutId} | Cancel Payout *StoresPayoutsApi* | pullpaymentsgetstorepayouts | GET /api/v1/stores/{storeId}/payouts | Get Store Payouts *StoresPayoutsApi* | pullpaymentsmarkpayoutpaid | POST /api/v1/stores/{storeId}/payouts/{payoutId}/mark-paid | Mark Payout as Paid *StoresUsersApi* | storesaddstoreuser | POST /api/v1/stores/{storeId}/users | Add a store user StoresUsersApi | storesgetstoreusers | GET /api/v1/stores/{storeId}/users | Get store users *StoresUsersApi* | storesremovestoreuser | DELETE /api/v1/stores/{storeId}/users/{userId} | Remove Store User UsersApi | userscreateuser | POST /api/v1/users | Create user UsersApi | usersdeletecurrentuser | DELETE /api/v1/users/me | Deletes user profile *UsersApi* | usersdeleteuser | DELETE /api/v1/users/{idOrEmail} | Delete user *UsersApi* | usersgetcurrentuser | GET /api/v1/users/me | Get current user information UsersApi | usersgetuser | GET /api/v1/users/{idOrEmail} | Get user by ID or Email UsersApi | usersgetusers | GET /api/v1/users | Get all users UsersApi | userstoggleuserlock | DELETE /api/v1/users/{idOrEmail}/lock | Toggle user *WebhooksApi* | webhookscreatewebhook | POST /api/v1/stores/{storeId}/webhooks | Create a new webhook *WebhooksApi* | webhooksdeletewebhook | DELETE /api/v1/stores/{storeId}/webhooks/{webhookId} | Delete a webhook *WebhooksApi* | webhooksgetwebhook | GET /api/v1/stores/{storeId}/webhooks/{webhookId} | Get a webhook of a store *WebhooksApi* | webhooksgetwebhookdeliveries | GET /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries | Get latest deliveries WebhooksApi | webhooksgetwebhookdelivery | GET /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId} | Get a webhook delivery *WebhooksApi* | webhooksgetwebhookdeliveryrequests | GET /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/request | Get the delivery's request *WebhooksApi* | webhooksgetwebhooks | GET /api/v1/stores/{storeId}/webhooks | Get webhooks of a store *WebhooksApi* | webhooksredeliverwebhookdelivery | POST /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/redeliver | Redeliver the delivery WebhooksApi | webhooksupdatewebhook | PUT /api/v1/stores/{storeId}/webhooks/{webhookId} | Update a webhook

Documentation For Models

To get access to the crate's generated documentation, use:

cargo doc --open

Author