Skip to content
This repository has been archived by the owner on Apr 20, 2020. It is now read-only.
/ payroll-api Public archive

Public API to report payrolls and allow to modify IRPF

Notifications You must be signed in to change notification settings

jfrac/payroll-api

Repository files navigation

Payroll API test

Public API to report payrolls and allow to modify IRPF of them.

Prerequisites

  • Node.js and npm installed
  • MongoDB instance running in localhost:27017

Installation

git clone https://github.com/jfrac/payroll-api.git
cd payroll-api
npm install

Run API

npm start

Load monthly payslips

In order to load one month into database, just run

node load-month-payslips 12 2018

Run tests

npm t

Usage examples

Retrieve payrolls of Dec 2018

curl -X GET \
  'http://localhost:3000/payrolls?month=12&year=2018' \
  -H 'cache-control: no-cache'

Modify IRPF payrolls of Dec 2018

curl -X PUT \
  'http://localhost:3000/payrolls?month=12&year=2018' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
	"irpf": 5
}
'

About

Public API to report payrolls and allow to modify IRPF

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published