offerShiftRequest:拒绝offerShiftRequest: decline

命名空间:microsoft.graphNamespace: microsoft.graph

拒绝 offerShiftRequest 对象。Decline an offerShiftRequest object.


要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

权限类型Permission type 权限(从最低特权到最高特权)Permissions (from least to most privileged)
委派(工作或学校帐户)Delegated (work or school account) Schedule。 All,Group. 所有Schedule.ReadWrite.All, Group.ReadWrite.All
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) 不支持。Not supported.
应用程序Application Schedule.ReadWrite.AllSchedule.ReadWrite.All

注意:此 API 支持管理员权限。Note: This API supports admin permissions. 全局管理员可以访问他们不是其成员的组。Global admins can access groups that they are not a member of.

HTTP 请求HTTP request

POST /teams/{teamId}/schedule/offerShiftRequests/{offerShiftRequestId}/decline

请求标头Request headers

名称Name 说明Description
AuthorizationAuthorization Bearer {token}。必需。Bearer {token}. Required.
Content-typeContent-type application/json. Required.application/json. Required.

请求正文Request body

在请求正文中,提供具有以下参数的 JSON 对象。In the request body, provide a JSON object with the following parameters.

参数Parameter 类型Type 描述Description
messagemessage StringString 在拒绝时发送自定义邮件。Custom message sent on decline.


如果成功,此方法返回 200 OK 响应代码。它不在响应正文中返回任何内容。If successful, this method returns a 200 OK response code. It does not return anything in the response body.



以下示例显示了一个请求。The following example shows a request.

Content-type: application/json

  "message": "Sorry, you can't offer this shift."


以下示例显示了相应的响应。The following example shows the response.

HTTP/1.1 200 OK