TimeTrex API and Custom Punch Fields

Discussion for TimeTrex open source community developers.
Post Reply
phineas629
Posts: 6
Joined: Tue Jan 13, 2015 12:48 am

TimeTrex API and Custom Punch Fields

Post by phineas629 » Mon Nov 05, 2018 4:08 pm

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.

mikeb
Posts: 413
Joined: Thu Jul 27, 2006 11:58 am

Re: TimeTrex API and Custom Punch Fields

Post by mikeb » Mon Nov 05, 2018 6:05 pm

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.

phineas629
Posts: 6
Joined: Tue Jan 13, 2015 12:48 am

Re: TimeTrex API and Custom Punch Fields

Post by phineas629 » Wed Nov 07, 2018 10:04 am

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?

mikeb
Posts: 413
Joined: Thu Jul 27, 2006 11:58 am

Re: TimeTrex API and Custom Punch Fields

Post by mikeb » Wed Nov 07, 2018 10:10 am

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.

phineas629
Posts: 6
Joined: Tue Jan 13, 2015 12:48 am

Re: TimeTrex API and Custom Punch Fields

Post by phineas629 » Fri Nov 09, 2018 3:38 pm

Thanks mike!

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

Post Reply