Question
How do I send bar code data to Pacific Timesheet using web services?
Answer
REST API
You can send bar code scan data to Pacific Timesheet using its REST API. REST message data are contained in and sent using a secure URL sent using SSL.
REST Elements
Perhaps the most import method is to distinguish the type of punch, i.e. is it a start, finish, or are you "toggling" between the two.
Punch In/Out/Toggle:
URL -> /timesheet/rest/timeentry/punch
Parameters:
auth-login -> Login name (e.g. "admin")
auth-password -> Password
action -> "in", "out" or "toggle" ("toggle" is the default if the action is not specified)
timestamp -> ISO date-time, e.g. "2018-03-19T08:15:30" (seconds are optional) (required)
userid -> Employee ID/Login Name (required)
projectid -> Project ID/Name
taskid -> Task ID/Name
All parameter values must be URL encoded, e.g. spaces replaced with "%20", etc.
Example: 2 punch ins, one punch out
Punch out
http://localhost/timesheet/rest/timeentry/punch?contenttype=json&action=out×tamp=2018-03-19T16:00:00&userid=ATT001
Note that the timestamp, if no timezone specified, is relative to the logged-in user.
Comments
0 comments
Please sign in to leave a comment.