add
Creates sets of sitelinks.
Restrictions
Maximum of 1000 sets of sitelinks per method call.
If all the fields in the sets are identical, only one set is created.
Request
Request structure in JSON format:
{
"method": "add",
"params": { /* params */
"SitelinksSets": [{ /* SitelinksSetAddItem */
"Sitelinks": [{ /* Sitelink */
"Title": (string), /* required */
"Href": (string),
"Description": (string),
"TurboPageId": (long)
}, ... ] /* required */
}, ... ] /* required */
}
}
Parameter | Type | Description | Required |
Params structure (for JSON) / AddRequest structure (for SOAP) | |||
---|---|---|---|
SitelinksSets | array of SitelinksSetAddItem | The sets of sitelinks to add. | Yes |
SitelinksSetAddItem structure | |||
Sitelinks | array of Sitelink | Set of sitelinks. From 1 to 8 items in the array. | Yes |
Sitelink structure | |||
Title | string | Text of a sitelink (maximum 30 characters). The maximum total length of texts for sitelinks 1–4 is 66 characters. The maximum total length of texts for sitelinks 5–8 is 66 characters. | Yes |
Href | string | Link to the advertiser's website (maximum of 1024 characters). It must include the protocol and domain name. May contain substitution variables. Attention. The values of the {campaign_id} , {ad_id} , {banner_id} , and {phrase_id} variables will be substituted in the sitelinks only if the same variables are present in the main link for the ad. | One or both of the Href and TurboPageId parameters |
TurboPageId | long | ID of the Turbo page. | |
Description | string | Sitelink description (maximum 60 characters) for displaying the ad in expanded format. | No |
Parameter | Type | Description | Required |
Params structure (for JSON) / AddRequest structure (for SOAP) | |||
---|---|---|---|
SitelinksSets | array of SitelinksSetAddItem | The sets of sitelinks to add. | Yes |
SitelinksSetAddItem structure | |||
Sitelinks | array of Sitelink | Set of sitelinks. From 1 to 8 items in the array. | Yes |
Sitelink structure | |||
Title | string | Text of a sitelink (maximum 30 characters). The maximum total length of texts for sitelinks 1–4 is 66 characters. The maximum total length of texts for sitelinks 5–8 is 66 characters. | Yes |
Href | string | Link to the advertiser's website (maximum of 1024 characters). It must include the protocol and domain name. May contain substitution variables. Attention. The values of the {campaign_id} , {ad_id} , {banner_id} , and {phrase_id} variables will be substituted in the sitelinks only if the same variables are present in the main link for the ad. | One or both of the Href and TurboPageId parameters |
TurboPageId | long | ID of the Turbo page. | |
Description | string | Sitelink description (maximum 60 characters) for displaying the ad in expanded format. | No |
Response
Response structure in JSON format:
{
"result": { /* result */
"AddResults": [{ /* ActionResult */
"Id": (long),
"Warnings": [{ /* ExceptionNotification */
"Code": (int), /* required */
"Message": (string), /* required */
"Details": (string)
}, ... ],
"Errors": [{ /* ExceptionNotification */
"Code": (int), /* required */
"Message": (string), /* required */
"Details": (string)
}, ... ]
}, ... ]
}
}
Parameter | Type | Description |
Result structure (for JSON) / AddResponse structure (for SOAP) | ||
---|---|---|
AddResults | array of ActionResult | Results of adding sets of sitelinks. |
ActionResult object | ||
Id | long | ID of the created set of sitelinks. Returned if there aren't any errors. See the section Operations on object arrays. |
Warnings | array of ExceptionNotification | Warnings that occurred during the operation. |
Errors | array of ExceptionNotification | Errors that occurred during the operation. |
Parameter | Type | Description |
Result structure (for JSON) / AddResponse structure (for SOAP) | ||
---|---|---|
AddResults | array of ActionResult | Results of adding sets of sitelinks. |
ActionResult object | ||
Id | long | ID of the created set of sitelinks. Returned if there aren't any errors. See the section Operations on object arrays. |
Warnings | array of ExceptionNotification | Warnings that occurred during the operation. |
Errors | array of ExceptionNotification | Errors that occurred during the operation. |