# Identifier types

{% hint style="warning" %}

### API test authentication

The Open API block allows you to test OS APIs directly from the page with example data and parameters. To use this feature, you will need to add your API Key or OAuth2 token to the authentication field.

For help generating an API Key or OAuth2 token, please see the [Getting started with an API project](https://docs.os.uk/os-apis/core-concepts/getting-started-with-an-api-project) or [OAuth2 documentation](https://docs.os.uk/os-apis/accessing-os-apis/oauth-2-api).
{% endhint %}

## Queries ID when input identifierType is known

> Returns associated Linked Identifiers, when the input identifier type is known. Returns an object.<br>

```json
{"openapi":"3.0.0","info":{"title":"OS Linked Identifiers API","version":"1.0.0"},"tags":[{"name":"OS OpenData Users","description":"Operations available to customers using the OpenData plan"}],"servers":[{"description":"OS Linked Identifiers API on OS Data Hub","url":"${lids.api.server}/search/links/v1"}],"security":[{"ApiKeyAuth":[]},{"OAuth2":["read"]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"query","name":"key"},"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.os.uk/oauth2/token/v1","scopes":{"read":"Grants read access"}}}}},"parameters":{"featureIdentifier":{"name":"id","in":"path","description":"ID of the feature that is being matched","required":true,"schema":{"type":"string","minLength":1,"maxLength":36}}},"schemas":{"linkedIdentifier":{"type":"object","required":["linkedIdentifier","correlations"],"additionalProperties":false,"properties":{"linkedIdentifier":{"title":"linkedIdentifier","type":"object","required":["identifier","featureType","identifierType"],"additionalProperties":false,"properties":{"identifier":{"type":"string"},"featureType":{"$ref":"#/components/schemas/featureType"},"identifierType":{"$ref":"#/components/schemas/identifierType"}}},"correlations":{"type":"array","title":"correlations","items":{"type":"object","required":["correlationMethodIdentifier","correlatedFeatureType","correlatedIdentifierType","correlatedIdentifiers"],"additionalProperties":false,"properties":{"searchedIdentifierVersionDate":{"type":"string"},"searchedIdentifierVersionNumber":{"type":"number"},"correlationMethodIdentifier":{"$ref":"#/components/schemas/correlationMethodIdentifier"},"correlatedFeatureType":{"$ref":"#/components/schemas/featureType"},"correlatedIdentifierType":{"$ref":"#/components/schemas/identifierType"},"correlatedIdentifiers":{"type":"array","required":["identifier","confidence","correlationIdentifier"],"additionalProperties":false,"items":{"type":"object","properties":{"identifier":{"type":"string"},"versionNumber":{"type":"number"},"versionDate":{"type":"string"},"confidence":{"type":"string"},"correlationIdentifier":{"type":"string"}}}}}}}}},"featureType":{"type":"string","enum":["BLPU","ORRoadNode","ORRoadLink","Road","RoadLink","Street","TopographicArea"]},"identifierType":{"type":"string","enum":["GUID","TOID","UPRN","USRN"]},"correlationMethodIdentifier":{"type":"string","enum":["RoadLink_TOID_TopographicArea_TOID_2","Road_TOID_TopographicArea_TOID_3","Street_USRN_TopographicArea_TOID_4","BLPU_UPRN_TopographicArea_TOID_5","RoadLink_TOID_Road_TOID_7","RoadLink_TOID_Street_USRN_8","BLPU_UPRN_RoadLink_TOID_9","Road_TOID_Street_USRN_10","BLPU_UPRN_Street_USRN_11","ORRoadLink_GUID_RoadLink_TOID_12","ORRoadNode_GUID_RoadLink_TOID_13"]}},"responses":{"BadRequest":{"description":"E.g. missing query parameter, malformed syntax."},"Unauthorized":{"description":"The client has not provided authentication or incorrect authentication."},"Forbidden":{"description":"The client has authenticated its access but does not have sufficient rights to complete the request."},"NotFound":{"description":"The server has not found anything matching the Request-URI."},"MethodNotAllowed":{"description":"Request used an unsupported HTTP method, e.g. DELETE or PUT."},"TooManyRequests":{"description":"Exceeded the number of requests per minute (rate-limit)."},"InternalServerError":{"description":"Generic internal server error."},"ServiceUnavailable":{"description":"Temporary outage due to overloading or maintenance."}}},"paths":{"/identifierTypes/{identifierType}/{id}":{"get":{"tags":["OS OpenData Users"],"summary":"Queries ID when input identifierType is known","description":"Returns associated Linked Identifiers, when the input identifier type is known. Returns an object.\n","parameters":[{"$ref":"#/components/parameters/featureIdentifier"},{"name":"identifierType","in":"path","description":"Identifier type of ID being queried","explode":true,"required":true,"schema":{"type":"string","enum":["GUID","TOID","UPRN","USRN"]}}],"responses":{"200":{"description":"Search results matching criteria","content":{"application/json":{"schema":{"$ref":"#/components/schemas/linkedIdentifier"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}}}}
```
