Skip to content
Get started

Core Reference Data

client.referencedata.retrieve(ReferencedataRetrieveParams { countryid } query?, RequestOptionsoptions?): ReferencedataRetrieveResponse { ChargerTypes, CheckinStatusTypes, ConnectionTypes, 10 more }
GET/referencedata

Returns the core reference data used for looking up IDs such as Connection Types, Operators, Countries etc.

This information is useful for UIs such as editing systems or for fetching results in the lighter non-verbose mode, then hydrating POI results back into complex objects.

ParametersExpand Collapse
query: ReferencedataRetrieveParams { countryid }
countryid?: Array<unknown>

Optional filter on countryid, exact match on a given numeric country id (comma separated list)

ReturnsExpand Collapse
ReferencedataRetrieveResponse { ChargerTypes, CheckinStatusTypes, ConnectionTypes, 10 more }

Set of core reference data used for other API results and UI

ChargerTypes?: Array<ChargerType>
Comments: string
ID: number
IsFastChargeCapable: boolean

If true, this level is considered ‘fast’ charging, relative to other levels.

Title?: string
CheckinStatusTypes?: Array<CheckinStatusType>
ID: number
IsAutomatedCheckin: boolean

If true, checkin or comment was provided by an automated system.

IsPositive?: boolean

If true, this type of checkin/comment is considered positive.

Title?: string
ConnectionTypes?: Array<ConnectionType>
FormalName?: string

Formal (standard) name for this connection type

ID?: number
IsDiscontinued?: boolean

If true, this is an discontinued but used connection type

IsObsolete?: boolean

If true, this is an obsolete connection type and is unlikely top be present in modern infrastructure

Title?: string
Countries?: Array<Country { ContinentCode, ID, ISOCode, Title } >
ContinentCode: string

The Continentcode Schema

ID: number

The Id Schema

ISOCode: string

The Isocode Schema

Title?: string

The Title Schema

CurrentTypes?: Array<CurrentType>
ID: number
Title?: string
DataProviders?: Array<DataProvider>
ID: number

The reference ID for this Data Provider

IsRestrictedEdit: boolean

Currently not implemented. Indicates a potential editing restriction.

Comments?: string

General public comments with information about this Data Provider.

DataProviderStatusType?: DataProviderStatusType { ID, IsProviderEnabled, description }

Status object describing whether this data provider is currently enabled and the type of source (manual entry, imported etc)

ID: number

The reference ID for this provider status type

IsProviderEnabled: boolean

If false, results from this data provider are not currently enabled

description?: string

The Title of this status type

DateLastImported?: string

Date and time (UTC) the last import was performed for this data provider (if an import).

formatdate-time
IsApprovedImport?: boolean

If false, data may not be imported for this provider.

IsOpenDataLicensed?: boolean

If true, data provider uses an Open Data license

License?: string

Summary of the licensing which applies for this Data Provider. Each Data Provider has one specific license or agreement. Usage of the data requires acceptance of the given license.

Title?: string

The Title for this Data Provider

WebsiteURL?: string

Website URL for this data provider

DataTypes?: unknown
MetadataGroups?: string
Operators?: Array<Operator>
ID: number

Id

AddressInfo?: AddressInfo { CountryID, ID, Latitude, 15 more }

Geographic position for site and (nearest) address component information.

CountryID: number

The reference ID for the Country

ID: number

ID

Latitude: number

Site latitude coordinate in decimal degrees

Longitude: number

Site longitude coordinate in decimal degrees

AccessComments?: string

Guidance for users to use or find the equipment

AddressLine1?: string

First line of nearby street address

AddressLine2?: string

Second line of nearby street address

ContactEmail?: string

Primary contact email

ContactTelephone1?: string

Primary contact number

ContactTelephone2?: string

Secondary contact number

Country?: Country { ContinentCode, ID, ISOCode, Title }

Country details

ContinentCode: string

The Continentcode Schema

ID: number

The Id Schema

ISOCode: string

The Isocode Schema

Title?: string

The Title Schema

Distance?: number

Distance from search location, if search is around a point

DistanceUnit?: number

Unit used for distance, 1= Miles, 2 = KM

Postcode?: string

Postal code or Zipcode

RelatedURL?: string

Optional website for more information

StateOrProvince?: string

State or Province

Title?: string

General title for this location to aid user

Town?: string

Town or City

BookingURL?: string
Comments?: string
ContactEmail?: string
FaultReportEmail?: string

Used to send automated notification to network operator if a user submits a fault report comment/check-in

DeprecatedIsPrivateIndividual?: boolean

If true, this operator represents a private individual

IsRestrictedEdit?: boolean

If true, this network restricts community edits for OCM data

PhonePrimaryContact?: string

Primary contact number for network users

PhoneSecondaryContact?: string

Secondary contact number

Title?: string

Title

WebsiteURL?: string

Website for more information about this network

StatusTypes?: Array<StatusType>
ID: number
IsOperational: boolean
IsUserSelectable: boolean
Title?: string
SubmissionStatusTypes?: Array<SubmissionStatusType>
ID: number

Submission Status Type reference ID

IsLive: boolean

If true, POI listing is live (not draft or de-listed)

Title?: string
UsageTypes?: Array<UsageType>
ID: number
DeprecatedIsAccessKeyRequired: boolean

If true this usage required a physical access key

IsMembershipRequired: boolean

If true, this usage type requires registration or membership with a service.

IsPayAtLocation: boolean

If true, usage requires paying at location

Title?: string
UserCommentTypes?: Array<UserCommentType>
ID?: number
Title?: string

Core Reference Data

import Ocm from 'ocm-sdk';

const client = new Ocm({
  apiKey: process.env['OCM_API_KEY'], // This is the default and can be omitted
});

const referencedata = await client.referencedata.retrieve();

console.log(referencedata.DataProviders);
{
  "ChargerTypes": [
    {
      "Comments": "Over 2 kW, usually non-domestic socket type",
      "ID": 2,
      "IsFastChargeCapable": true,
      "Title": "Level 2 : Medium (Over 2kW)"
    }
  ],
  "CheckinStatusTypes": [
    {
      "ID": 0,
      "IsAutomatedCheckin": true,
      "IsPositive": true,
      "Title": "Title"
    }
  ],
  "ConnectionTypes": [
    {
      "FormalName": "IEC 62196-2 Type 2",
      "ID": 25,
      "IsDiscontinued": false,
      "IsObsolete": false,
      "Title": "Type 2 (Socket Only)"
    }
  ],
  "Countries": [
    {
      "ContinentCode": "EU",
      "ID": 1,
      "ISOCode": "GB",
      "Title": "United Kingdom"
    }
  ],
  "CurrentTypes": [
    {
      "ID": 10,
      "Title": "AC (Single-Phase)"
    }
  ],
  "DataProviders": [
    {
      "ID": 1,
      "IsRestrictedEdit": false,
      "Comments": "Comments",
      "DataProviderStatusType": {
        "ID": 0,
        "IsProviderEnabled": true,
        "description": "description"
      },
      "DateLastImported": "2020-02-04T23:09:00Z",
      "IsApprovedImport": true,
      "IsOpenDataLicensed": true,
      "License": "Licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)",
      "Title": "Open Charge Map Contributors",
      "WebsiteURL": "https://openchargemap.org"
    }
  ],
  "DataTypes": {},
  "MetadataGroups": "MetadataGroups",
  "Operators": [
    {
      "ID": 0,
      "AddressInfo": {
        "CountryID": 1,
        "ID": 148879,
        "Latitude": 52.343197,
        "Longitude": -0.170632,
        "AccessComments": "AccessComments",
        "AddressLine1": "Buttsgrove Way",
        "AddressLine2": "AddressLine2",
        "ContactEmail": "ContactEmail",
        "ContactTelephone1": "ContactTelephone1",
        "ContactTelephone2": "ContactTelephone2",
        "Country": {
          "ContinentCode": "EU",
          "ID": 1,
          "ISOCode": "GB",
          "Title": "United Kingdom"
        },
        "Distance": 0,
        "DistanceUnit": 0,
        "Postcode": "PE29 1PE",
        "RelatedURL": "RelatedURL",
        "StateOrProvince": "StateOrProvince",
        "Title": "Title",
        "Town": "Huntingdon"
      },
      "BookingURL": "BookingURL",
      "Comments": "Comments",
      "ContactEmail": "enquiries@pod-point.com",
      "FaultReportEmail": "enquiries@pod-point.com",
      "IsPrivateIndividual": false,
      "IsRestrictedEdit": true,
      "PhonePrimaryContact": "PhonePrimaryContact",
      "PhoneSecondaryContact": "PhoneSecondaryContact",
      "Title": "POD Point (UK)",
      "WebsiteURL": "http://www.pod-point.com/"
    }
  ],
  "StatusTypes": [
    {
      "ID": 50,
      "IsOperational": true,
      "IsUserSelectable": true,
      "Title": "Operational"
    }
  ],
  "SubmissionStatusTypes": [
    {
      "ID": 200,
      "IsLive": true,
      "Title": "Title"
    }
  ],
  "UsageTypes": [
    {
      "ID": 0,
      "IsAccessKeyRequired": true,
      "IsMembershipRequired": true,
      "IsPayAtLocation": true,
      "Title": "Public - Membership Required"
    }
  ],
  "UserCommentTypes": [
    {
      "ID": 0,
      "Title": "Title"
    }
  ]
}
Returns Examples
{
  "ChargerTypes": [
    {
      "Comments": "Over 2 kW, usually non-domestic socket type",
      "ID": 2,
      "IsFastChargeCapable": true,
      "Title": "Level 2 : Medium (Over 2kW)"
    }
  ],
  "CheckinStatusTypes": [
    {
      "ID": 0,
      "IsAutomatedCheckin": true,
      "IsPositive": true,
      "Title": "Title"
    }
  ],
  "ConnectionTypes": [
    {
      "FormalName": "IEC 62196-2 Type 2",
      "ID": 25,
      "IsDiscontinued": false,
      "IsObsolete": false,
      "Title": "Type 2 (Socket Only)"
    }
  ],
  "Countries": [
    {
      "ContinentCode": "EU",
      "ID": 1,
      "ISOCode": "GB",
      "Title": "United Kingdom"
    }
  ],
  "CurrentTypes": [
    {
      "ID": 10,
      "Title": "AC (Single-Phase)"
    }
  ],
  "DataProviders": [
    {
      "ID": 1,
      "IsRestrictedEdit": false,
      "Comments": "Comments",
      "DataProviderStatusType": {
        "ID": 0,
        "IsProviderEnabled": true,
        "description": "description"
      },
      "DateLastImported": "2020-02-04T23:09:00Z",
      "IsApprovedImport": true,
      "IsOpenDataLicensed": true,
      "License": "Licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)",
      "Title": "Open Charge Map Contributors",
      "WebsiteURL": "https://openchargemap.org"
    }
  ],
  "DataTypes": {},
  "MetadataGroups": "MetadataGroups",
  "Operators": [
    {
      "ID": 0,
      "AddressInfo": {
        "CountryID": 1,
        "ID": 148879,
        "Latitude": 52.343197,
        "Longitude": -0.170632,
        "AccessComments": "AccessComments",
        "AddressLine1": "Buttsgrove Way",
        "AddressLine2": "AddressLine2",
        "ContactEmail": "ContactEmail",
        "ContactTelephone1": "ContactTelephone1",
        "ContactTelephone2": "ContactTelephone2",
        "Country": {
          "ContinentCode": "EU",
          "ID": 1,
          "ISOCode": "GB",
          "Title": "United Kingdom"
        },
        "Distance": 0,
        "DistanceUnit": 0,
        "Postcode": "PE29 1PE",
        "RelatedURL": "RelatedURL",
        "StateOrProvince": "StateOrProvince",
        "Title": "Title",
        "Town": "Huntingdon"
      },
      "BookingURL": "BookingURL",
      "Comments": "Comments",
      "ContactEmail": "enquiries@pod-point.com",
      "FaultReportEmail": "enquiries@pod-point.com",
      "IsPrivateIndividual": false,
      "IsRestrictedEdit": true,
      "PhonePrimaryContact": "PhonePrimaryContact",
      "PhoneSecondaryContact": "PhoneSecondaryContact",
      "Title": "POD Point (UK)",
      "WebsiteURL": "http://www.pod-point.com/"
    }
  ],
  "StatusTypes": [
    {
      "ID": 50,
      "IsOperational": true,
      "IsUserSelectable": true,
      "Title": "Operational"
    }
  ],
  "SubmissionStatusTypes": [
    {
      "ID": 200,
      "IsLive": true,
      "Title": "Title"
    }
  ],
  "UsageTypes": [
    {
      "ID": 0,
      "IsAccessKeyRequired": true,
      "IsMembershipRequired": true,
      "IsPayAtLocation": true,
      "Title": "Public - Membership Required"
    }
  ],
  "UserCommentTypes": [
    {
      "ID": 0,
      "Title": "Title"
    }
  ]
}