This sample application synchronizes your drivers addresses from Paycor to the Mike Albert Fleet Solutions API.
You will need to have a Paycor account and have the Reporting API enabled. Create a report that returns the driver information you want to synchronize, in CSV format and include the following columns, in this order:
- Employee Number
- Last Name
- First Name
- Address 1
- Address 2
- City
- State/Province
- ZIP/Postal Code
The configuration file should be in YAML format and include the following information:
paycor:
host: secure.paycor.com
publickey: Provided by Paycor
privatekey: Provided by Paycor
homeaddressesreport: Name of Paycor report that returns the driver information to process
mikealbert:
clientid: Provided by Mike Albert
clientsecret: Provided by Mike Albert
endpoint: https://api.mikealbert.com/api/v1/The application can be run from the command line with the following command:
paycor-driver-sync -config paycor-driver-sync.yamlThis could also be run as a cron job or a scheduled task.