Page 1 of 1

TimeTrex API and Custom Punch Fields

Posted: Mon Nov 05, 2018 4:08 pm
by phineas629
Hi,

I see the api manual and the example online.
I want to add punches to TimeTrex but I have created additional custom fields for Punches through TimeTrex's GUI.
Couldn't figure out how to get that data pushed along with punches to my TimeTrex instance.

Re: TimeTrex API and Custom Punch Fields

Posted: Mon Nov 05, 2018 6:05 pm
by mikeb
You can pass custom field data in using the array keys of: 'other_id1', 'other_id2', 'other_id3', 'other_id4', 'other_id5'

The numbers 1 thru 5 correspond to the custom fields created in the GUI of course.

Re: TimeTrex API and Custom Punch Fields

Posted: Wed Nov 07, 2018 10:04 am
by phineas629
Thanks Mike!

I'm trying to get a better understanding of the API.
But it's hard for me to manipulate the class inheritance diagram to see the different relationships.
Any advice of how I can understand the API and all the database fields I can manipulate through the api?

Re: TimeTrex API and Custom Punch Fields

Posted: Wed Nov 07, 2018 10:10 am
by mikeb
Keep in mind the web interface uses the API, so one of the easiest ways is to turn on debug logging then do whatever operations you want to do through the API through the web interface, and the exact API calls will be appear in the log file.

Re: TimeTrex API and Custom Punch Fields

Posted: Fri Nov 09, 2018 3:38 pm
by phineas629
Thanks mike!

I'll take a look at the api through debugging.