Skip to content

Prerequisites

This page takes you from credentials to your first successful call.


1. Get credentials

Ask Trace One for API credentials (see Support). You receive:

  • client_id — identifies your application
  • client_secret — proves it is your application. Keep it on your server only.

Your client is set up for your company. Each API returns only the data your company can access in Trace One.

There is one environment: production.


2. Base URLs

Every API is an API product with its own prefix and version:

APIBase URL
Specification (with the packaging library)https://apis.traceone.com/spec/v2
Reference Datahttps://apis.traceone.com/reference-data/v2
Quality Portal Spec Bridge (legacy)https://apis.traceone.com/spec-bridge/v1.0

The paths in the API catalog are relative to these base URLs.


3. Get a token

Trace One APIs use the OAuth 2.0 client credentials flow: server-to-server, no end user.

POST https://ws-users.traceone.com/default/connect/token
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&scope=t1_api

Send the access_token of the response in every call:

Authorization: Bearer eyJhbGci...

Authentication explains how long a token lives and how to renew it.


4. Make your first call

List the countries, in French:

GET https://apis.traceone.com/reference-data/v2/countries?languageCode=fr-FR
Authorization: Bearer YOUR_TOKEN

In Python:

import requests

token = requests.post(
    "https://ws-users.traceone.com/default/connect/token",
    data={
        "grant_type": "client_credentials",
        "client_id": "YOUR_CLIENT_ID",
        "client_secret": "YOUR_CLIENT_SECRET",
        "scope": "t1_api",
    },
).json()["access_token"]

response = requests.get(
    "https://apis.traceone.com/reference-data/v2/countries",
    params={"languageCode": "fr-FR"},
    headers={"Authorization": f"Bearer {token}"},
)
response.raise_for_status()
print(response.json())

In JavaScript (Node.js):

const tokenRes = await fetch("https://ws-users.traceone.com/default/connect/token", {
  method: "POST",
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
  body: new URLSearchParams({
    grant_type: "client_credentials",
    client_id: "YOUR_CLIENT_ID",
    client_secret: "YOUR_CLIENT_SECRET",
    scope: "t1_api",
  }),
});
const { access_token } = await tokenRes.json();

const res = await fetch(
  "https://apis.traceone.com/reference-data/v2/countries?languageCode=fr-FR",
  { headers: { Authorization: `Bearer ${access_token}` } }
);
const countries = await res.json();

ToolPurpose
Postman or BrunoExplore and test the APIs by hand
OpenAPI GeneratorGenerate a typed client from our OpenAPI documents
Any HTTP client libraryrequests (Python), fetch or axios (JavaScript), HttpClient (.NET)

Download the OpenAPI documents from the API catalog.


Next steps