For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
LearnGraph LoginRequest a Demo
HomeAPIBulk DataSayari LibraryChange Log
  • Key Concepts
    • Introduction
    • Endpoint Overview
    • Authentication
    • Requests
    • Pagination
    • Response Status Codes
    • Data Types
    • Rate Limits
  • API Clients
    • Overview
    • Open API
    • Postman
    • Go
    • Python
    • Node
  • API Reference
      • GETUpstream Trade Traversal
  • Guides
    • Getting Started
    • Understanding Project Entity
    • Risk Factors
    • Entity Search
    • Advanced Entity Search
    • Resolution
    • Trade Search - Shipments
    • Trade Search - Suppliers & Buyers
    • v0 Migration
  • Implementation Patterns
    • Project Entity Supply Chain
  • Use Cases
    • Entity Screening & Verification
    • Investigations
LogoLogo
LearnGraph LoginRequest a Demo
API ReferenceSupply Chain

Upstream Trade Traversal

Beta
GET
/v1/supply_chain/upstream/:id
GET
/v1/supply_chain/upstream/:id
$curl -G https://api.sayari.com/v1/supply_chain/upstream/ESkH7J-UCRfY5t0_JXIH3w \
> -H "Authorization: Bearer <token>" \
> -d min_date=2023-03-15 \
> -d product=3204 \
> -d risk=forced_labor_xinjiang_origin_subtier
1{
2 "filters": {
3 "product": [
4 "7616"
5 ]
6 },
7 "data": {
8 "paths": [
9 {
10 "source_entity_id": "aGhVqFtVmSjbXqH6oBX6IA",
11 "path": [
12 {
13 "tier": 2,
14 "entity_id": "Tdge30S7idW8cJHRaTABtg",
15 "components": [
16 {
17 "hs_code": "2818",
18 "arrival_countries": [
19 "VNM"
20 ],
21 "departure_countries": [
22 "TWN"
23 ],
24 "min_date": null,
25 "max_date": "2023-03-01"
26 }
27 ]
28 }
29 ]
30 },
31 {
32 "source_entity_id": "aGhVqFtVmSjbXqH6oBX6IA",
33 "path": [
34 {
35 "tier": 2,
36 "entity_id": "s7rRJAvSAW8YWuGPGzDb_w",
37 "components": [
38 {
39 "hs_code": "7609",
40 "arrival_countries": [
41 "VNM"
42 ],
43 "departure_countries": [
44 "CHN"
45 ],
46 "min_date": null,
47 "max_date": "2023-06-01"
48 }
49 ]
50 }
51 ]
52 },
53 {
54 "source_entity_id": "aGhVqFtVmSjbXqH6oBX6IA",
55 "path": [
56 {
57 "tier": 2,
58 "entity_id": "9QIh3SU3TDipp80ibWMYfg",
59 "components": [
60 {
61 "hs_code": "7616",
62 "arrival_countries": [
63 "VNM"
64 ],
65 "departure_countries": [
66 "TWN"
67 ],
68 "min_date": null,
69 "max_date": "2023-12-01"
70 }
71 ]
72 }
73 ]
74 },
75 {
76 "source_entity_id": "aGhVqFtVmSjbXqH6oBX6IA",
77 "path": [
78 {
79 "tier": 2,
80 "entity_id": "s7rRJAvSAW8YWuGPGzDb_w",
81 "components": [
82 {
83 "hs_code": "7616",
84 "arrival_countries": [
85 "VNM"
86 ],
87 "departure_countries": [
88 "CHN"
89 ],
90 "min_date": null,
91 "max_date": "2023-06-01"
92 }
93 ]
94 }
95 ]
96 }
97 ],
98 "entities": {
99 "9QIh3SU3TDipp80ibWMYfg": {
100 "id": "9QIh3SU3TDipp80ibWMYfg",
101 "type": "company",
102 "label": "ZITAI PRECISION MACHINERY CO LTD",
103 "risk_factors": [],
104 "countries": [
105 "BRA",
106 "CHN",
107 "DEU",
108 "GBR",
109 "JPN",
110 "MEX",
111 "TWN"
112 ]
113 },
114 "s7rRJAvSAW8YWuGPGzDb_w": {
115 "id": "s7rRJAvSAW8YWuGPGzDb_w",
116 "type": "company",
117 "label": "EQUIPMENT AND MACHINE CO LTD",
118 "risk_factors": [
119 "exports_ilab_forced_labor",
120 "psa_imports_ilab_forced_labor",
121 "psa_exports_ilab_child_labor",
122 "exports_ilab_child_labor",
123 "psa_exports_ilab_forced_labor",
124 "imports_ilab_forced_labor"
125 ],
126 "countries": [
127 "AUS",
128 "BLZ",
129 "CHE",
130 "CHN",
131 "CZE",
132 "DEU",
133 "DNK",
134 "GBR",
135 "HKG",
136 "ISR",
137 "ITA",
138 "JPN",
139 "KOR",
140 "MYS",
141 "NLD",
142 "POL",
143 "ROU",
144 "SGP",
145 "TWN",
146 "USA"
147 ]
148 },
149 "Tdge30S7idW8cJHRaTABtg": {
150 "id": "Tdge30S7idW8cJHRaTABtg",
151 "type": "company",
152 "label": "TIEN YEOU TRADING CO LTD",
153 "risk_factors": [],
154 "countries": [
155 "ITA",
156 "TWN"
157 ]
158 },
159 "aGhVqFtVmSjbXqH6oBX6IA": {
160 "id": "aGhVqFtVmSjbXqH6oBX6IA",
161 "type": "company",
162 "label": "Công ty TNHH KRICO",
163 "risk_factors": [],
164 "countries": [
165 "VNM"
166 ]
167 }
168 }
169 },
170 "explored_count": 98,
171 "partial_results": false
172}

Execute a traversal of the upstream trade network (supply chain) of an entity, returning a set of entities and edges between them.

Was this page helpful?
Previous

Get Record

Next
Built with

Authentication

AuthorizationBearer

OAuth authentication of the form <token>.

Path parameters

idstringRequired
The root entity identifier.

Query parameters

productlist of stringsOptional

Product root edge filter. Filters results to include only trade relationships where the associated component is part of the specified product’s blueprint or is a sub-component of that product.

-productlist of stringsOptional

Product root edge filter. Filters results to exclude any trade relationships where the associated component is part of the specified product’s blueprint or is a sub-component of that product.

risklist of enumsOptional

Risk leaf node filter. Only return supply chains that end with a supplier that has 1+ of the specified risk factors.

-risklist of enumsOptional
Risk leaf node filter. Only return supply chains that end with a supplier that has none of the specified risk factors.
countrieslist of enumsOptional

Country leaf node filter. Only return supply chains that end with a supplier in 1+ of the specified countries.

-countrieslist of enumsOptional
Country leaf node filter. Only return supply chains that end with a supplier in none of the specified countries.
shipment_countrylist of enumsOptional

Filters supply chain paths where 1+ shipment country from any tier matches the provided values.

-shipment_countrylist of enumsOptional
Filters supply chain paths where none of the shipment countries from any tier matches the provided values.
tier1_shipment_countrylist of enumsOptional

Filters supply chain paths where 1+ shipment country from tier 1 matches the provided values.

tier2_shipment_countrylist of enumsOptional

Filters supply chain paths where 1+ shipment country from tier 2 matches the provided values.

tier3_shipment_countrylist of enumsOptional

Filters supply chain paths where 1+ shipment country from tier 3 matches the provided values.

tier4_shipment_countrylist of enumsOptional

Filters supply chain paths where 1+ shipment country from tier 4 matches the provided values.

tier5_shipment_countrylist of enumsOptional

Filters supply chain paths where 1+ shipment country from tier 5 matches the provided values.

componentlist of stringsOptional

Component edge filter. Only return supply chains that contain at least one edge with 1+ of the specified HS codes.

-componentlist of stringsOptional
Component edge filter. Only return supply chains that contain no edges with any of the specified HS codes.
min_datestringOptional

Minimum date edge filter in <YYYY-MM-DD> format. Only return supply chains with edge dates that are greater than or equal to this date.

max_datestringOptional

Maximum date edge filter in <YYYY-MM-DD> format. Only return supply chains with edge dates that are less than or equal to this date.

max_depthintegerOptional
The maximum depth of the traversal, from 1 to 4 inclusive. Default is 4. Reduce if query is timing out.
limitintegerOptional
The maximum number of results to return. Default is no limit.

Response

This endpoint returns an object.
filtersobject
dataobject
explored_countinteger
Number of hops explored in the traversal
partial_resultsboolean
True if the traversal returned partial results
statusinteger
successboolean
messagestring

Errors

400
Bad Request
401
Unauthorized
404
Not Found
405
Method Not Allowed
429
Rate Limit Exceeded
500
Internal Server Error