Reference data

The reference data API allows you to retrieve a list of data items, such as a list of countries or language levels that will be required when calling other API services. You need to authenticate using an API Key in order to call this service; see the Authentication section for further details

URL
/v1/reference-data
HTTP Method
GET
Client Library Message Name
Product.GetReferenceDataRequest
Request parameters
Name Type Required? Description
WithDataTypes array Yes See section Get reference data by data types

Get reference data by data types

When using the reference data API you must supply a list of data types to specify which reference data items are required.

The available data type values are as follows:
  • Country
  • LanguageLevel

The sample below requests countries and language levels.

Sample request

Error

Failed to run contract transformer command: bin\Api.ContractTransformer.exe

{ "WithDataTypes": ["Country","LanguageLevel"] }

Sample response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: no-cache
Content-Length: 734

{
  "Results": [
    {
      "Type": "Country",
      "Code": "GB",
      "Name": "United Kingdom",
      "Properties": {}
    },
    {
      "Type": "Country",
      "Code": "US",
      "Name": "United States",
      "Properties": {}
    },
    {
      "Type": "LanguageLevel",
      "Code": "Advanced",
      "Name": "Advanced",
      "Properties": {
        "CefrLevel": "C1",
        "Sequence": "7"
      }
    },
    {
      "Type": "LanguageLevel",
      "Code": "Proficiency",
      "Name": "Proficiency",
      "Properties": {
        "CefrLevel": "C2",
        "Sequence": "8"
      }
    }
  ],
  "NextPage": "https://api.ecenglish.com/v1/paging/AGQAcAECe30KCXRleHQvaHRtbA~~?format=json"
}