---
title: "Get targets in collection"
method: GET
path: "/public/v1/collections/{collectionId}/targets"
tags: ["Collections - Targets"]
---

# Get targets in collection

`GET /public/v1/collections/{collectionId}/targets`

Retrieve all targets that are currently part of a collection with pagination support.

Returns paginated target references with basic information about each target (ID and name).
To get detailed target information, use the targets API with these target IDs.

**Getting Collection ID:**
- To find available collections and their IDs, use the Collections Management API:
  - `GET /public/v1/collections` - List all collections accessible to you (returns collections with `id` field)
  - `GET /public/v1/collections/{collectionId}` - Get a specific collection by ID
- The `id` field in collection responses is the `collectionId` used in this endpoint's path parameter

**Fetching Full Supplier Information:**
- The `id` field in each target reference is the `prewaveTargetId` (target's `infotag_id`)
- To fetch comprehensive supplier details, use the Supplier Sites API endpoints:
  - `GET /public/v2/suppliers/sites/find-by-identifier?prewaveId={prewaveTargetId}` - Get detailed supplier information by `prewaveTargetId`
  - `GET /public/v2/suppliers/sites` - List all suppliers and match by `prewaveTargetId` or supplier identifiers
- These endpoints provide full supplier information including address, supplier identifiers, screening status, monitoring dates, and more

**Pagination Parameters**:
- `page` (optional): Page number (0-indexed). Default: 0
- `size` (optional): Number of items per page. Default: 10
- `sort` (optional): Sort criteria in the format `property,direction` (e.g., `name,asc` or `id,desc`). Multiple sort criteria can be specified.

The collection must be accessible to the authenticated user.

**Important: Target ID Stability**

⚠️ **The target `id` (prewaveTargetId) may change** due to target merges or data consolidation. When this happens:
- The target's collection memberships are automatically moved to the new target
- **This endpoint will always return the current, correct target `id`** - if a target ID changes, this endpoint will show the new ID, not the old one
- If you have stored target IDs from previous calls to this endpoint, those IDs may have changed, but calling this endpoint again will return the updated target IDs

💡 **Tip for Integrations:**
- This endpoint always reflects the current state of target IDs in the collection
- If you need to track target IDs over time, periodically call this endpoint to get the latest target IDs
- To find a target by its supplier identifier when the ID has changed, use `GET /public/v2/suppliers/sites` and match by supplier identifiers

**Required Permissions**: `access_collection` and `read` on the collection.

## Path parameters

- `collectionId` integer, required

## Query parameters

- `page` integer
- `size` integer
- `sort` string[]

## Response `200`

Successfully retrieved paginated target references

- object
  - `content` PublicTargetRef[]
    - `id` integer, required — Prewave Target ID
    - `name` string, required — Target name
  - `size` integer
  - `number` integer
  - `totalElements` integer
  - `totalPages` integer
  - `numberOfElements` integer
  - `first` boolean
  - `last` boolean
  - `empty` boolean

## Other responses

- `403` — 403 Forbidden - Authentication or authorization failure. This status code is returned when: (1) the request lacks valid authentication credentials (missing or invalid X-Auth-Token header), or (2) the authenticated user does not have the required permission to access this resource.
- `404` — Collection not found or not accessible to the user
- `429` — 429 Too Many Requests - API rate limit exceeded. The request has been rejected because the rate limit for this endpoint has been exceeded. Default rate limits: GET requests - 100 per 10 seconds, 500 per minute; POST/PUT/PATCH/DELETE requests - 20 per 10 seconds, 100 per minute. For increased access, please contact customer success.
- `500` — 500 Internal Server Error - An unexpected error occurred on the server. The request may or may not have been processed.

---

[API](https://skmtc.net/prewave/apis/public-prewave-api.md) · [All operations](https://skmtc.net/prewave/apis/public-prewave-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/prewave/public-prewave-api/revisions/466169815b78/schema)
