| title | Replace timeCard |
|---|---|
| description | Update an existing timeCard entry. |
| author | akumar39 |
| ms.localizationpriority | medium |
| ms.subservice | teams |
| doc_type | apiPageType |
| ms.date | 04/04/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Replace an existing timeCard with updated values.
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
PUT /teams/{teamId}/schedule/timeCards/{timeCardID}| Header | Value |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json. Required. |
| MS-APP-ACTS-AS (deprecated) | A user ID (GUID). Required only if the authorization token is an application token; otherwise, optional. The MS-APP-ACTS-AS header is deprecated and no longer required with application tokens. |
In the request body, supply a JSON representation of a timeCard object.
If successful, this method returns a 204 No Content response code.
The following example shows a request.
PUT https://graph.microsoft.com/beta/teams/fd15cad8-80f6-484f-9666-3caf695fbf32/schedule/timeCards/TCK_3cd7413f-0337-433b-9a49-da0923185b3f
Content-type: application/json
{
"userId": "70e47528-2fae-42b5-9d8e-ee73ccd90603",
"state": "clockedOut",
"confirmedBy": "None",
"notes": null,
"clockInEvent": {
"dateTime": "2021-05-21T21:58:41.327Z",
"isAtApprovedLocation": null,
"notes": {
"contentType": "text",
"content": "update sample notes"
}
},
"clockOutEvent": {
"dateTime": "2021-05-21T22:01:46.205Z",
"isAtApprovedLocation": null,
"notes": {
"contentType": "text",
"content": "update sample notes"
}
},
"breaks": [
{
"breakId": "BRK_138f4751-68b1-44c1-aca2-2b26cba9e73f",
"notes": null,
"start": {
"dateTime": "2021-05-21T21:59:59.328Z",
"isAtApprovedLocation": null,
"notes": {
"contentType": "text",
"content": "update sample notes"
}
},
"end": {
"dateTime": "2021-05-21T22:01:10.205Z",
"isAtApprovedLocation": null,
"notes": {
"contentType": "text",
"content": "update sample notes"
}
}
}
]
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
HTTP/1.1 204 No Content