https://github.com/cityssm/node-avanti-api
A wrapper around the Avanti API.
https://github.com/cityssm/node-avanti-api
api avanti payroll
Last synced: 10 months ago
JSON representation
A wrapper around the Avanti API.
- Host: GitHub
- URL: https://github.com/cityssm/node-avanti-api
- Owner: cityssm
- License: mit
- Created: 2023-04-03T14:00:30.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-06-24T13:16:24.000Z (12 months ago)
- Last Synced: 2025-06-24T13:17:35.327Z (12 months ago)
- Topics: api, avanti, payroll
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@cityssm/avanti-api
- Size: 299 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Avanti API for Node
[](https://www.npmjs.com/package/@cityssm/avanti-api)
[](https://app.deepsource.com/gh/cityssm/node-avanti-api/)
An unofficial wrapper around the [Avanti API](https://avanti.stoplight.io/docs/avanti-api).
**Note:**
At this time, this project focuses only on read-only endpoints, primarily on the
[`api/v1/Reporter` endpoint](https://avanti.stoplight.io/docs/avanti-api/ed0485a9c98bb-get-report-data),
and employee data related endpoints.
## Installation
```sh
npm install @cityssm/avanti-api
```
## Usage
⭐ See the Avanti API documentation on
[Authentication and Authorization](https://avanti.stoplight.io/docs/avanti-api/014f7884ba799-authentication-and-authorization)
for instructions on creating the needed credentials.
Note that each endpoint needs to be properly initialized in Avanti as well.
⭐ If your company is on the
[latest Avanti Self Service Portal (ASSP)](https://help.avanti.ca/support/solutions/articles/36000498186-faq#FAQ-Q:HowdoIknowifmycompanyalreadyhasthelatestASSP?),
be sure to set `latestASSP` to `true`.
The current default is `false`, which will likely change in the `v1.0.0` release.
```javascript
import { AvantiApi } from '@cityssm/avanti-api'
// Initialize the API
const avanti = new AvantiApi({
tenant: 'avtesting',
// latestASSP: false,
client_id: '',
client_secret: '',
username: '',
password: '',
company: ''
})
// Export report data
const report = await avanti.getReport('CUSTOM_REPORT_ID')
// Output the data
console.log(report)
```