TrafficLight

Traffic-Light.co Developer Hub

Welcome to the TrafficLight developer hub. Comprehensive guides and documentation to help you get started with the Traffic-Light.co API as quickly as possible. If you get stuck, please ask for help in support!

Get Started    
Suggest Edits

Search company by ID

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api-demo.single-invoice.co/v2/transactor/countrycode/service/id
curl -X GET \
  https://api-demo.single-invoice.co/v2//transactor/fr/SIRET/493467609 \
  -H 'Postman-Token: 74ea8184-897f-493e-aa50-94aa642e7daf' \
  -H 'apikey: YOURAPIKEY' \
  -H 'cache-control: no-cache'
import requests

url = "https://api-demo.single-invoice.co/v2//transactor/fr/SIRET/493467609"

payload = ""
headers = {
    'apikey': "YOURAPIKEY",
    'cache-control': "no-cache",
    'Postman-Token': "5ee8ff94-cc85-4126-8b1a-b3355e9c6c7e"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
<?php

$request = new HttpRequest();
$request->setUrl('https://api-demo.single-invoice.co/v2//transactor/fr/SIRET/493467609');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Postman-Token' => '1f54de19-c18b-4c89-833d-80917e1d78fb',
  'cache-control' => 'no-cache',
  'apikey' => 'YOURAPIKEY'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
GET /v2//transactor/fr/SIRET/493467609 HTTP/1.1
Host: api-demo.single-invoice.co
apikey: YOURAPIKEY
cache-control: no-cache
Postman-Token: 15bcabfa-7117-4912-a61b-4ba8810a04c2
A binary file was returned

You couldn't be authenticated

{
    "Id": "9432824c-afc3-4f52-a04c-e4662f6e4766",
    "Name": "35° EAST",
    "Address": {
        "StreetNumber": "1",
        "StreetName": "PL DES SAISONS",
        "PostCode": "92048",
        "City": "COURBEVOIE",
        "StateCode": "92",
        "CountryCode": "FR",
        "Type": "main"
    },
    "PhoneNumber": null,
    "LegalFormCode": "SAS",
    "ExternalIds": [
        {
            "ExternalId": "85889366",
            "ExternalService": "eulerid"
        },
        {
            "ExternalId": "493467609",
            "ExternalService": "SIREN"
        },
        {
            "ExternalId": "FAKE85889366",
            "ExternalService": "FAKE"
        }
    ]
}
{
    "country": [
        "\"TEST\" is not a valid choice."
    ],
    "name": [
        "This field is required."
    ]
}

Path Params

countrycode
string
required

Country code (ISO_3166-1 alpha-2, eg FR, DE, SE, US, GB...)

id
string
required

External identifier (for example the VAT number, SIREN, etc.)

service
string
required

Type of external identifier used (for example "VAT", "SIREN", etc.)

 

This endpoint will search the Traffic-Light.co database to find a company based on an external identifier, and returns their Traffic-Light ID that you can use to obtain a rating.

An external ID is typically a unique identifier of the company in some sort of national company registry. For example, a VAT number, or a SIREN number for French companies.

A list of the supported registry services by country is made available through the Supported External Identifiers endpoint.

Suggest Edits

Search company by name

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api-demo.single-invoice.co/v2/transactors
curl -X GET \
  'https://api-demo.single-invoice.co/v2/transactors?countrycode=FR&postcode=75013&city=COURBEVOIE&streetname=PL%20DES%20SAISONS&streetnumber=1&name=35%C2%B0%20EAST' \
  -H 'Postman-Token: afa1580f-cfb5-4f7e-9187-7d3b26d61a59' \
  -H 'apikey: YOURAPIKEY' \
  -H 'cache-control: no-cache'
import requests

url = "https://api-demo.single-invoice.co/v2/transactors"

querystring = {"countrycode":"FR","postcode":"75013","city":"COURBEVOIE","streetname":"PL%20DES%20SAISONS","streetnumber":"1","name":"35%C2%B0%20EAST"}

payload = ""
headers = {
    'apikey': "YOURAPIKEY",
    'cache-control': "no-cache",
    'Postman-Token': "fc6eeec0-ff11-499e-87fb-246f5c7393c7"
    }

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$request = new HttpRequest();
$request->setUrl('https://api-demo.single-invoice.co/v2/transactors');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'countrycode' => 'FR',
  'postcode' => '75013',
  'city' => 'COURBEVOIE',
  'streetname' => 'PL%20DES%20SAISONS',
  'streetnumber' => '1',
  'name' => '35%C2%B0%20EAST'
));

$request->setHeaders(array(
  'Postman-Token' => '8d8360e0-94ab-4374-9b6c-a2cf057fd0c9',
  'cache-control' => 'no-cache',
  'apikey' => 'YOURAPIKEY'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
GET /v2/transactors?countrycode=FR&amp; postcode=75013&amp; city=COURBEVOIE&amp; streetname=PL DES SAISONS&amp; streetnumber=1&amp; name=35° EAST HTTP/1.1
Host: api-demo.single-invoice.co
apikey: YOURAPIKEY
cache-control: no-cache
Postman-Token: 2d8794f0-cc94-404e-8d29-374ba7718569
A binary file was returned

You couldn't be authenticated

[
    {
        "Id": "9432824c-afc3-4f52-a04c-e4662f6e4766",
        "Name": "35° EAST",
        "Address": {
            "StreetNumber": "1",
            "StreetName": "PL DES SAISONS",
            "PostCode": "92048",
            "City": "COURBEVOIE",
            "StateCode": "92",
            "CountryCode": "FR",
            "Type": "main"
        },
        "PhoneNumber": null,
        "LegalFormCode": "SAS",
        "ExternalIds": [
            {
                "ExternalId": "85889366",
                "ExternalService": "eulerid"
            },
            {
                "ExternalId": "493467609",
                "ExternalService": "SIREN"
            },
            {
                "ExternalId": "FAKE85889366",
                "ExternalService": "FAKE"
            }
        ]
    }
]
{
    "country": [
        "\"TEST\" is not a valid choice."
    ],
    "name": [
        "This field is required."
    ]
}

Query Params

countrycode
string
required

Country code (ISO_3166-1 alpha-2, eg FR, DE, SE, US, GB...).

name
string
required

The name of the company to search for. Name can contain special characters but must be URL encoded.

streetnumber
string

Filter on companies by this street number.

streetname
string

Filter on companies by this street name.

city
string

Filter on companies by this city.

postcode
string

Filter by post code / zip code.

phonenumber
string

Filter on companies by phone number.

 

This endpoint will search the Traffic-Light.co database to find a company based on its name, and returns their Traffic-Light ID that you can use to obtain a rating.

This endpoint will return a list of possible matches with their exact name.

Suggest Edits

Get company traffic light

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api-demo.single-invoice.co/v2/companies/id/ratings
curl -X GET \
  https://api-demo.single-invoice.co/v2/companies/9432824c-afc3-4f52-a04c-e4662f6e4766/ratings?date=2019-04-19 \
  -H 'Postman-Token: ee46fe93-9d42-49af-a7b6-81e447801d8e' \
  -H 'apikey: YOURAPIKEY' \
  -H 'cache-control: no-cache'
import requests

url = "https://api-demo.single-invoice.co/v2/companies/9432824c-afc3-4f52-a04c-e4662f6e4766/ratings"

querystring = {"date":"2019-04-19"}

payload = ""
headers = {
    'apikey': "YOURAPIKEY",
    'cache-control': "no-cache",
    'Postman-Token': "68629231-dd3a-45ae-907d-bcf1cedb9414"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
<?php

$request = new HttpRequest();
$request->setUrl('https://api-demo.single-invoice.co/v2/companies/9432824c-afc3-4f52-a04c-e4662f6e4766/ratings');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'date' => '2019-04-19'
));

$request->setHeaders(array(
  'Postman-Token' => '6e2d98c9-9e58-4375-b5ae-6f34325cfd8d',
  'cache-control' => 'no-cache',
  'apikey' => 'YOURAPIKEY'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
GET /v2/companies/9432824c-afc3-4f52-a04c-e4662f6e4766/ratings?date=2019-04-19 HTTP/1.1
Host: api-demo.single-invoice.co
apikey: YOURAPIKEY
cache-control: no-cache
Postman-Token: 53fa693c-e70d-4861-b8ee-274872e4d6fd
A binary file was returned

You couldn't be authenticated

{
    "ratingColor": "yellow",
    "companyId": "9432824c-afc3-4f52-a04c-e4662f6e4766",
    "requestDate": "2019-04-18T14:43:42.5044752Z",
    "lastRefreshDate": "2018-05-17T00:00:00",
    "lastChangeDate": "2018-05-17T00:00:00"
}
{
    "company": [
        "\"xxxxxxxxxxxxxxxxxxx\" is not a valid UUID."
    ]
}

Path Params

id
string
required

Traffic Light ID of the company returned by the company search

Query Params

date
string

Date of the day the Traffic Light needs to be returned in format YYYY-MM-DD. Currently only the current Traffic Light is returned but soon it will be possible to request a Traffic Light at an other date in the past.

 

This endpoint will search the Traffic-Light.co database for the companyId provided.

The following informations are returned:

  • color: Traffic-Light color associated with the financial health and risk of payment default of the company:
    • green: good health, minimal credit risk
    • yellow: average credit risk
    • red: elevated credit risk
    • black: insolvent
    • white: no information about this company
  • companyId: reminder of the company Id used for the search
  • requestDate: timestamp of the Traffic Light request
  • lastRefreshDate: date of the last time the Traffic Light was calculated
  • lastChangeDate: date of the last time there was an evolution of the company rating.

About the lastChangeDate

Depending of how significant the change is, the color of the Traffic Light rating might have changed (a small change in the rating of a company rated Green will result in the company still be rated Green but a significant change would move the rating from Green to Orange).

Suggest Edits

Get company traffic light (Deprecated)

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api-demo.single-invoice.co/v2/ratings/company/id
curl -X GET \
  https://api-demo.single-invoice.co/v2/ratings/company/9432824c-afc3-4f52-a04c-e4662f6e4766 \
  -H 'Postman-Token: ee46fe93-9d42-49af-a7b6-81e447801d8e' \
  -H 'apikey: YOURAPIKEY' \
  -H 'cache-control: no-cache'
import requests

url = "https://api-demo.single-invoice.co/v2/ratings/company/9432824c-afc3-4f52-a04c-e4662f6e4766"

payload = ""
headers = {
    'apikey': "YOURAPIKEY",
    'cache-control': "no-cache",
    'Postman-Token': "68629231-dd3a-45ae-907d-bcf1cedb9414"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
<?php

$request = new HttpRequest();
$request->setUrl('https://api-demo.single-invoice.co/v2/ratings/company/9432824c-afc3-4f52-a04c-e4662f6e4766');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Postman-Token' => '6e2d98c9-9e58-4375-b5ae-6f34325cfd8d',
  'cache-control' => 'no-cache',
  'apikey' => 'YOURAPIKEY'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
GET /v2/ratings/company/9432824c-afc3-4f52-a04c-e4662f6e4766 HTTP/1.1
Host: api-demo.single-invoice.co
apikey: YOURAPIKEY
cache-control: no-cache
Postman-Token: 53fa693c-e70d-4861-b8ee-274872e4d6fd
A binary file was returned

You couldn't be authenticated

{
    "color": "yellow",
    "company": "9432824c-afc3-4f52-a04c-e4662f6e4766",
    "created": "2019-04-18T14:43:42.5044752Z",
    "lastRefreshDate": "2018-05-17T00:00:00",
    "lastChangeDate": "2018-05-17T00:00:00"
}
{
    "company": [
        "\"xxxxxxxxxxxxxxxxxxx\" is not a valid UUID."
    ]
}

Path Params

id
string
required

Traffic Light ID of the company returned by the company search

 

This endpoint will search the Traffic-Light.co database for the company with the provided Traffic-Light.co ID. It the search is successful, it will return a Traffic-Light color associated with the financial health and risk of payment default of the company:

  • green: good health, minimal credit risk
  • yellow: average credit risk
  • red: elevated credit risk
  • black: insolvent
  • white: no information about this company
Suggest Edits

Get ratings history

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api-demo.single-invoice.co/v2/ratings
curl -X GET \
  https://api-demo.single-invoice.co/v2/ratings \
  -H 'Postman-Token: 8306cff4-5113-4df1-8a68-2a8209361910' \
  -H 'apikey: YOURPAIKEY' \
  -H 'cache-control: no-cache'
import requests

url = "https://api-demo.single-invoice.co/v2/ratings"

payload = ""
headers = {
    'apikey': "YOURAPIKEY",
    'cache-control': "no-cache",
    'Postman-Token': "8ed46dfb-6fef-4796-bd3c-547be02207ae"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
<?php

$request = new HttpRequest();
$request->setUrl('https://api-demo.single-invoice.co/v2/ratings');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Postman-Token' => '37e0a5c1-a19f-4946-a70a-e27b8477b377',
  'cache-control' => 'no-cache',
  'apikey' => 'YOURAPIKEY'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
GET /v2/ratings HTTP/1.1
Host: api-demo.single-invoice.co
apikey: YOURAPIKEY
cache-control: no-cache
Postman-Token: e231b459-40cb-4c6f-a343-d283f0519e37
A binary file was returned

You couldn't be authenticated

{
    "next": null,
    "previous": null,
    "results": [
      
      {
            "ratingColor": "yellow",
            "companyId": "9432824c-afc3-4f52-a04c-e4662f6e4766",
            "requestDate": "2019-04-24T15:48:13Z",
            "lastRefreshDate": "2018-05-17T00:00:00Z",
            "lastChangeDate": "2018-05-17T00:00:00Z"
        },
        {
            "ratingColor": "green",
            "companyId": "9432824c-afc3-4f52-a04c-e4662f6e4766",
            "requestDate": "2019-04-19T10:23:03Z",
            "lastRefreshDate": "2018-05-17T00:00:00Z",
            "lastChangeDate": "2018-05-17T00:00:00Z"
        },
       {
            "ratingColor": "red",
            "companyId": "7dfd3e6c-6640-4355-8bf1-8a5f6c337a9f",
            "requestDate": "2019-04-18T14:31:12Z",
            "lastRefreshDate": "2019-01-10T00:00:00Z",
            "lastChangeDate": "2018-09-04T00:00:00Z"
        }
    ]
}
{
    "company": [
        "\"xxxxxxxxxxxxxxxxxxx\" is not a valid UUID."
    ]
}
 

This endpoint will return a list of previously requested Traffic-Light ratings and their time and date.

Suggest Edits

Country codes

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api-demo.single-invoice.co/v2/lookups/countries
curl --request GET \
  --url https://api-demo.single-invoice.co/v2/lookups/countries
var request = require("request");

var options = { method: 'GET',
  url: 'https://api-demo.single-invoice.co/v2/lookups/countries' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api-demo.single-invoice.co/v2/lookups/countries")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api-demo.single-invoice.co/v2/lookups/countries");

xhr.send(data);
import requests

url = "https://api-demo.single-invoice.co/v2/lookups/countries"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
    {
        "CountryCode": "AA",
        "CountryName": "Vatican City"
    },
    {
        "CountryCode": "AD",
        "CountryName": "Andorra"
    },
    {
        "CountryCode": "AE",
        "CountryName": "United Arab Emirates"
    },
    {
        "CountryCode": "AF",
        "CountryName": "Afghanistan"
    }
]
 

This endpoint returns the list of country codes.

The TL is returning ratings in the following countries:

  • France
  • UK
  • Ireland
  • Germany
  • Spain
  • Belgium
  • Luxembourg
  • Netherlands
  • Italy
  • China

We are working to open more countries soon!

Suggest Edits

Supported service IDs for company search by ID

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api-demo.single-invoice.co/v2/lookups/services
curl --request GET \
  --url https://api-demo.single-invoice.co/v2/lookups/services
var request = require("request");

var options = { method: 'GET',
  url: 'https://api-demo.single-invoice.co/v2/lookups/services' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api-demo.single-invoice.co/v2/lookups/services")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api-demo.single-invoice.co/v2/lookups/services");

xhr.send(data);
import requests

url = "https://api-demo.single-invoice.co/v2/lookups/services"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
    {
        "IdentifierCode": "DUN",
        "IdentifierCountry": "AD",
        "IdentifierLabel": "DUNS number"
    },
    {
        "IdentifierCode": "HPOLIDTH",
        "IdentifierCountry": "AD",
        "IdentifierLabel": "Syntesys id for tp"
    },
    {
        "IdentifierCode": "HRM",
        "IdentifierCountry": "AD",
        "IdentifierLabel": "Hermes number"
    },
    {
        "IdentifierCode": "AXESOR",
        "IdentifierCountry": "AD",
        "IdentifierLabel": "Axesor number"
    }
]
 

Please find below a list of recommended company IDs by country for the search company by ID.

Country
service and description

France (FR) and territories (GF,GP,MQ,YT,RE,PM,WF)

SIREN
Company registration number

SIRET
Company registration number

United Kingdom (GB)

CRO
Company registration number

EXDIURN
Experian Trading Address URN

Ireland (IE)

CNIE
Ireland company number

EXDIURN
Experian Trading Address URN

Spain (ES)

CIF
CIF number Spain (VAT)

DUN
Dun & Bradstreet (D&B) number

Belgium (BE)

DUN
Dun & Bradstreet (D&B) number

RCBE
Trade register number

ONSS
Social security number

EURODB

Netherlands (NL)

KVK
Chamber of commerce number

GRAY
Graydon company number

DUN
Dun & Bradstreet (D&B) number

TVANL
VAT number

Luxembourg (LU)

MERCAT

RCLU
Trade register number

Germany (DE)

BWI
Bürgel / CRIF number

COC
Chamber of commerce number

CREF
Credit Reform number

FCDE
Fiscal code

DUN
Dun & Bradstreet (D&B) number

Italy (IT)

COFIS
Registration number Italy

CCIAA
Trade Register, Italy

TVAIT
VAT number

SIACID

China (CN)

"RNCN
Registration number"

OCCN
Organization code for China

VATCN
VAT number