Method: accounts.accountLinks.patch
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Обновляет цель ссылки на учетную запись для ссылки на учетную запись.
HTTP-запрос
PATCH https://travelpartner.googleapis.com/v3/{accountLink.name=accounts/*/accountLinks/*}
URL-адрес использует синтаксис транскодирования gRPC .
Параметры пути
Параметры |
---|
accountLink.name | string Имя ресурса для ссылки на аккаунт в формате account accounts/{account_id}/accountLinks/{account_link_id} . |
Параметры запроса
Параметры |
---|
updateMask | string ( FieldMask format) Необходимый. Поле для обновления. Можно обновить только поле accountLinkTarget . Используйте синтаксис, показанный в приведенном ниже примере URL-адреса, и укажите новое значение в тексте запроса. Пример URL-адреса запроса и тела запроса: PATCH https://travelpartner.googleapis.com/v3/accounts/123456789/
accountLinks/0123456789?updateMask=accountLink.account_link_target
{
"accountLinkTarget": {
"hotelList": {
"partnerHotelIds": ["1234", "4321"]
}
}
}
Тело ответа будет включать только поле name AccountLink . Приведенной выше информации достаточно для формирования URL и тела запроса. Приведенное ниже предложение является автоматически сгенерированной дополнительной информацией о формате FieldMask в целом. Это список разделенных запятыми полных имен полей. Пример: "user.displayName,photo" . |
Тело запроса
Тело запроса содержит экземпляр AccountLink
.
Тело ответа
В случае успеха тело ответа содержит экземпляр AccountLink
.
Области авторизации
Требуется следующая область действия OAuth:
-
https://www.googleapis.com/auth/travelpartner
Дополнительные сведения см. в обзоре OAuth 2.0 .
Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2022-08-23 UTC.
[null,null,["Последнее обновление: 2022-08-23 UTC."],[[["\u003cp\u003eUpdates an existing account link's target, specifically the \u003ccode\u003eaccountLinkTarget\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eRequires specifying the account link's resource name in the URL path.\u003c/p\u003e\n"],["\u003cp\u003eUses a \u003ccode\u003ePATCH\u003c/code\u003e request with an \u003ccode\u003eupdateMask\u003c/code\u003e query parameter indicating the field to update.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain the updated \u003ccode\u003eAccountLink\u003c/code\u003e object with the new \u003ccode\u003eaccountLinkTarget\u003c/code\u003e value.\u003c/p\u003e\n"],["\u003cp\u003eRequires the \u003ccode\u003ehttps://www.googleapis.com/auth/travelpartner\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: accounts.accountLinks.patch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nUpdates the account link target of an account link.\n\n### HTTP request\n\n`PATCH https://travelpartner.googleapis.com/v3/{accountLink.name=accounts/*/accountLinks/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------------------|-----------------------------------------------------------------------------------------------------------------------|\n| `accountLink.name` | `string` The resource name for the account link in the format `accounts/{account_id}/accountLinks/{account_link_id}`. |\n\n### Query parameters\n\n| Parameters ||\n|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Required. The field to update. Only the `accountLinkTarget` field can be updated. Use the syntax shown in the example URL below and provide the new value in the request body. Example request URL and request body: PATCH https://travelpartner.googleapis.com/v3/accounts/123456789/ accountLinks/0123456789?updateMask=accountLink.account_link_target { \"accountLinkTarget\": { \"hotelList\": { \"partnerHotelIds\": [\"1234\", \"4321\"] } } } The response body will only include the `name` field of an `AccountLink`. The information above is sufficient for forming the URL and request body. The sentence below is auto-generated, supplemental information about the `FieldMask` format in general. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n\n### Request body\n\nThe request body contains an instance of [AccountLink](/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#AccountLink).\n\n### Response body\n\nIf successful, the response body contains an instance of [AccountLink](/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#AccountLink).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/travelpartner`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]