Create (POST) Historical Labor Transaction
Use this API to create project labor transaction records for a specific employee, project, and period. The project code must be set at the lowest level, a leaf node. Between levels, and if there is no lower level, you must specify the value as %20, the URL-encoded value for the space character.
To create a project labor transaction record:
Execute a POST command on the endpoint
{{url}}/api/HistoricalLabor, specifying the data in the request body.
Bolded fields are required unless set differently from the default and you can check in the historical labor metadata. For details about each field, check GET
{{url}}/metadata/historicalLabor.
For example, here is a request submitted using cURL:
curl --request POST \ --url 'https://{{url}}/HistoricalLabor' \ --header 'authorization: Bearer {{oauth_token}}' \ --header 'content-type: application/json' \ --data '{ "Project": "6855vfffffff5.1.1", "Employee": "1033", "Hours": "0", "OvertimeHours": "343", "laborBillingAmount": "11250", "regularCostAmount": "444", "TransDate": "2013-12-30" }'
A successful POST returns the JSON representation of the newly created historical labor record.