Xledger is a cloud-based enterprise resource planning (ERP) solution for mid-size and large businesses. It provides management of day-to-day operations by automating routines ranging from bank reconciliation to invoice entry.
This blog post describes how to add Xledger into your application.
Benefits of Xledger
Xledger is suitable for corporations, non-profits, as well as public institutions that feel the necessity to automate accounting processes.
End-users get access to GL analysis, drill-down capabilities, real-time reporting, billing and invoicing, time and expense tracking, graphs, dashboards, business intelligence and analytical tools, workflow collaboration, multi-currency capabilities, and much more.
Xledger also features payroll management, customer relationship management, asset management, and accounting capabilities that include accounts receivable and accounts payable. The solution supports integration with open-source query language GraphQL.
Step-by-step Xledger integration
1. Get System Access
First of all, you need to get granted access to the system. You should contact Xledger to get user credentials.
2. Generate API Token
Xledger has 3 working environments (test, demo, and prod) and separate API tokens should be generated for each env (in case some particular env is chosen for use)
To connect to the Xledger system, first, go by this link to create an API token and give a name to it.
Links depending on env:
- https://www.test.xledger.net/f/api-tokens
- https://www.demo.xledger.net/f/api-tokens
- https://www.xledger.net/f/api-tokens
Alternative would be contacting Xledger to get an API token for integrations.
Need to develop an app?
Let's find the best options for your business together. Leave your contacts in the contact form.
3. Choosing API Token Scopes
In case you decide to generate an API token by yourself, you should choose which scopes will be added for the created token. For example, you can provide Read access for Project Management scope or Write access for General Ledger scope.
4. Making API Calls
Once you have a token, you can make a request like this:
URL: https://www.test.xledger.net/graphql
HTTP Method: POST
Header: Authorization token <your-token-here>
Body: { "query": "<your-query-string>","variables": <variables object or null>,"operationName": <operation name ornull>}
Xledger based on GraphQL API. All requests are divided into 3 types: query, mutation, and subscription. The query is used for retrieving data, mutation - for updating / inserting data, and subscription allows you to get notifications in real-time in response to events (such as records being inserted, updated, or deleted). Using GraphQL API gives more flexibility to the application.