Bearbeiten

Freigeben über


Update timeRegistrationEntries

Update a timeRegistrationEntry in Business Central.

HTTP request

Replace the URL prefix for Business Central depending on environment following the guideline.

PATCH businesscentralPrefix/companies({companyId})/timeRegistrationEntries({timeregistrationId})
PATCH businesscentralPrefix/companies({companyId})/employees({employeeId})/timeRegistrationEntries({timeregistrationId})

Request headers

Header Value
Authorization Bearer {token}. Required.
Content-Type application/json
If-Match Required. When this request header is included and the eTag provided does not match the current tag on the timeRegistrationEntry, the timeRegistrationEntry will not be updated.

Example

Request

Here is an example of the request.

PATCH https://{businesscentralPrefix}/api/v2.0/companies({id})/timeRegistrationEntries({timeregistrationId})
Content-type: application/json

{
    "quantity": 8
}

Response

Here is an example of the response.

Note

The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
    "id": "1a8b1fec-c0e3-ea11-aa60-000d3ad7cacb",
    "employeeId": "258bb9c0-44e3-ea11-bb43-000d3a2feca1",
    "employeeNumber": "AH",
    "jobId": "00000000-0000-0000-0000-000000000000",
    "jobNumber": "",
    "jobTaskNumber": "",
    "absence": "",
    "lineNumber": 10000,
    "date": "2019-02-02",
    "quantity": 8,
    "status": "Open",
    "unitOfMeasureId": "56a6738a-44e3-ea11-bb43-000d3a2feca1",
    "unitOfMeasureCode": "HOUR",
    "lastModfiedDateTime": "2020-08-21T15:13:58.87Z"
}

Tips for working with the APIs
Error Codes
timeRegistrationEntries
Get timeRegistrationEntries
Post timeRegistrationEntries
Delete timeRegistrationEntries