---
title: "Get tree graph for a collection"
method: GET
path: "/public/v2/network/{collectionId}/tree-graph"
tags: ["Collections - Network"]
deprecated: true
---

# Get tree graph for a collection

`GET /public/v2/network/{collectionId}/tree-graph`

> **Deprecated.**

⚠️ **DEPRECATED** - This endpoint is deprecated and will be removed at the end of December 2026.

**Note**: Responses include a `Sunset` HTTP header (RFC 8594) indicating the removal date.

---

## Migration Required

This endpoint has been replaced by the v1 Collections Tier-N API. Please migrate to the new endpoint:

### Replacement Endpoint

| Old Endpoint | New Endpoint | Purpose |
|--------------|--------------|---------|
| `GET /public/v2/network/{collectionId}/tree-graph` | `GET /public/v1/collections/{collectionId}/tier-n/data` | Get collection-based supplier graphs |

---

## Why Migrate?

The v1 Collections Tier-N API provides significant improvements:

### 1. Enhanced Functionality
- **v2**: Basic tree graph with limited configuration
- **v1 Tier-N**: Advanced filtering through collection settings
- **v1 Tier-N**: Configurable data sources (customs, media, predictions)
- **v1 Tier-N**: Better control over scope (private, shared, public targets)

### 2. Better Performance
- **v1 Tier-N**: Optimized queries for large collections
- **v1 Tier-N**: More efficient data retrieval

### 3. Improved Documentation
- Comprehensive examples for all endpoints
- Detailed error response documentation
- Clear parameter descriptions

---

## Quick Migration Guide

### Step 1: Update Endpoint URL

**Before:**
```http
GET /public/v2/network/123/tree-graph?tierLevel=3
```

**After:**
```http
GET /public/v1/collections/123/tier-n/data?tierLevel=3
```

### Step 2: Update Response Parsing

**Before:** Parse `PublicTreeTargetV2` structure

**After:** Parse `PublicTierNCollectionGraphEntry` structure (different format)

---

**Required Permissions**: `ACCESS_PUBLIC_TREE_GRAPH` and `READ` on the collection

**Performance Impact**: High

For detailed API reference and examples, see the v1 Collections Tier-N API documentation.

## Path parameters

- `collectionId` integer, required

## Query parameters

- `commodityIds` integer[]
- `commodityTreeId` integer
- `fetchParents` boolean
- `tierLevel` integer

## Response `200`

OK

## 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.
- `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)
