get

Returns extensions that meet the specified criteria.

  1. Restrictions
  2. Request
  3. Response

Only one type of extension, the callout, is available at this time.

Restrictions

The method returns a maximum of 10,000 objects.

Request

Request structure in JSON format:

{
  "method": "get",
    "params": { /* params */
    "SelectionCriteria": {  /* AdExtensionsSelectionCriteria */
      "Ids": [(long), ... ],
      "Types": [( "CALLOUT" ), ... ],
      "States": [( "ON" | "DELETED" ), ... ],
      "Statuses": [( "ACCEPTED" | "DRAFT" | "MODERATION" | "REJECTED" ), ... ],
      "ModifiedSince": (string)
    }, /* required */
    "FieldNames": [( "Id" | "Type" | "Status" | "StatusClarification" | "Associated" ), ... ], /* required */
    "CalloutFieldNames": [( "CalloutText" )],
    "Page": {  /* LimitOffset */
      "Limit": (long),
      "Offset": (long)
    }
  }
}
Parameter Type Description Required
Params structure (for JSON) / GetRequest (for SOAP)
SelectionCriteria AdExtensionsSelectionCriteria

Criteria for selecting extensions.

To get all of an advertiser's extensions, leave SelectionCriteria empty.

Yes
FieldNames array of AdExtensionFieldEnum

Names of parameters to get that are common to all types of extensions.

Yes
CalloutFieldNames array of CalloutFieldEnum Names of parameters to get for an extension with the “Callout” type. No
Page LimitOffset

Structure that defines the page for paginated selection of data.

No
AdExtensionsSelectionCriteria structure
Ids array of long Selects extensions with the specified IDs. Maximum of 10,000 items in the array. No
Types array of AdExtensionTypeEnum Selects extensions based on the specified types. Only one type of extension is available at this time — the “Callout” (CALLOUT). No
States array of AdExtensionStateSelectionEnum

Selects extensions based on the specified states. See Extension state.

Note. The get method returns an extension in the DELETED state only if the States parameter is set to DELETED or the ID of this extension is specified in the Ids parameter. If the Ids and States parameters are both omitted, the method doesn't return extensions in the DELETED state.
No
Statuses array of ExtensionStatusSelectionEnum Selects extensions based on the specified statuses. See Extension state. No
ModifiedSince string

Selects extensions that had changes starting from the specified date.

Specified in the format YYYY-MM-DDThh:mm:ssZ (conforming to ISO 8601), such as 2015-05-24T23:59:59Z.

No

Response

Response structure in JSON format:

{
  "result": { /* result */
    "AdExtensions": [{  /* AdExtensionGetItem */
      "Id": (long),
      "Associated": ( "YES" | "NO" ),
      "Type": ( "CALLOUT" | "UNKNOWN" ),
      "Callout": {  /* Callout */
        "CalloutText": (string) /* required */
      },
      "State": [( "ON" | "DELETED" | "UNKNOWN" ), ... ],
      "Status": ( "ACCEPTED" | "DRAFT" | "MODERATION" | "REJECTED" | "UNKNOWN" ),
      "StatusClarification": (string)
    }, ... ],
    "LimitedBy": (long)
  }
}
Parameter Type Description
Result structure (for JSON) / GetResponse (for SOAP)
AdExtensions array of AdExtensionGetItem Ad extensions.
LimitedBy long Sequential number of the last object returned. It is included if there was a limit on the number of objects in the response. See the section Paginated data selection.
AdExtensionGetItem structure
Id long Extension ID.
Associated YesNoEnum Whether the extension is assigned to at least one of the client's ads.
Type AdExtensionTypeEnum Extension type.
Callout Callout Parameters of an extension with the “Callout” type.
State StateEnum State of the extension. See Extension state.
Status StatusEnum Status of the extension. See Extension state.
StatusClarification string Text explanation of the status and/or reasons for rejection after review.
Callout structure
CalloutText string Callout text.