Method: accounts.icons.create

  • Uploads a new icon for a partner account and starts a review process, generating a unique icon_id.

  • The icon must be a PNG image with a size between 72 and 1200 pixels and an aspect ratio of 1:1.

  • If the icon meets the requirements, the API returns the icon details; otherwise, it returns an HTTP 400 error.

  • Requires authorization with the https://www.googleapis.com/auth/travelpartner scope.

  • Uses the POST method and the URL https://travelpartner.googleapis.com/v3/{parent=accounts/*}/icons with the account ID as a path parameter.

Uploads a new icon and starts its review process. Generates an icon_id and includes it in the icon's resource name, which is the format accounts/{account_id}/icons/{icon_id}

Returns HTTP status 400 and doesn't trigger the review process if the icon has any of these conditions:

  • Image is not in PNG format, or not convertible to PNG format.
  • Size less than 72 pixels
  • Size greater than 1200 pixels
  • Aspect ratio other than 1:1

HTTP request

POST https://travelpartner.googleapis.com/v3/{parent=accounts/*}/icons

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The resource name of the partner account owning the icon. The format is accounts/{account_id}.

Request body

The request body contains an instance of Icon.

Response body

If successful, the response body contains a newly created instance of Icon.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/travelpartner

For more information, see the OAuth 2.0 Overview.