Supply Chain

Upstream Trade Traversal

Beta
GET

This endpoint is in beta and is subject to change. It is provided for early access and testing purposes only.
Execute a traversal of the upstream trade network (supply chain) of an entity, returning a set of entities and edges between them.

Path parameters

idstringRequired
The root entity identifier.

Query parameters

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.
riskslist of enumsOptional
Risk leaf node filter. Only return supply chains that end with a supplier that has 1+ of the specified risk factors.
-riskslist of enumsOptional
Risk leaf node filter. Only return supply chains that end with a supplier that has none of the specified risk factors.
hs_codelist of stringsOptional
Product root edge filter. Only return supply chains that start with an edge that has 1+ of the specified HS codes.
-hs_codelist of stringsOptional
Product root edge filter. Only return supply chains that start with an edge that has none of the specified HS codes.
componentslist of stringsOptional
Component node filter. Only return supply chains that contain at least one edge with 1+ of the specified HS codes.
-componentslist of stringsOptional
Component node filter. Only return supply chains that contain no edges with any of the specified HS codes.
max_depthintegerOptional
The maximum depth of the traversal, from 1 to 4 inclusive. Default is 4. Reduce if query is timing out.
datestringOptional
The date range to filter the supply chain by by only considering shipments within the specified date range, inclusive. The date range is formatted as "YYYY-MM-DD|YYYY-MM-DD", where the first date is the start date and the second date is the end date. Both dates are optional, e.g. "|2022-01-01" will return all shipments up to and including 2022-01-01.

Response

This endpoint returns an object
entities
map from strings to objects
paths
union
status
integerOptional
success
booleanOptional
message
stringOptional
GET
1curl -G https://api.sayari.com/v1/upstream/ESkH7J-UCRfY5t0_JXIH3w \
2 -H "Authorization: Bearer <token>" \
3 -d date=2023-06-01 \
4 -d "hs_code[]"=3206 \
5 -d "components[]"=3204 \
6 -d max_depth=2 \
7 -d "risks[]"=forced_labor_uflpa_origin_subtier
200
Retrieved
1{
2 "entities": {
3 "ESkH7J-UCRfY5t0_JXIH3w": {
4 "type": "company",
5 "label": "ACUMEN HOUSEWARE INDUSTRY VIETNAM CO LTD",
6 "countries": [
7 "VNM"
8 ],
9 "risks": []
10 },
11 "A84F35yJ_3FT_hVzD9EzAw": {
12 "type": "company",
13 "label": "TOYO INK INDIA PRIVATE LIMITED",
14 "countries": [
15 "IND"
16 ],
17 "risks": [
18 "forced_labor_sheffield_hallam_university_reports_origin_subtier",
19 "forced_labor_uflpa_origin_subtier",
20 "forced_labor_xinjiang_origin_subtier"
21 ]
22 }
23 },
24 "paths": [
25 {
26 "start": "ESkH7J-UCRfY5t0_JXIH3w",
27 "end": "A84F35yJ_3FT_hVzD9EzAw",
28 "paths": [
29 {
30 "segments": [
31 {
32 "src": "A84F35yJ_3FT_hVzD9EzAw",
33 "dst": "ESkH7J-UCRfY5t0_JXIH3w",
34 "products": [
35 {
36 "hsCode": "3206",
37 "minDate": "2023-01-01",
38 "maxDate": "2023-11-25",
39 "arrivalCountries": [
40 "VNM"
41 ],
42 "departureCountries": [
43 "IND"
44 ]
45 },
46 {
47 "hsCode": "3204",
48 "minDate": "2023-03-01",
49 "maxDate": "2023-11-25",
50 "arrivalCountries": [
51 "VNM"
52 ],
53 "departureCountries": [
54 "IND"
55 ]
56 }
57 ]
58 }
59 ]
60 }
61 ]
62 }
63 ]
64}