...
The full technical API specification is available here.
Scenarios and uses
This section describes various scenarios of how the Web Services can be used.
...
getModifiedItemsWithRefCode()
This function returns a list of items that have been updated since a specific date and time. This is useful where you wish to maintain a copy of various entities in an external system.
...
Once you have a current copy you can then periodically check for any items that have been modified since the last update and just update the details of those modified items. This is much more efficient than attempting to update all entities every the time.
...
Data Retrieval (Read operations)
There are a number of methods that enable you to read back the full details of an entity. The required entity can be identified by a number of different fields. Examples are:
getWorkerByRefCode() returns the worker entity that has the specified RefCode.
getClientById() returns the Client entity with the specified Id.
getPlacementByExternalId() returns the Placement entity with the specified External Id.
getUsersByExternalId() returns a list of User entities that have the specified External Id. For this method a list of items rather than a single items is returned as is it possible, although not advisable, to have multiple users with the same external Id.
getTimesheetById() returns the Timesheet with the specified Id.
These methods return a complex data structure that represents the InTime entity. Some of these also contain other data types that constain information about related entities. For example the Timesheet object that is returned from getTimesheetById() can also contain a number of InvoiceInfo objects that hold information about the invoices that the Timesheet is associated with. It also contains a number of Shift objects that detail the worked time that has been entered on the Timesheet.
There are also a number of Search type methods that retrieve multiple results. This enables you to retrieve a set of entities that are filtered according to some criteria. Examples are:
getTimesheetIdsWithStatusAndDatesForWorker() This returns a list of Timesheet Ids for a specific Worker that have a specific status within a certain date range.
getInvoicesForClient() This returns a list of all invoices relating to a specific Client.
Data Creation (Write Operations)
With version 2.0 it is now possible to create data in InTime via the Web Services. This includes the following entities: Worker, Client, Manager, Consultant, Provider, Placement and Timesheet. These mostly take the form of createOrUpdateXXX as this allows the same method to be used to create the entity if it doesn't exist or update it if it does. Examples are: createOrUpdateWorker(), createorUpdatePlacement() and createOrUpdateProvider()
Timesheet processes
updateTimesheet() method will create a new timesheet or update an existing one. The timesheet will be saved with Draft status. The Timesheet object you supply to this method must contain all the necessary data which includes a valid Placement reference, the start and End Dates and one or more Shifts. Each shift must reference a valid Rate from the Placement, the time or decimal
submitTimesheet() would then be called to submit it for approval once it has all the necessary time (Shifts) added to it.
rejectTimesheet() or approveTimesheet() are then used to process the approval.
- create, submit reject, approve revertTimesheet
- single sign on
- getURLForContractorsPayslip, getNumberOfPayslipsgetInvoicesForXXX, getInvoiceByRefCode
- getAllPayElements
- getMissingTimesheetsForPlacement
...