Using TimeTrex API tools

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Post Reply
stephenmoore33
Posts: 6
Joined: Wed Jun 02, 2021 6:57 pm

Using TimeTrex API tools

Post by stephenmoore33 »

Hello,

I am trying to import/update employees with TimeTrex API tools.

How do I create a map file exactly?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Using TimeTrex API tools

Post by shaunw »

Easiest way is to go through the web interface Import Wizard and create the mapping there, save it as a specific name (preferably without spaces or special characters), then you can use the "import.php" file's "-export_map <name>" parameter to export the saved mapping to a file, which you can then use to import from the command line.
stephenmoore33
Posts: 6
Joined: Wed Jun 02, 2021 6:57 pm

Re: Using TimeTrex API tools

Post by stephenmoore33 »

Can you please give me an example of a statement with the -export_name API_MAP for an employee import?

Thank you
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Using TimeTrex API tools

Post by shaunw »

It would be something similar to this:

Code: Select all

php import.php -server "https://mycompany.com/timetrex/api/json/api.php" -username admin -password securepass -object User -export_map 
MySavedMap
Post Reply