Update Timesheet

Update Timesheet

ParameterTypeDescription
[IN] Parameters described in Overview
CompanyString[IN] The users default company number for the companies list
ActionString[IN] Identifier for the list requested
InputString[IN] data array containing optional parameters
tspending_entryno [OPTIONAL]String[IN] timesheet entry number input data array parameter – required for update or delete if tspending_uuid not supplied
tspending_uuid [OPTIONAL]String[IN] unique identifier for timesheet pending record – required for update and delete if tspending_entryno not supplied
tspending_resourcecodeString[IN] resource code data array input parameter
tspending_workflowcode [OPTIONAL]String[IN] Stage input data array parameter – this parameter becomes mandatory if the associated jobphase belongs to a 2-tier job – blank string is acceptable for non 2-tier jobs.
tspending_taskdesc [OPTIONAL]String[IN] task description input data array parameter – this parameter becomes mandatory if the associated jobphase has task descriptions – blank string is acceptable
tspending_jobandphase [OPTIONAL]String[IN] job phase input data array parameter
tspending_timedate [OPTIONAL]String[IN] date of timesheet entry dd/mm/yyyy input data array parameter
tspending_chargecode [OPTIONAL]String[IN] charge code input data array parameter
tspending_hoursnormal [OPTIONAL]String[IN] normal time (hours) input data array parameter
tspending_hoursotime1 [OPTIONAL]String[IN] overtime (hours) input data array parameter
tspending_hoursotime2 [OPTIONAL]String[IN] overtime (hours) input data array parameter
tspending_materialcode [OPTIONAL]String[IN] material input data array parameter
tspending_matquantity [OPTIONAL]String[IN] material quantity input data array parameter
tspending_workdone [OPTIONAL]String[IN] work done description input data array parameter
ResponseXML/JSON[OUT] An XML tree / JSON string containing the success or error response

Description

Calling the timesheets API with an action of update retrieves a response. Update can be used to Create, Update or Delete a timesheet entry. Providing a tspending_uuid or tspending_entryno along with other optional parameters will assume the update operation to be an update. Providing tspending_uuid or tspending_entryno without any other optional parameters assumes the update operation to be a delete. Providing optional parameters without a tspending_uuid or tspending_entryno will assume the update operation to be a create. If the chargecode is provided as parameter, at least one of the time (hours fields), tspending_hoursnormal, tspending_hoursotime1 or tspending_hoursotime2 must also be provided. If tspending_materialcode is provided as a parameter, the tspending_matquantity (quantity parameter) must also be provided.

Return Values

Response – Success or error response.

The structure of the response is:

<Responses>
<Success>
<SuccessText>data processed successfully.</SuccessText>
<Data>
<tspending_uuid>66AD500788B5024DBBBEE6E22658B1C3</tspending_uuid>
</Data>
<Data>
<tspending_entryno>9991</tspending_entryno>
</Data>
<Data>
<variable_timesheettimerstatusnormal__tspending_entryno/>
</Data>
<Data>
<variable_timesheettimerstatusot1__tspending_entryno/>
</Data>
<Data>
<variable_timesheettimerstatusot2__tspending_entryno/>
</Data>
</Success>
</Responses>
{
    "responsecode": 1,
    "responsestatus": "OK",
    "errorcode": 0,
    "errormessage": "",
    "responsemessage": "data processed successfully.",
    "success": true,
    "data": [
        {

            "tspending_entryno": 9991,
            "tspending_uuid": "66AD500788B5024DBBBEE6E22658B1C3",
            "variable_timesheettimerstatusnormal__tspending_entryno": "",
            "variable_timesheettimerstatusot1__tspending_entryno": "",
            "variable_timesheettimerstatusot2__tspending_entryno": ""
        }
    ]
}