Removes entities from ad groups in bulk, with a JSON body. Every ad group listed under an entity is paired with that entity. Requires the advertiser_ad_group_entity_management delete permission.
Batch size: the code enforces no maximum number of entities, ad groups or pairs, and no request body size limit.
Validation is all or nothing and runs before any write: each entity_id and ad group id must be greater than 0, every entity must exist (404 otherwise), and for callers without the Koddi admin global role every ad group must belong to the advertiser in the path and the caller must have the delete permission on every ad group; for Koddi admin callers only the existence of the ad groups is checked. The memberGroupId in the path is not used by the handler itself.
Write: one database statement marks the matching active bidders as deleted. The statement is not wrapped in a transaction with the later check. After it runs, the number of bidders removed is compared with the number of pairs in the request; if they differ (for example a pair that has no active bidder, or a duplicated pair) the response is 400 (bidders for the entities and ad groups do not exist), but the active bidders that matched were already removed. There is no per-item result.
Response: 200 with a null result.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Removes entities from ad groups in bulk. The body is sent with the DELETE request. Requires the advertiser_ad_group_entity_management delete permission. The code enforces no maximum number of entities or ad groups.
Validation of ids and access runs first and is all or nothing. The write is a single statement that marks the matching active bidders as deleted; afterwards the number of bidders removed is compared to the number of pairs in the request, and a mismatch returns 400 even though the matching bidders were already removed.
Inputs
| Field | Type | Description | Required |
| memberGroupId | integer | The member group id (provided by Koddi) | Yes |
| advertiserId | integer | The advertiser ID | Yes |
| entities | array of objects | Entity and ad group pairs to remove | Yes |
| entities[].entity_id | integer | The entity ID. Must be greater than 0 and exist | No |
| entities[].ad_group_ids | array of integers | Ad group IDs. Each must be greater than 0 | No |
| use_base_bid | boolean | Ignored when removing | No |
Response
The 200 response has a null result; there is no per-item result.

