API reference · v1.0.0

UK Premises Licensing API

Download OpenAPI (uk-premises-licensing.yaml) · Base URL https://api.olympus.new-odyssey.com

Licensing Act 2003 premises licences and club premises certificates from council licensing registers, in one schema: licence reference, type and status, premises name and address, licensable activities, permitted hours, grant, variation and expiry dates where printed, and the licence holder when it is an organisation. Served by the Olympus Go gateway.

As published. Each council publishes its register in its own way: an open-data file (CSV, XLSX or JSON listed in a data catalogue) or a PDF register at a stable address. Values are as printed, mapped onto one schema. status, licence_type and activities are normalised from the printed values (derived), and status_as_published, licence_type_as_published and activities_as_published keep what was printed. Nothing is inferred, and no language model is used.

Organisations, not people. This API publishes premises, not people:

  • Designated premises supervisors (always individuals), personal licences and temporary event notices are never loaded.
  • Holders' own home or correspondence addresses, phone numbers and e-mail addresses are never read.
  • A licence holder is published only when it is an organisation on firm evidence: a Companies House number printed by the council (companies_house_number), an exact match to a registered company name (companies_house_name), a legal form ending the name such as Ltd, Limited, PLC, LLP or CIC (legal_form_suffix), or a body that is never a natural person, such as a council, NHS body, university, school, trust, church or registered charity (organisational_form). Anything else, including "Mr", "t/a" forms and several named holders, is withheld: holder.name is null, holder.withheld is true and holder.withheld_reason says why.
  • Premises that appear to be private dwellings (the premises address is the holder's own address, or a flat with a withheld holder and no trading name) are excluded and counted in coverage.

Every response repeats this in meta.notices (organisations_only).

Provenance. Every licence carries field_provenance: for each field, where it was read (the file's row number and column, or the PDF page, box and printed text) and the printed text. provenance names the source, the retained file's SHA-256 and the publication. PDF rows are published only when every check passed for the document and the row was read cleanly; rows held for OCR review are counted in coverage and never served.

Coverage. Only the councils GET /v1/uk-premises-licensing/coverage lists as published. Each source's licence is listed as the council states it; only sources whose terms allow commercial reuse (the Open Government Licence or equivalent) are included. Councils are identified by their ONS GSS code, checked against the ONS names and codes lists at every load.

Pagination. GET /licences pages with a cursor (meta.pagination.next_cursor; pass it back unchanged with the same filters). A cursor is tied to the publication it was issued under.

Authenticate with an API key in X-API-Key or Authorization: Bearer. The organization's plan must include uk-premises-licensing. Every response carries X-Request-Id. Errors share the Error body.

Licences

Search premises licences

GET/v1/uk-premises-licensing/licences

Published licences ordered by council and licence reference, filtered by any combination of council, postcode, premises name, activity, status, licence type and holder company number.

Authentication: API key (X-API-Key or Bearer)

Parameters

NameInTypeDescription
councilquerystring

One or more ONS GSS codes, comma separated (at most 20).

Example: E08000035
postcodequerystring

A full postcode (LS1 4DY) or an outward code (LS1); case and spacing are ignored.

Example: LS1
qquerystring

Words that must all appear in the premises name (case-insensitive, at least 3 characters).

Example: crown
activityqueryActivity
statusqueryStatus
licence_typequeryLicenceType
holder_company_numberquerystring

Licences whose published organisation holder has this Companies House number.

Example: 00445790
limitqueryinteger
cursorquerystring

Responses

200

Matching licences.

LicencesResponse
400

Invalid parameter (VALIDATION_ERROR; details.fields maps each parameter to the reason).

Error
401

Missing or invalid API key (UNAUTHORIZED), or a disabled, expired or revoked one (API_KEY_DISABLED, API_KEY_EXPIRED, API_KEY_REVOKED).

Error
403

Organization suspended (ORGANIZATION_SUSPENDED), no live subscription (NO_ACTIVE_SUBSCRIPTION), uk-premises-licensing not on the plan (PRODUCT_NOT_ENABLED) or a key scoped to another product (API_KEY_PRODUCT_SCOPE).

Error
429

Per-minute rate limit exceeded (RATE_LIMIT_EXCEEDED) or monthly quota exhausted (QUOTA_EXCEEDED).

Error
503

The dataset has no active publication yet (SERVICE_UNAVAILABLE, details.dataset_id).

Error
curl
curl -s "https://api.olympus.new-odyssey.com/v1/uk-premises-licensing/licences" \
  -H "X-API-Key: $OLYMPUS_API_KEY"

One licence with the provenance of every field

GET/v1/uk-premises-licensing/licences/{licence_id}

The licence, field_provenance (for each field: row and column, or page and box, and the printed text) and, when the holder is a published organisation with a Companies House number, the shared entity_id / identifiers / related blocks of that company.

Authentication: API key (X-API-Key or Bearer)

Parameters

NameInTypeDescription
licence_idrequiredpathstring

licence_id as the API returns it (uk_premises:<source_id>:<hash>).

Example: uk_premises:leeds.premises_licences:4b1d0d1f0c6e2a9f8e7d6c5b

Responses

200

The licence.

LicenceResponse
400

Invalid parameter (VALIDATION_ERROR; details.fields maps each parameter to the reason).

Error
401

Missing or invalid API key (UNAUTHORIZED), or a disabled, expired or revoked one (API_KEY_DISABLED, API_KEY_EXPIRED, API_KEY_REVOKED).

Error
403

Organization suspended (ORGANIZATION_SUSPENDED), no live subscription (NO_ACTIVE_SUBSCRIPTION), uk-premises-licensing not on the plan (PRODUCT_NOT_ENABLED) or a key scoped to another product (API_KEY_PRODUCT_SCOPE).

Error
404

No published licence or council with this id (NOT_FOUND).

Error
429

Per-minute rate limit exceeded (RATE_LIMIT_EXCEEDED) or monthly quota exhausted (QUOTA_EXCEEDED).

Error
503

The dataset has no active publication yet (SERVICE_UNAVAILABLE, details.dataset_id).

Error
curl
curl -s "https://api.olympus.new-odyssey.com/v1/uk-premises-licensing/licences/uk_premises:leeds.premises_licences:4b1d0d1f0c6e2a9f8e7d6c5b" \
  -H "X-API-Key: $OLYMPUS_API_KEY"

Councils

One council's published premises licences

GET/v1/uk-premises-licensing/councils/{code}

The council's sources (as in coverage), licence counts by status and activity, and the shared entity_id / identifiers / related blocks of its area (ONS GSS code).

Authentication: API key (X-API-Key or Bearer)

Parameters

NameInTypeDescription
coderequiredpathstring

ONS GSS code of the council area.

Example: E08000035

Responses

200

The council.

CouncilResponse
400

Invalid parameter (VALIDATION_ERROR; details.fields maps each parameter to the reason).

Error
401

Missing or invalid API key (UNAUTHORIZED), or a disabled, expired or revoked one (API_KEY_DISABLED, API_KEY_EXPIRED, API_KEY_REVOKED).

Error
403

Organization suspended (ORGANIZATION_SUSPENDED), no live subscription (NO_ACTIVE_SUBSCRIPTION), uk-premises-licensing not on the plan (PRODUCT_NOT_ENABLED) or a key scoped to another product (API_KEY_PRODUCT_SCOPE).

Error
404

No published licence or council with this id (NOT_FOUND).

Error
429

Per-minute rate limit exceeded (RATE_LIMIT_EXCEEDED) or monthly quota exhausted (QUOTA_EXCEEDED).

Error
503

The dataset has no active publication yet (SERVICE_UNAVAILABLE, details.dataset_id).

Error
curl
curl -s "https://api.olympus.new-odyssey.com/v1/uk-premises-licensing/councils/E08000035" \
  -H "X-API-Key: $OLYMPUS_API_KEY"

Coverage

What is served, from which councils, under which terms

GET/v1/uk-premises-licensing/coverage

Every configured source: published with its council, licence as stated, data version, counts of licences, holders published and withheld (by reason), premises excluded (by reason) and rows held for review, or not_loaded. Answers 200 before anything is published.

Authentication: API key (X-API-Key or Bearer)

Responses

200

Coverage.

CoverageResponse
401

Missing or invalid API key (UNAUTHORIZED), or a disabled, expired or revoked one (API_KEY_DISABLED, API_KEY_EXPIRED, API_KEY_REVOKED).

Error
403

Organization suspended (ORGANIZATION_SUSPENDED), no live subscription (NO_ACTIVE_SUBSCRIPTION), uk-premises-licensing not on the plan (PRODUCT_NOT_ENABLED) or a key scoped to another product (API_KEY_PRODUCT_SCOPE).

Error
429

Per-minute rate limit exceeded (RATE_LIMIT_EXCEEDED) or monthly quota exhausted (QUOTA_EXCEEDED).

Error
curl
curl -s "https://api.olympus.new-odyssey.com/v1/uk-premises-licensing/coverage" \
  -H "X-API-Key: $OLYMPUS_API_KEY"

Schemas

Error object

The error body shared by every Olympus service.

FieldTypeDescription
error *string

Human-readable message.

code *string

Stable machine-readable code.

productstring

Product that produced the error, when applicable.

detailsobject

GSSCode string

ONS GSS code of the council area (OLY-GB-GSS).

Date string (date)

As printed (parsed with the source's own date format only; never guessed).

Status enum: current | suspended | revoked | surrendered | lapsed | expired | pending | other

Normalised from status_as_published (derived); other when the printed status maps to none.

currentsuspendedrevokedsurrenderedlapsedexpiredpendingother

Activity enum: sale_of_alcohol | late_night_refreshment | plays | films | indoor_sport | boxing_or_wrestling | live_music | recorded_music | performance_of_dance | similar_entertainment

Licensable activities of the Licensing Act 2003, Schedule 1 (derived from the printed activities).

sale_of_alcohollate_night_refreshmentplaysfilmsindoor_sportboxing_or_wrestlinglive_musicrecorded_musicperformance_of_dancesimilar_entertainment

LicenceType enum: premises_licence | club_premises_certificate

premises_licenceclub_premises_certificate

WithheldReason enum: no_organisation_evidence | personal_title | trading_as | multiple_holders | declared_individual

Why the holder is withheld: no firm evidence that it is an organisation; a personal title (Mr, Mrs, Ms, Dr, ...); a "trading as" form, which names a person; or several holders of which one is not shown to be an organisation; or the council itself records the holder as an individual or partnership (declared_individual).

no_organisation_evidencepersonal_titletrading_asmultiple_holdersdeclared_individual

HolderEvidence enum: companies_house_number | companies_house_name | legal_form_suffix | organisational_form

Why the holder is published as an organisation.

companies_house_numbercompanies_house_namelegal_form_suffixorganisational_form

Provenance object

Where this record came from and which publication introduced this version of it.

FieldTypeDescription
dataset_id *enum: uk_premises.licences
source_id *string
source_url *string (uri)

The file or PDF document the record was read from.

source_version *string

The retained file's SHA-256 (or the dataset version the catalogue states).

source_date *string (date) | null
published_at *string (date-time)

When this version of the record was first published. Unchanged records keep their original time.

schema_version *string
validation_status *enum: passed | passed_with_warnings
record_id *string

DatasetPublication object

FieldTypeDescription
dataset_id *string
publication_id *integer (int64)
published_at *string (date-time)
freshness *enum: fresh | stale

Notice object

FieldTypeDescription
code *enum: as_published | organisations_only | not_published | derived_values
message *string

Pagination object

FieldTypeDescription
limit *integer
has_more *boolean
next_cursor *string | null

Meta object

FieldTypeDescription
request_idstring
datasets *DatasetPublication []
notices *Notice []
paginationPagination

CouncilRef object

FieldTypeDescription
code *GSSCode
name *string

The ONS name of the council area.

Premises object

FieldTypeDescription
name *string | null

Premises or trading name as printed.

address *string | null

Premises address as printed (never the holder's address).

postcode *string | null

Normalised (upper case, one space): LS1 6HD.

uprn *string | null

Unique Property Reference Number

Holder object

The licence holder. status is published (an organisation: name, evidence and, when printed, company_number), withheld (name null, withheld_reason set) or not_in_source (the source prints no holder).

FieldTypeDescription
status *enum: published | withheld | not_in_source
name *string | null
withheld *boolean
withheld_reason *WithheldReason | null
evidence *HolderEvidence | null
company_number *string | null

Companies House number (GB-COH), only when the council prints it.

Licence object

FieldTypeDescription
licence_id *string
council *CouncilRef
source_kind *enum: file | pdf
licence_ref *string

The council's licence reference as printed.

licence_type *LicenceType
licence_type_as_published *string | null
status *Status | null
status_as_published *string | null
premises *Premises
activities *Activity []

Normalised licensable activities (derived from activities_as_published).

activities_as_published *string | null
permitted_hours *string | null

Hours for licensable activities as printed.

opening_hours *string | null

Opening hours as printed.

granted_date *Date
variation_date *Date
expiry_date *Date
conditions_summary *string | null

Only when the council publishes it as a field.

holder *Holder
provenance *Provenance

LicencesResponse object

FieldTypeDescription
data *Licence []
meta *Meta

LicenceDetail object

FieldTypeDescription
licence *Licence
field_provenance *object

Field -> where it was read (row number and column, or PDF page and box) and the printed text.

entity_id *string | null

The holder company's entity

identifiers *Identifier []
related *RelatedLink []

LicenceResponse object

FieldTypeDescription
data *LicenceDetail
meta *Meta

SourceCoverage object

FieldTypeDescription
source_id *string
council *CouncilRef
kind *enum: file | pdf
title *string
publisher *string
status *enum: published | not_loaded
licence *string | null

As the council states it.

terms_url *string | null
commercial_reuse *enum: permitted | attribution
attribution *string | null

Credit line the licence asks for.

dataset_url *string | null
route *string | null

The documented route the file was found through.

data_version *string | null
documents *array of object

Files retained (url, sha256, rows read; for PDFs rows ok / review / invalid).

rows_read *integer
licences *integer
holders_published *integer
holders_withheld *integer
holders_not_in_source *integer
holders_withheld_by_reason *object
excluded *object

Reason -> rows not published: temporary_event_notice, personal_licence, other_licence_type, private_dwelling_holder_address, private_dwelling_flat, premises_named_as_holder, no_licence_ref, not_current (where the source marks a row as not a live licence and the source register says to keep live licences only).

rows_held_for_review *integer
rows_invalid *integer
published_at *string (date-time) | null

CoverageResponse object

FieldTypeDescription
data *object
meta *Meta

Count object

FieldTypeDescription
value *string | null
licences *integer

CouncilDetail object

FieldTypeDescription
council *CouncilRef
sources *SourceCoverage []
licences *integer
by_status *Count []
by_activity *Count []
entity_id *string | null
identifiers *Identifier []
related *RelatedLink []

CouncilResponse object

FieldTypeDescription
data *CouncilDetail
meta *Meta

Identifier object

One identifier of an entity, with how and where it was linked.

FieldTypeDescription
scheme *string

Scheme code (org-id.guide prefix, or an Olympus OLY- scheme).

value *string

Normalised value.

method *enum: published | exact | derived

published: the source publishes this identifier for the record. exact: the same normalised value in another dataset. derived: computed from published values.

confidence *number

1 for published and exact links.

source *IdentifierSource

IdentifierSource object

Provenance of the link.

FieldTypeDescription
dataset_id *string

Registry dataset that published the link.

source_id *string
source_url *string
source_version *string
source_date *string (date) | null
published_at *string (date-time)

RelatedVia object

The identifier the link goes through.

FieldTypeDescription
scheme *string
value *string

* required field