URIs and Endpoints
The following services are available
Subscription details
To get the details of your current subscription (countries and commodity codes) for the actual contract/userid, use:
https://www.globaltradetracker.com/api/rest/getreport/subscriptions
Supported method: GET
Parameter:
- periodType
-
following period types are currently supported:
- M (month) -
- Y (year)
- Q (quarter)
- S (semester)
- YTD (year-to-date)
Response: JSON
Available Countries
To get a list of all available countries on GTT (including alphageonom2 code, source, first/last available date, date of last update, update frequency, extra information etc.) use:
https://www.globaltradetracker.com/api/rest/getreport/countries
Supported method: GET
Parameter:
- periods
-
if specified with the value “true”, the country information also contains the list of available periods with the data status for each period.
The status values are:
- lang
-
defines the language used for the translation of the country names.
Allowed values: en de fr zh_CN es hi ja
Default value if missing/not set: en
Response: JSON
Available Trade Details
To get a list of names and ids of the available trade details for the countries on GTT use.
Please note: Only a certain number of countries report this type of information. Please refer to the data availability list to get the different countries and their supplementary data elements.
https://www.globaltradetracker.com/api/rest/getreport/tradedetails
Supported method: GET
Parameter:
- tradedetails
-
defined the type of the trade details.
The value for this parameter depdends on the country and can be one of the fields in the country information ‘supplementaryInfo` field (see Available Countries).
For example:
- SUBDIVISION
- PORT
- TRANSPORT
The parameter is required.
- countryCode
-
Geonom alpha-2 country code.
Some of the reporting countries have several sets of the trade data. It is possible to select the specific trade data by appending the suffix to the country code.
E.g. ‘FR_customs’ specifies the trade data provided by the national statistics office, ‘FR_eurostat’ specifies the data provided by Eurostat.
If the reporting country has several sets of the trade data, it will be specified several times in the list of countries provided by the ‘Available Countries’ end-point (see 4.2 above) with the respective suffixes in the ‘reportercode’ property.
The parameter is required unless, the parameter tradedetails=TRANSPORT is specified (the avaialable transportation modes are not country-specific).
- lang
-
defines the language used for the translation of the country names.
Allowed values: en de fr zh_CN es hi ja
Default value if missing/not set: en
Response: JSON
Report fields
To get a list of all available report fields use:
https://www.globaltradetracker.com/api/rest/getreport/fields
Supported method: GET
Parameter:
- lang
-
defines the language used for the translation of the country names.
Allowed values: en de fr zh_CN es hi ja
Default value if missing/not set: en
Response: JSON
Data updates
To retrieve information regarding data updates on GTT (whether this is newly added data or updated data) following URL can be used:
https://www.globaltradetracker.com/api/rest/getreport/dataupdates
Supported method: GET
Parameter:
- countryCode
-
a list of comma-separated country codes, e.g. “US,CA,CH"
- periodType
-
following period types are currently supported:
- M (month) -
- Y (year)
- Q (quarter)
- S (semester)
- YTD (year-to-date)
- updatedAfter
-
the date to check for updates/additions (i.e. updates/additions will be reported from this date onwards)
Supported formats:
- yyyy-MM-ddTHH:mm:ss
- yyyy-MM-dd
- yyyy-MM
- yyyy
- updatedBefore
-
if specified, only the updates/additions before this date are included.
Supported formats:
- yyyy-MM-ddTHH:mm:ss
- yyyy-MM-dd
- yyyy-MM
- yyyy
- includetimestamps
-
if specified as ‘true’, the updated periods are returned with the timestamp, when the trade dara was added and revised.
Response: JSON
Available Versions
To get a list of the currently supported GTT REST API versions use:
https://www.globaltradetracker.com/api/rest/getreport/versions
Supported method: GET
Response: JSON
Report Generation
To create a GTT report, use:
https://www.globaltradetracker.com/api/rest/getreport/getreport
Supported methods: GET, POST
Parameters.