{"id":15755833,"url":"https://github.com/simenandre/eaccounting","last_synced_at":"2025-06-13T00:05:56.323Z","repository":{"id":57218104,"uuid":"92959058","full_name":"simenandre/eaccounting","owner":"simenandre","description":"A simple SDK for Visma eAccounting","archived":false,"fork":false,"pushed_at":"2023-07-14T11:38:36.000Z","size":21197,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-13T00:05:43.025Z","etag":null,"topics":["eaccounting","nodejs","visma"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simenandre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-31T15:11:31.000Z","updated_at":"2023-04-21T20:44:52.000Z","dependencies_parsed_at":"2024-10-04T08:40:48.195Z","dependency_job_id":"4c2996d6-0219-45f3-8905-f7dedca015d8","html_url":"https://github.com/simenandre/eaccounting","commit_stats":{"total_commits":23,"total_committers":5,"mean_commits":4.6,"dds":"0.30434782608695654","last_synced_commit":"404e5ea0f59f1fd5bfeb16e7c7526d3efc1330fe"},"previous_names":["cobraz/eaccounting"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simenandre/eaccounting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simenandre%2Feaccounting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simenandre%2Feaccounting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simenandre%2Feaccounting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simenandre%2Feaccounting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simenandre","download_url":"https://codeload.github.com/simenandre/eaccounting/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simenandre%2Feaccounting/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259553130,"owners_count":22875609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eaccounting","nodejs","visma"],"created_at":"2024-10-04T08:40:43.246Z","updated_at":"2025-06-13T00:05:56.295Z","avatar_url":"https://github.com/simenandre.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eAccounting-node\n\nA simple client module for accessing Visma eAccounting's API. It is still early stages in development, please refer to [Current Development Stage](#current-development-stage) for the current development stage.\n\n## Authentication\n\neAccounting-node tries to keep a small fotprint, so [simple-oauth2](https://github.com/lelylan/simple-oauth2) have been used for authentication. You can access the authentication variable by `eaccounting.auth()`. API documentation for simple-oauth2 is available [here](http://lelylan.github.io/simple-oauth2/).\n\n## Installation\n\n\tnpm install eaccounting\n\n## Usage\n    \n    const authConfig = {\n        {  \n           \"client\":{  \n              id: \"ayr\",\n              secret: \"a string\"\n           },\n           \"token\":{  \n                access_token: \"a long string\",\n                token_type: \"Bearer\",\n                expires_in: 3600,\n                refresh_token: \"a shorter string\",\n                expires_at: \"2017-06-01T08:32:46.394Z\"\n           }\n        }\n    };\n    \n    const eaccounting = require('eaccounting').create(authConfig);\n\n### Refresh your token\nWe have built in a `renewedTokenFunction`, what that does is use the `expired` function from simple-oauth2 to refresh it automaticly and return you a Promise so you can store it.\n\n    var authConfig = require('./auth.json');\n    const jsonfile = require('jsonfile');\n    \n    authConfig.renewedTokenFunction = (token) =\u003e {\n    \tjsonfile.writeFile('./auth.json', {\n    \t\tclient: authConfig.client,\n    \t\ttoken: token.token\n    \t}, function (err){\n    \t\tconsole.error(err);\n    \t});\n    };\n    var eaccounting = require('eaccounting').create(authConfig)\n    \n\n## Current Development Stage\nCurrently the module has the following endpoints added:\n- Articles\n- CustomerInvoiceDrafts\n- Customers\n\n## API Documentation\nThe updated documentation for Visma eAccounting API is available publicly [here](https://developer.vismaonline.com/). eaccounting-node uses the same name as the endpoint, but with camelCasing.\n\n### Function names\nAll of the functions have the same function names, as of now.\n\n*Get all*\n    \n    var customers = eaccounting.customers.getAll()\n\n*Get all (alias)*\n    \n    var customers = eaccounting.customers.get()\n\n*Get one*\n    \n    var customer = eaccounting.customers.get(1337)\n\n*Update*\n    \n    var customer = eaccounting.customers.update(1337)\n\n*Add*\n    \n    var customer = eaccounting.customers.add({\n        name: \"Github Inc.\"\n    })\n\n*Delete*\n    \n    var customer = eaccounting.customers.remove(1337)\n\n\n## Contribute!\n\nIt is super easy to add the other endpoints, because of the simple API of the module. So please submit pull request if you have implemented more.\n\n### Todo\n- feels like everything.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimenandre%2Feaccounting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimenandre%2Feaccounting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimenandre%2Feaccounting/lists"}