| title | Create offerShiftRequest |
|---|---|
| description | Create an instance of an offerShiftRequest. |
| ms.localizationpriority | medium |
| author | akumar39 |
| ms.subservice | teams |
| doc_type | apiPageType |
| ms.date | 04/04/2024 |
Namespace: microsoft.graph
Create an instance of an offerShiftRequest.
[!INCLUDE national-cloud-support]
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]
POST /teams/{teamId}/schedule/offerShiftRequests| Name | Description |
|---|---|
| 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. |
Provide the new offerShiftRequest object in the request body for this method.
If successful, this method returns a 200 OK response code and an offerShiftRequest object in the response body.
The following example shows a request.
POST https://graph.microsoft.com/v1.0/teams/788b75d2-a911-48c0-a5e2-dc98480457e3/schedule/offerShiftRequests
Authorization: Bearer {token}
Content-type: application/json
{
"senderShiftId": "SHFT_f7e484ed-fdd6-421c-92d9-0bc9e62e2c29",
"senderMessage": "Having a family emergency, could you take this shift for me?",
"recipientUserId": "fe278b61-21ac-4872-8b41-1962bbb98e3c"
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.etag": "\"4000ee23-0000-0700-0000-5d1415f60000\"",
"id": "SREQ_0b87dd20-d5ed-4764-9c3e-cfc8516def09",
"createdDateTime": "2019-09-27T01:01:04.566Z",
"lastModifiedDateTime": "2019-09-28T01:03:48.874Z",
"assignedTo": "recipient",
"state": "pending",
"senderDateTime": "2019-09-27T01:01:04.566",
"senderMessage": "Having a family emergency, could you take this shift for me?",
"senderUserId": "a4704dd0-3f4c-4f2c-9bb5-8cc575703f30",
"managerActionDateTime": null,
"managerActionMessage": null,
"managerUserId": null,
"recipientActionDateTime": null,
"recipientActionMessage": null,
"senderShiftId": "SHFT_f7e484ed-fdd6-421c-92d9-0bc9e62e2c29",
"recipientUserId": "fe278b61-21ac-4872-8b41-1962bbb98e3c",
"lastModifiedBy": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "fe278b61-21ac-4872-8b41-1962bbb98e3c",
"displayName": "Employee 1"
}
}
}