---
title: "Creates a job to complete multiple target groups"
method: POST
path: "/demand/accounts/{account_id}/projects/{project_id}/batch-jobs/complete-fielding-runs-by-target-group-id"
tags: ["Fielding (Batch)"]
---

# Creates a job to complete multiple target groups

`POST /demand/accounts/{account_id}/projects/{project_id}/batch-jobs/complete-fielding-runs-by-target-group-id`

## Request

- Base URL: `https://api.cint.com/v1`
- URL: `https://api.cint.com/v1/demand/accounts/{account_id}/projects/{project_id}/batch-jobs/complete-fielding-runs-by-target-group-id`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/cint/apis/demand-api/docs/demand/accounts/:account_id/projects/:project_id/batch-jobs/complete-fielding-runs-by-target-group-id/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint creates a bulk job to complete fielding runs for a list of specified target group IDs. This action will immediately complete the specified target groups, regardless of whether their completes goals or end dates have been reached. If a target group is already completed, the system considers the action successful.

To ensure that the same job is not created multiple times, this endpoint uses an `Idempotency-Key` from the request header. If a job with 
the same key has already been submitted, the system will not create a new one but will treat the operation as successful and 
return the same successful response as for a newly created job.

Upon successful submission, the system creates a new bulk job to start the actual processing asynchronously. This means 
the endpoint returns a response quickly without waiting for the entire bulk operation to complete. If the job is created successfully or if 
it already existed due to the idempotency key, the endpoint returns a `201 Created` status code with the job ID in the `Location` header.

To check the status of the job, you can use the job ID returned in the `Location` header with the `Retrieve a bulk job status` endpoint.
The processing of the job will continue even if an operation on an individual target group fails. The final job status will list which target groups 
were updated successfully and which ones failed.

## Path parameters

- `account_id` integer, required: The account's unique identifier.
- `project_id` string, required: The character string representing a unique project ID (ULID format).

## Headers

- `idempotency-key` string, required: A shallow unique ID used as part of the deduplication mechanism for mutable operations. We suggest using UUIDv4 or another random string with sufficient entropy to avoid collisions.

## Request body

- CreateBulkCompleteTargetGroupJobRequest: Request body for creating a bulk complete target groups job.
  - `target_group_ids` TargetGroupID[], required: An array of unique target group identifiers to be processed in a bulk job.

## Response `201`

The job was created successfully. Poll the URL in the `Location` header to track its status.

## Other responses

- `400`: A request is not valid and can't be processed.
- `401`: A request is unauthorized.
- `403`: A requested is forbidden.
- `404`: A requested resource isn't found.
- `500`: A request failed due to an internal error.

---

[API](https://skmtc.dev/cint/apis/demand-api.md) - [All operations](https://skmtc.dev/cint/apis/demand-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cint/apis/demand-api/revisions/b53a5c71324b?raw)
