Skip to content

accounting-sh/php_sdk

Repository files navigation

Accounting's php_sdk

Accounting is an all-in-one accounting software that allows you to easily manage all your finance in one place. We provide a free API to control every aspect of our accounting solution and here is the PHP SDK.

For more information, please visit https://accounting.sh.

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, run the following command:

composer install accounting-sh/php_sdk

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');


    

$api = new Accounting("auth_token");
$uuid = 'uuid_example'; // string | The account uuid

try {
    $result = $api->accountConnections()->deleteAccountConnection($uuid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Accounting->accountConnections->deleteAccountConnection: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.accounting.sh

Class Method HTTP request Description
AccountConnectionsApi deleteAccountConnection DELETE /accounts/{uuid}/connect Delete an account's connection
AccountConnectionsApi listAccountConnections GET /accounts/{uuid}/connect List account's connections
AccountConnectionsApi listBanks GET /accounts/{uuid}/connect/banks List available bank connections
AccountingCodesApi addAccountingCode POST /accounting/codes Add an accounting code
AccountingCodesApi deleteAccountingCode DELETE /accounting/codes/{uuid} Delete an accounting code
AccountingCodesApi getAccountingCode GET /accounting/codes/{uuid} Get an accounting code
AccountingCodesApi listAccountingCodes GET /accounting/codes List company's accounting code
AccountingCodesApi updateAccountingCode PUT /accounting/codes/{uuid} Update an accounting code
AccountsApi addAccount POST /accounts Add an account
AccountsApi deleteAccount DELETE /accounts/{uuid} Delete an account
AccountsApi getAccount GET /accounts/{uuid} Get an account
AccountsApi listAccounts GET /accounts List company's accounts
AccountsApi updateAccount PUT /accounts/{uuid} Update an account
AttachmentsApi addAttachment POST /attachments Add an attachment
AttachmentsApi deleteAttachment DELETE /attachments/{uuid} Delete an attachment
AttachmentsApi getAttachment GET /attachments/{uuid} Get an attachment
AttachmentsApi listAttachments GET /attachments List company's attachments
AttachmentsApi retrieveAttachments GET /attachments/resource/{resource} List company's attachments link to resource
AttachmentsApi updateAttachment PUT /attachments/{uuid} Update an attachment
BillsApi addBill POST /expenses/bills Add a bill
BillsApi addBillPayment POST /expenses/bills/{uuid}/payments Add a bill payment
BillsApi deleteBill DELETE /expenses/bills/{uuid} Delete a bill
BillsApi getBill GET /expenses/bills/{uuid} Get a bill
BillsApi getBillDocument GET /expenses/bills/{uuid}/document Get a bill in PDF
BillsApi listBills GET /expenses/bills List company's bills
BillsApi updateBill PUT /expenses/bills/{uuid} Update a bill
BillsApi updateBillPayment PUT /expenses/bills/{uuid}/payments/{payment} Update a bill payment
CategoriesApi addCategory POST /categories Add a category
CategoriesApi deleteCategory DELETE /categories/{uuid} Delete a category
CategoriesApi getCategory GET /categories/{uuid} Get a category
CategoriesApi listCategories GET /categories List company's categories
CategoriesApi updateCategory PUT /categories/{uuid} Update a category
CompaniesApi addCompany POST /companies Add a company
CompaniesApi deleteCompany DELETE /companies/{uuid} Delete a company
CompaniesApi getCompany GET /companies/{uuid} Get a company
CompaniesApi getCompanyCustomization GET /companies/{uuid}/customization Get a company's customization parameters
CompaniesApi getCompanyFeatureSet GET /companies/{uuid}/features List a company's feature set
CompaniesApi listCompanies GET /companies List companies on this instance
CompaniesApi updateCompany PUT /companies/{uuid} Update a company
CompanyStatisticsApi getStatistics GET /companies/{uuid}/statistics/period Get company's statistic
ContactsApi addContact POST /contacts Create a new contact
ContactsApi deleteContact DELETE /contacts/{uuid} Delete a contact
ContactsApi getContact GET /contacts/{uuid} Retrieve a contact
ContactsApi listContactBills GET /contacts/{uuid}/bills List a contact's bills
ContactsApi listContactInvoices GET /contacts/{uuid}/invoices List a contact's invoices
ContactsApi listContacts GET /contacts List company's contacts
ContactsApi updateContact PUT /contact/{uuid} Update a contact
CountriesApi getTranslatedCountries GET /countries/{lang} Get translated list of countries
CredentialsApi addCredential POST /credentials Add a credential
CredentialsApi deleteCredential DELETE /credentials/{uuid} Delete a credential
CredentialsApi getCredential GET /credentials/{uuid} Get a credential
CredentialsApi listCredentials GET /credentials List company's credentials
CredentialsApi listPermissions GET /credentials/permissions List available permissions
CredentialsApi me GET /me Get current credential informations
CredentialsApi updateCredential PUT /credentials/{uuid} Update a credential
CredentialsApi userveria POST /userveria Exchange a my stantabcorp (userveria) token for an Accounting Token
CurrencyApi getExchangeRate GET /currency/{from}/{to} Get the latest currency exchange rate
DocumentsApi cancelReview DELETE /documents/{uuid}/review Cancel document review
DocumentsApi deleteDocument DELETE /documents/{uuid} Delete a document
DocumentsApi getDocument GET /documents/{uuid} Get a document
DocumentsApi listDocuments GET /documents List company's documents
DocumentsApi processDocument GET /documents/{uuid}/process Process a document
DocumentsApi reviewUrl GET /documents/{uuid}/review Get url to review a document
DocumentsApi updateDocument PUT /documents/{uuid} Update a document
DocumentsApi uploadDocument POST /documents Upload a document
DocumentsApi viewDocument GET /documents/{uuid}/view View a document
ExpenseReportsApi addExpenseReport POST /expenses/expense-reports Add an expense report
ExpenseReportsApi deleteExpenseReport DELETE /expenses/expense-reports/{uuid} Delete an expense report
ExpenseReportsApi expenseReportOAuthLogin GET /expenses/expense-reports/login/{method} OAuth Login
ExpenseReportsApi getExpenseReport GET /expenses/expense-reports/{uuid} Get an expense report
ExpenseReportsApi getExpenseReportAccount GET /expenses/expense-reports/me Get the currently connected expense report user details
ExpenseReportsApi getExpenseReportUser GET /expenses/expense-reports/users/{uuid} Get an user details
ExpenseReportsApi listExpenseReports GET /expenses/expense-reports List company's expense reports.
ExpenseReportsApi sendExpenseReportLoginEmail POST /expenses/expense-reports/login Request login email
ExpenseReportsApi updateExpenseReport PUT /expenses/expense-reports/{uuid} Update an expense report
ExpenseReportsApi updateExpenseReportAccount PUT /expenses/expense-reports/me Update the currently connected expense report user
ExpenseReportsApi updateExpenseReportSettings POST /expenses/expense-reports/settings Retrieve company settings for expense reports
ExpenseReportsApi verifyExpenseReportSettings POST /expenses/expense-reports/verify Verify expense reports settings
ExportApi listExports GET /export List company's exports
ExportApi requestExport POST /export Request an export
InvoicesApi addInvoice POST /incomes/invoices Add an invoice
InvoicesApi addInvoicePayment POST /incomes/invoices/{uuid}/payments Add an invoice payment
InvoicesApi deleteInvoice DELETE /incomes/invoices/{uuid} Delete an invoice
InvoicesApi getInvoice GET /incomes/invoices/{uuid} Get an invoice
InvoicesApi getInvoiceDocument GET /incomes/invoices/{uuid}/document Get an invoice in PDF
InvoicesApi listInvoices GET /incomes/invoices List company's invoices
InvoicesApi listUnpaidInvoices GET /incomes/invoices/unpaid List company's unpaid invoices
InvoicesApi updateInvoice PUT /incomes/invoices/{uuid} Update an invoice
InvoicesApi updateInvoicePayment PUT /incomes/invoices/{uuid}/payments/{payment} Update an invoice payment
LogsApi logs GET /logs List company's logs
NotificationApi listNotificationPreferences GET /notifications/preferences/{notification} List notification preferences
NotificationApi listNotifications GET /notifications List company's notifications
NotificationApi sendNotification POST /notifications/send Send a notification
NotificationApi updateNotificationPreferences PUT /notifications/preferences/{notification} Update notification preferences
NotificationTypesApi addNotificationType POST /notifications/types Add a notification type
NotificationTypesApi deleteNotificationType DELETE /notifications/types/{uuid} Delete a notification type
NotificationTypesApi getNotificationType GET /notifications/types/{uuid} Get a notification type
NotificationTypesApi listNotificationTypes GET /notifications/types List company's notification types
NotificationTypesApi updateNotificationType PUT /notifications/types/{uuid} Update a notification type
OAuthConfigApi addOAuthConfiguration POST /oauth Add an OAuth configuration
OAuthConfigApi deleteOAuthConfiguration DELETE /oauth/{uuid} Delete an oauth configuration
OAuthConfigApi getOAuthConfiguration GET /oauth/{uuid} Get an OAuth configuration
OAuthConfigApi listOAuthConfigurations GET /oauth List company's oauth configurations
OAuthConfigApi listProviders GET /oauth/providers List available providers
OAuthConfigApi updateOAuthConfiguration PUT /oauth/{uuid} Update an oauth configuration
PaymentsApi addPayment POST /expenses/payments Add a payment
PaymentsApi deletePayment DELETE /expenses/payments/{uuid} Delete a payment
PaymentsApi getPayment GET /expenses/payments/{uuid} Get a payment
PaymentsApi listPayments GET /expenses/payments List company's payments
PaymentsApi updatePayment PUT /expenses/payments/{uuid} Update a payment
QuotesApi addQuote POST /quotes Add a quote
QuotesApi deleteQuote DELETE /quotes/{uuid} Delete a quote
QuotesApi getQuote GET /quotes/{uuid} Get a quote
QuotesApi getQuoteDocument GET /quotes/{uuid}/document Get a quote in PDF
QuotesApi listQuotes GET /quotes List company's quotes
QuotesApi updateQuote PUT /quotes/{uuid} Update a quote
ReceiptsApi addReceipt POST /receipts Add a receipt
ReceiptsApi deleteReceipt DELETE /receipts/{uuid} Delete a receipt
ReceiptsApi getReceipt GET /receipts/{uuid} Get a receipt
ReceiptsApi getReceiptDocument GET /receipts/{uuid}/document Get a receipt in PDF
ReceiptsApi listReceipts GET /receipts List company's receipts
ReceiptsApi updateReceipt PUT /receipts/{uuid} Update a receipt
RevenuesApi addRevenue POST /incomes/revenues Add a revenue
RevenuesApi deleteRevenue DELETE /incomes/revenues/{uuid} Delete a revenue
RevenuesApi getRevenue GET /incomes/revenues/{uuid} Get a revenue
RevenuesApi listRevenues GET /incomes/revenues List company's revenues
RevenuesApi updateRevenue PUT /incomes/revenues/{uuid} Update a revenue
RossumApi listReviews GET /external/rossum/reviews List documents to be reviewes
SearchApi search GET /search Search
SettingsApi getSettings GET /companies/{uuid}/settings/{key} Get a company's settings
SettingsApi listSettings GET /companies/{uuid}/settings List company's settings
SettingsApi updateSettings PUT /companies/{uuid}/settings/{key} Update a company's settings
TagsApi addTag POST /tags Add a tag
TagsApi deleteTag DELETE /tags/{uuid} Delete a tag
TagsApi getTag GET /tags/{uuid} Get a tag
TagsApi listTags GET /tags List company's tags
TagsApi listTagsByResource GET /tags/attachments/{resource} List company's tags by resource attachment
TagsApi updateTag PUT /tags/{uuid} Update a tag
TaxApi getTaxRate GET /tax/{country} Get the latest tax rate for a country
TaxApi verifyVatId GET /vat/verify/{number} Verify a VAT ID
TransactionsApi addTransaction POST /transactions Add a transaction
TransactionsApi addTransactionCode POST /transactions/{uuid}/codes Add a transaction's code
TransactionsApi deleteTransaction DELETE /transactions/{uuid} Delete a transaction
TransactionsApi deleteTransactionCode DELETE /transactions/{uuid}/codes/{code} Delete a transaction's code
TransactionsApi getTransaction GET /transactions/{uuid} Get a transaction
TransactionsApi importTransactions POST /transactions/import Import transactions - INTERNAL
TransactionsApi listTransactionCodes GET /transactions/{uuid}/codes List transaction's codes
TransactionsApi listTransactions GET /transactions List company's transactions
TransactionsApi updateTransaction PUT /transactions/{uuid} Update a transaction
TransactionsApi updateTransactionCode PUT /transactions/{uuid}/codes Update a transaction's code
TransfersApi addTransfer POST /transfers Add a transfer
TransfersApi deleteTransfer DELETE /transfers/{uuid} Delete a transfer
TransfersApi getTransfer GET /transfers/{uuid} Get a transfer
TransfersApi listTransfers GET /transfers List company's transfers
TransfersApi updateTransfer PUT /transfers/{uuid} Update a transfer
VATIDApi addCompanyVatId POST /companies/{uuid}/vat Add a company's Vat Id
VATIDApi deleteCompanyVatId DELETE /companies/{uuid}/vat/{key} Delete a company's Vat Id
VATIDApi getCompanyVatId GET /companies/{uuid}/vat/{key} Get a company's Vat Id
VATIDApi listCompanyVatId GET /companies/{uuid}/vat List company's Vat Id
VATIDApi updateCompanyVatId PUT /companies/{uuid}/vat/{key} Update a company's Vat Id
WebhooksApi addWebhook POST /webhooks Add a webhook
WebhooksApi deleteWebhook DELETE /webhooks/{uuid} Delete a webhook
WebhooksApi getWebhook GET /webhooks/{uuid} Get a webhook
WebhooksApi getWebhookHistory GET /webhooks/{uuid}/history Get webhook's history
WebhooksApi listWebhookEvents GET /webhooks/events List available webhook events
WebhooksApi listWebhooks GET /webhooks List company's webhooks
WebhooksApi updateWebhook PUT /webhooks/{uuid} Update a webhook

Authorization

### bearer

    - **Type**: API key
    - **API key parameter name**: Authorization
    - **Location**: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 7.5.5
    • Package version: 0.5.0
  • Generator version: 7.6.0-SNAPSHOT