# ErpHub API API for ErpHub Version: 1 ## Servers ErpHub API ``` https://erphub-api.aritma.io ``` ErpHub API (Dev) ``` https://erphub-api.dev.aritma.io ``` ## Security ### client_credentials Type: oauth2 ### implicit Type: oauth2 Authorization URL: https://id.aritma.no/connect/authorize Scopes: - `api services.erphub`: Access to ErpHub Api ### password Type: oauth2 Token URL: https://id.aritma.no/connect/token Scopes: - `api services.erphub`: Access to ErpHub Api ### client_credentials_dev Type: oauth2 ### implicit_dev Type: oauth2 Authorization URL: https://id.dev.aritma.io/connect/authorize Scopes: - `api services.erphub`: Access to ErpHub Api ### password_dev Type: oauth2 Token URL: https://id.dev.aritma.io/connect/token Scopes: - `api services.erphub`: Access to ErpHub Api ## Download OpenAPI description [ErpHub API](https://developer.aritma.com/_bundle/apis/accounting/erp-hub/openapi/erphub-openapi.yaml) ## Account Handles account related operations. ### Get accounts for a client. - [GET /api/v1/clients/{clientId}/accounts](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/account/getaccounts.md) ### Get account balance - [GET /api/v1/clients/{clientId}/account/{accountId}/balance](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/account/getaccountbalance.md) ### Enable an account for transactions sync - [POST /api/v1/clients/{clientId}/account/{accountId}/enable](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/account/enableaccount.md) ### Disable an account for transactions sync - [POST /api/v1/clients/{clientId}/account/{accountId}/disable](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/account/disableaccount.md) ## Bookkeeping Handles the bookkeeping for the client ### Creates a new bookkeeping rule for the specified client. The rule defines how transactions are processed and mapped to generate vouchers based on the client's requirements. - [POST /api/v1/clients/{clientId}/bookkeeping/matching-rules](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/createbookkeepingmatchingrule.md) ### Deletes a specific bookkeeping rule for the specified client. The rule to delete is identified by its unique rule ID. - [DELETE /api/v1/clients/{clientId}/bookkeeping/matching-rules/{ruleId}](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/deletebookkeepingmatchingrule.md) ### Retrieves the details of a specific bookkeeping rule for the specified client. This rule is identified by its unique rule ID. - [GET /api/v1/clients/{clientId}/bookkeeping/matching-rules/{ruleId}](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/getbookkeepingmatchingrule.md) ### Updates the details of an existing bookkeeping rule for the specified client. The rule to update is identified by its unique rule ID. - [PUT /api/v1/clients/{clientId}/bookkeeping/matching-rules/{ruleId}](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/updatebookkeepingmatchingrule.md) ### Replaces the existing transaction filters of a specific bookkeeping rule for the given client. The rule is identified by its unique rule ID. All current filters will be removed and replaced with the filters provided in the request body. - [PUT /api/v1/clients/{clientId}/bookkeeping/matching-rules/{ruleId}/filters](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/updatebookkeepingmatchingrulefilters.md) ### CreateBookkeepingSetting - [POST /api/v1/clients/{clientId}/bookkeeping/settings](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/createbookkeepingsetting.md) ### GetBookkeepingSettings - [GET /api/v1/clients/{clientId}/bookkeeping/settings](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/getbookkeepingsettings.md) ### UpdateBookkeepingSetting - [PUT /api/v1/clients/{clientId}/bookkeeping/settings/{bookkeepingSettingId}](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/updatebookkeepingsetting.md) ### DeleteBookkeepingSetting - [DELETE /api/v1/clients/{clientId}/bookkeeping/settings/{bookkeepingSettingId}](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/deletebookkeepingsetting.md) ### GetBookkeepingSetting - [GET /api/v1/clients/{clientId}/bookkeeping/settings/{bookkeepingSettingId}](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/getbookkeepingsetting.md) ### Creates a new bookkeeping rule for the specified client. The rule defines how transactions are processed and mapped to generate vouchers based on the client's requirements. - [POST /api/v1/clients/{clientId}/bookkeeping/transaction-rules](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/createbookkeepingtransactionrule.md) ### Retrieves the list of bookkeeping rules for a specified client. This endpoint returns all bookkeeping rules associated with the provided client ID. Each rule includes details such as the rule's ID, priority, and conditions. - [GET /api/v1/clients/{clientId}/bookkeeping/transaction-rules](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/getbookkeepingtransactionrules.md) ### Retrieves the details of a specific bookkeeping rule for the specified client. This rule is identified by its unique rule ID. - [GET /api/v1/clients/{clientId}/bookkeeping/transaction-rules/{ruleId}](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/getbookkeepingtransactionrule.md) ### Updates the details of an existing bookkeeping rule for the specified client. The rule to update is identified by its unique rule ID. - [PUT /api/v1/clients/{clientId}/bookkeeping/transaction-rules/{ruleId}](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/updatebookkeepingtransactionrule.md) ### Deletes a specific bookkeeping rule for the specified client. The rule to delete is identified by its unique rule ID. - [DELETE /api/v1/clients/{clientId}/bookkeeping/transaction-rules/{ruleId}](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/deletebookkeepingtransactionrule.md) ### Updates the priority for all bookkeeping rules associated with the specified client. All rules must be included in the request, identified by their unique rule IDs. Missing or unknown rules will result in a validation error. - [PUT /api/v1/clients/{clientId}/bookkeeping/transaction-rules/priorities](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/updatebookkeepingrulespriority.md) ### Replaces the existing transaction filters of a specific bookkeeping rule for the given client. The rule is identified by its unique rule ID. All current filters will be removed and replaced with the filters provided in the request body. - [PUT /api/v1/clients/{clientId}/bookkeeping/transaction-rules/{ruleId}/filters](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/updatebookkeepingtransactionrulefilters.md) ### Replaces the existing transaction units of a specific bookkeeping rule for the given client. The rule is identified by its unique rule ID. All current units will be removed and replaced with the units provided in the request body. - [PUT /api/v1/clients/{clientId}/bookkeeping/transaction-rules/{ruleId}/units](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/updatebookkeepingtransactionruleunits.md) ### Replaces the existing transaction units of a specific bookkeeping rule for the given client. The rule is identified by its unique rule ID. All current units will be removed and replaced with the units provided in the request body. - [PUT /api/v1/clients/{clientId}/bookkeeping/transaction-rules/{ruleId}/field-mapping](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/bookkeeping/updatebookkeepingtransactionrulefieldmapping.md) ## Clients Handles ERP client related operations ### Retrieves the list of currencies for a specific client. - [GET /api/v1/clients/{clientId}/currencies](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/clients/getcurrencies.md) ### Get a list of organization units for a client. - [GET /api/v1/clients/{clientId}/organization-units](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/clients/getorganizationunits.md) ### Get a list of voucher-series for a client. - [GET /api/v1/clients/{clientId}/voucher-series](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/clients/getvoucherseries.md) ### Gets the accounting period for a client on a given date. - [GET /api/v1/clients/{clientId}/accounting-period/{date}](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/clients/getaccountingperiodbydate.md) ### Gets details about an accounting period for a client. - [GET /api/v1/clients/{clientId}/accounting-period/{period}/details](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/clients/getaccountingperioddetails.md) ### Gets details about an accounting period for a client. - [GET /api/v1/clients/{clientId}/accounting-period](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/clients/getaccountingperiods.md) ### Post a journal transaction to the ERP. (deprecated) - [POST /api/v1/clients/{clientId}/journal-transaction](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/clients/postjournaltransaction.md) ## Connection Handles the connection between the ERPHub and the ERP ### Initializes the process of creating a new connection to an external ERP system - [POST /api/v1/connection](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/connection/createerpconnection.md) ### Resync connection. This will import new clients connected to the given connection. - [PUT /api/v1/connection/{connectionId}](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/connection/resyncconnection.md) ### Get clients for a connection - [GET /api/v1/connection/{connectionId}/clients](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/connection/getclients.md) ## Integrations ### Create a connection for an API integrator - [POST /api/v1/integrations/connections](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/integrations/createapiintegrationconnection.md) ### Add a single client to an ERPHubConnection - [POST /api/v1/integrations/connections/{connectionId}/clients](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/integrations/addclient.md) ### Add accounts to a client - [POST /api/v1/integrations/clients/{clientId}/accounts](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/integrations/addaccounts.md) ### Add transactions to an account - [POST /api/v1/integrations/clients/{clientId}/transactions](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/integrations/addtransactions.md) ## Mandates Controller for managing mandates. ### ActivateMandateSync - [POST /api/v1/clients/{clientId}/mandates](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/mandates/activatemandatesync.md) ### ResyncMandates - [POST /api/v1/clients/{clientId}/mandates/resync](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/mandates/resyncmandates.md) ## Pay Handles pay related operations. ### Activate pay for the given client. - [POST /api/v1/clients/{clientId}/pay](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/pay/activatepay.md) ## Transaction Handles ERP transaction related operations ### Gets a list of transactions for an account (deprecated) - [GET /api/v1/clients/{clientId}/account/{accountId}/transactions](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/transaction/gettransactions.md) ## Voucher Controller responsible for handling voucher operations in the ERP Hub. ### Uploads voucher attachment files to blob storage before posting a voucher. - [POST /api/v1/clients/{clientId}/voucher/attachments](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/voucher/uploadvoucherattachments.md) ### Posts a new voucher for a specified client. - [POST /api/v1/clients/{clientId}/voucher](https://developer.aritma.com/apis/accounting/erp-hub/openapi/erphub-openapi/voucher/postvoucher.md)