Method: adUnits.patch

  • This page details how to update an existing ad unit using a PATCH request.

  • Successful updates return the updated ad unit, while errors like NOT_FOUND or INVALID_ARGUMENT indicate issues with the request or resource.

  • The request uses a specific HTTP URL with path parameters like adUnit.name to identify the ad unit.

  • A required updateMask query parameter specifies which fields of the ad unit are to be updated.

  • Both the request and response bodies contain an instance of an AdUnit, and the request requires authorization with the https://www.googleapis.com/auth/doubleclickbidmanager scope.

Updates an existing ad unit.

  • Returns the updated ad unit if successful.
  • Returns error code NOT_FOUND if the ad unit does not exist.
  • Returns error code INVALID_ARGUMENT if an immutable field is specified in updateMask.
  • Returns error code ABORTED if the ad unit was updated in the system after the provided updateTime timestamp.

HTTP request

PATCH https://dv360outofhomeseller.googleapis.com/v1beta1/{adUnit.name=adUnits/*}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
adUnit.name

string

The resource name of the ad unit in the format: adUnits/{id}. For example adUnits/adUnit123.

Query parameters

Parameters
updateMask

string (FieldMask format)

Required. The mask to control which fields to update. An immutable field cannot be specified here.

This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

Request body

The request body contains an instance of AdUnit.

Response body

If successful, the response body contains an instance of AdUnit.

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.