/
Submit time Entries for approval

Submit time Entries for approval

This feature enables users to submit a time entry to CRSD platform for manager approval.

This process is fulfilled via making a Http Post to TMAPI.

TMAPI Service Url:

https://ncdtmsaapp.azurewebsites.net/api/TimeEntry/Bulk

Here is an example of POST body JSON to call TMAPI:

 

[
{
"WorkItemId":1000393,
"ServiceRequestId":76264,
"ServiceId":9999,
"ActivityId":20,
"ApproverNetworkId":"krista.miller@tc.gc.ca",
"Comment":"test",
"SubmitterNetworkId":"shahram.afrasiabi@tc.gc.ca",
"DateTime":"2023-02-06T00:00:00",
"EndDateTime":"2023-02-06T18:34:55",
"Hours":[
{
"Quantity":0.63,
"TypeCode":"REG",
"IsBillable":false,
"StatusCode":3
}
],
"ServiceOutputs":[
{
"OutputId":null,
"TimeEntryId":0,
"Code":2,
"State":0,
"CreatedOn":null,
"ModifiedOn":null
}
],
"StatusCode":0,
"SourceSystemCd":"718"
}
]

Handling the Http response:
"SourceSystemCd" : is the internal time entry id. This is being passed in the payload on POST so we can map the response back to the same time entry and update our db accordingly.

 

this is an example of the response back from above POST call:

 

[
{
"Id":7566,
"ServiceRequestId":76264,
"ServiceId":9999,
"ActivityId":20,
"ApproverNetworkId":"krista.miller@tc.gc.ca",
"Comment":"test",
"SubmitterNetworkId":"shahram.afrasiabi@tc.gc.ca",
"DateTime":"2023-02-06T00:00:00",
"EndDateTime":"2023-02-06T18:45:32",
"State":0,
"ModifiedOn":"2023-02-06T18:45:36Z",
"SourceSystemCd":"718",
"CreatedOn":"2023-02-06T18:45:36Z",
"Hours":[
{
"HourId":"d616fa6f-4ea6-ed11-aad0-0022486df982",
"Quantity":0.63,
"TypeCode":"REG",
"TimeEntryId":7566,
"IsBillable":false,
"Status":{
"Id":3,
"NameEn":"Submitted for approval",
"NameFr":"Soumise pour approbation",
"State":0
},
"State":0,
"CreatedOn":"2023-02-06T18:45:36Z",
"ModifiedOn":"2023-02-06T18:45:36Z"
}
],
"ServiceOutputs":[
{
"OutputId":"d216fa6f-4ea6-ed11-aad0-0022486df982",
"TimeEntryId":7566,
"Code":2,
"State":0,
"CreatedOn":"2023-02-06T18:45:36Z",
"ModifiedOn":"2023-02-06T18:45:36Z"
}
]
}
]

 

 

 

Related content

Time Tracking - Auto-capture
Time Tracking - Auto-capture
More like this
Time tracking - Default activities and times
Time tracking - Default activities and times
Read with this
Handle Approval/Rejection of time Entries
Handle Approval/Rejection of time Entries
More like this
Technical onboarding
Technical onboarding
Read with this
TimeTrackingService API Documentation
TimeTrackingService API Documentation
More like this
How to use the Job Notification Service
How to use the Job Notification Service
Read with this