/api/v2/ad_groups/<ad_group_id>.json
A resource that allows you to retrieve/edit a single ad group.
GET
Retrieving a single ad group
Request example
GET /api/v2/ad_groups/6617841.json
Response example
{
"id": 6617841,
"name": "New ad group 2022-07-15 17:53",
"package_id": 83
}
Parameters
- fields — list of fields in the response
/api/v2/ad_groups.json?fields=id,package_id
Available fields are described in AdGroup.
POST
Editing an ad group
Request example
POST /api/v2/ad_groups/6617841.json
{
"name": "New name"
}
Response example
HTTP 204
Possible response codes
- 200/204 — group saved
- 400 — validation error
- 404 — group not found
Possible error codes
- invalid_package — the package is not available to this user
- can_not_set — cannot switch to the specified package
- step — invalid step when setting budget_limit. The change must be a multiple of budget_limit_step from the
/api/v2/currencies.json API for the user’s currency
- not_allowed_for_package — changes are not available in this package
- pricelist_not_found — no pricelist was found for the provided pricelist_id
- permission_required — insufficient permissions to modify the field
- audit_pixel_invalid_roles — invalid audit pixel roles
- audit_pixel_max_count — audit pixel count limit exceeded
- audit_pixel_must_be_unique — audit pixels must be unique
- audit_pixel_invalid_urls — audit pixel has an invalid URL
- min_translation_hours — minimum broadcast time in fulltime targeting must be at least 8 hours
- required — field is required
- max_value — value is greater than the maximum
- min_value — value is less than the minimum
- bad_value — invalid value format or type
- bad_items — the list contains invalid values
- read_only_field — read-only field
- duplicate_value — duplicate values
- required_value — required values are expected
- required_one_of_value — one of the required values is expected
- unallowed_value — value is not in the list of allowed values
- unallowed_field — field is not allowed
- recommended_not_available — the
recommended strategy is not available. You must set either the total budget and the broadcast period, or the group daily budget
DELETE
Deleting an ad group
Request example
DELETE /api/v2/ad_groups/6617841.json
Response example
HTTP 204