latestOpenAPI 3.0.12026-08-20112309904.6 KB

466169815b78

Suppliers - Supplier Graph

Get a tree-structure of suppliers of the given target

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


Migration Required

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

Replacement Endpoint

Old EndpointNew EndpointPurpose
GET /public/v1/suppliers/{systemId}/{targetId}/supplier-graphGET /public/v1/collections/{collectionId}/tier-n/dataGet collection-based supplier graphs

Why Migrate?

The v1 Collections Tier-N API provides significant improvements:

1. Collection-Based Approach

  • v1: Works with individual target IDs
  • v1 Tier-N: Works with collections, allowing you to analyze multiple suppliers together
  • v1 Tier-N: Better integration with collection management workflows
  • v1 Tier-N: Collection-level configuration for consistent analysis settings

2. Enhanced Functionality

  • v1: Basic supplier 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)

3. Improved Consistency

  • v1: Target-specific endpoint
  • v1 Tier-N: Aligned with collection-based API design
  • v1 Tier-N: Consistent with other collection management endpoints

4. Better Documentation

  • Comprehensive examples for all endpoints
  • Detailed error response documentation
  • Clear parameter descriptions
  • Migration guidance and best practices

Quick Migration Guide

Step 1: Identify Collection ID

Important: The v1 Tier-N endpoint requires a collection ID instead of a target ID. If you don't have a collection yet:

  1. Create a collection using POST /public/v1/collections
  2. Add your target to the collection using POST /public/v1/collections/{collectionId}/targets
  3. Ensure the collection has tier-n enabled (tiersEnabled: true)

Step 2: Update Endpoint Call

Before:

GET /public/v1/suppliers/prewave/102006215/supplier-graph?tierLevel=3&commodityIds=101,102&filter={...}

After:

GET /public/v1/collections/123/tier-n/data?tierLevel=3&commodityIds=101,102

Step 3: Update Request Parameters

v1 Parameters:

  • systemId: System identifier (path parameter)
  • targetId: Target identifier (path parameter)
  • tierLevel: Maximum tier level (query parameter, max 4)
  • commodityIds: List of commodity IDs (query parameter)
  • filter: Complex filter object (query parameter)
  • commodityTreeId: Commodity tree ID (query parameter)
  • fetchParents: Include parents (query parameter, default: true)

v1 Tier-N Parameters:

  • collectionId: Collection identifier (path parameter)
  • tierLevel: Maximum tier level (query parameter, max 4)
  • commodityIds: List of commodity IDs (query parameter)
  • commodityTreeId: Commodity tree ID (query parameter)
  • Filter options can be configured in collection settings using PUT /public/v1/collections/{collectionId}/tier-n/settings

Step 4: Configure Collection Settings (Optional)

For advanced filtering, configure collection settings:

PUT /public/v1/collections/123/tier-n/settings
{
"maxTier": 3,
"scopePrivate": true,
"scopeShared": true,
"sourceCustoms": true,
"sourceMedia": true,
"minShipments": 5,
"probability": 75
}

Breaking Changes

  1. Endpoint Path: Changed from /public/v1/suppliers/{systemId}/{targetId}/supplier-graph to /public/v1/collections/{collectionId}/tier-n/data
  2. Path Parameters:
  • v1: Requires systemId and targetId
  • v1 Tier-N: Requires collectionId (collection-based approach)
  1. Filter Configuration:
  • v1: Filter passed as query parameter object
  • v1 Tier-N: Filter options configured in collection settings or passed as separate query parameters
  1. Response Structure: May differ slightly - review response format
  2. Collection Requirement: v1 Tier-N requires targets to be part of a collection

Important Notes

Collection Requirement

  • The v1 Tier-N endpoint requires targets to be part of a collection
  • If you're currently using this endpoint with individual targets, you'll need to:
  1. Create or identify a collection containing your target
  2. Ensure the collection has tier-n enabled (tiersEnabled: true)
  3. Use the collection ID instead of target ID

Filter Migration

  • Complex filter objects from v1 should be migrated to collection settings
  • Use GET /public/v1/collections/{collectionId}/tier-n/settings to view current settings
  • Use PUT /public/v1/collections/{collectionId}/tier-n/settings to configure filters

Required Permission: ACCESS_PUBLIC_SUPPLIER_GRAPH

Performance Impact: High

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

get/public/v1/suppliers/{systemId}/{targetId}/supplier-graph

Path parameters

systemIdstring required

The system ID is an identifier to determine from which the targetId might originate from. Supported systemIds are "prewave", "customer", "supplier", "own".

targetIdstring required

The target ID can be the target's prewaveId or an external id (edge number) representing the site in another system.

Query parameters

tierLevelinteger

Defines the maximum limit of tiers that should be fetched. Must be <=4

commodityIdsinteger[]

List of commodity ids to filter the supplier graph

commodityTreeIdinteger

Represents a collection of commodityIds

querystring nullable
collectionIdsinteger[] required
commodityIdsinteger[] required
targetTypeIdsinteger[] required
tiersinteger[] required
scopesScope[] required
source'Customer' | 'Media' | 'Customs' | 'PrewavePrediction'
countriesinteger[]
hscodesstring[] required
lastShipmentstring date nullable
onlyDirectlySuppliersboolean required
countryIdsinteger[] required

Filter object used for specifying limiting criteria for retrieving targets, affects both the targets and edge data in relation to the affected organization which queries the data.

  • q [TARGET & EDGE] - a query term by which target details (target name or existing edge details (edge number WITHOUT edge number source are used as condition)

  • collections [TARGET] - a list of collection ids to filter in any which the target needs to exist

  • commodityIds [TARGET & EDGE] - a list of commodity infotag ids by which the target needs to be associated with any

  • tt [TARGET] - a list of target types the target needs to be assigned

  • tier [EDGE] - a list of tiers by which to filter the targets by, in relation to the organization as a supplier

  • scope [EDGE] - defines the visibilities of edge connections to the affected target (if an edge is restricted to the affected customer it's 'Private', otherwise it's 'Shared' if the edge is shared to the organization by a different organization)

  • source [EDGE] - determines edge source that should be considered (either 'Customer', 'Customs', 'Media' or 'PrewavePrediction')

  • country [TARGET] - a list of infotag ids for countries which the target is assigned to any (country_id column in the target, generally only for POI targets)

  • hscode [EDGE] - a list of codes by which the target is associated to via an edge's HS code

  • ods [TARGET] - only direct suppliers (true/false)

  • lastShipment [EDGE] - a date which determines a cut-off point after which the latest shipment must have happened regardless of HS Codes (if hscodes are supplied it's already taken care of by the time this filter is applied, otherwise filters over all HS Codes)

fetchParentsboolean

Defines whether the parents of the targets should be included in the result.

Response

Successfully retrieved supplier graph

edgeSourcestring required
filteredboolean required

Example response

[
  {
    "target": {
      "id": 102006215,
      "name": "Høyanger",
      "sname": "3191281",
      "description": "Description shown in the target profile",
      "location": "Mistelbach",
      "yearFounded": 1999,
      "screened": true,
      "screenedStatus": "Screened",
      "linkedInId": "general-motors",
      "ctype": {
        "id": 1234,
        "ctype": "mine",
        "targetTypeId": 1234,
        "displayName": "Mine",
        "pluralName": "Mines",
        "icon": "fas fa-mine",
        "bgColor": "#ff0000",
        "textColor": "#ffffff"
      },
      "foreignSystems": [
        {
          "id": "1234",
          "source": "SAP_ARIBA"
        }
      ]
    }
  }
]