{
	"openapi": "3.0.0",
	"components": {
		"examples": {},
		"headers": {},
		"parameters": {},
		"requestBodies": {},
		"responses": {},
		"schemas": {
			"ReinstatementTypeCodeResponse": {
				"enum": [
					1,
					2,
					3,
					4,
					5,
					6,
					7,
					8,
					9,
					10,
					999
				],
				"type": "number"
			},
			"ReinstatementTypeDetails": {
				"properties": {
					"reinstatement_type_code": {
						"$ref": "#/components/schemas/ReinstatementTypeCodeResponse"
					},
					"reinstatement_type_code_string": {
						"type": "string"
					},
					"reinstatement_type_location_text": {
						"type": "string",
						"nullable": true
					},
					"is_active": {
						"type": "boolean"
					}
				},
				"required": [
					"reinstatement_type_code",
					"reinstatement_type_code_string",
					"is_active"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PrimaryNoticeAuthority": {
				"properties": {
					"swa_code": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"location_description": {
						"type": "string"
					},
					"record_end_date": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"swa_code",
					"name",
					"location_description"
				],
				"type": "object",
				"additionalProperties": false
			},
			"InterestAuthority": {
				"properties": {
					"name": {
						"type": "string"
					},
					"location_description": {
						"type": "string"
					},
					"swa_code": {
						"type": "string"
					},
					"record_end_date": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"name",
					"location_description",
					"swa_code"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AdditionalSpecialDesignationCodeResponse": {
				"enum": [
					1,
					2,
					3,
					6,
					8,
					9,
					10,
					12,
					13,
					16,
					17,
					18,
					19,
					20,
					21,
					22,
					23,
					24,
					25,
					26,
					27,
					28,
					29,
					30,
					999
				],
				"type": "number"
			},
			"AdditionalSpecialDesignationsPeriodicityCodeResponse": {
				"enum": [
					1,
					2,
					3,
					7,
					8,
					9,
					10,
					11,
					12,
					13,
					14,
					15,
					16,
					999
				],
				"type": "number"
			},
			"GeoJSONFeatureTypeResponse": {
				"enum": [
					"Point",
					"LineString",
					"Polygon",
					"MultiLineString",
					"upcoming_enum"
				],
				"type": "string"
			},
			"GeoJSONGeometry": {
				"properties": {
					"type": {
						"$ref": "#/components/schemas/GeoJSONFeatureTypeResponse"
					},
					"type_string": {
						"type": "string"
					},
					"coordinates": {}
				},
				"required": [
					"type",
					"type_string",
					"coordinates"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AdditionalSpecialDesignationsResponse": {
				"properties": {
					"street_special_desig_code": {
						"$ref": "#/components/schemas/AdditionalSpecialDesignationCodeResponse"
					},
					"street_special_desig_code_string": {
						"type": "string",
						"nullable": true
					},
					"special_desig_location_text": {
						"type": "string",
						"nullable": true
					},
					"special_desig_description": {
						"type": "string",
						"nullable": true
					},
					"special_desig_start_time": {
						"type": "number",
						"format": "double",
						"nullable": true
					},
					"special_desig_end_time": {
						"type": "number",
						"format": "double",
						"nullable": true
					},
					"special_desig_periodicity_code": {
						"allOf": [
							{
								"$ref": "#/components/schemas/AdditionalSpecialDesignationsPeriodicityCodeResponse"
							}
						],
						"nullable": true
					},
					"special_desig_periodicity_code_string": {
						"type": "string",
						"nullable": true
					},
					"asd_coordinate_geometry": {
						"allOf": [
							{
								"$ref": "#/components/schemas/GeoJSONGeometry"
							}
						],
						"nullable": true
					},
					"whole_road": {
						"type": "boolean",
						"nullable": true
					},
					"special_desig_start_date": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"special_desig_end_date": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					}
				},
				"required": [
					"street_special_desig_code"
				],
				"type": "object",
				"additionalProperties": false
			},
			"GeoJSONMultiLineStringType": {
				"enum": [
					"MultiLineString"
				],
				"type": "string"
			},
			"GeoJSONMultiLineString": {
				"properties": {
					"type": {
						"$ref": "#/components/schemas/GeoJSONMultiLineStringType"
					},
					"coordinates": {
						"items": {
							"items": {
								"items": {
									"type": "number",
									"format": "double"
								},
								"type": "array"
							},
							"type": "array"
						},
						"type": "array"
					}
				},
				"required": [
					"type",
					"coordinates"
				],
				"type": "object",
				"additionalProperties": false
			},
			"GeoJSONCentrePointType": {
				"enum": [
					"Point"
				],
				"type": "string"
			},
			"GeoJSONCentrePoint": {
				"properties": {
					"type": {
						"$ref": "#/components/schemas/GeoJSONCentrePointType"
					},
					"coordinates": {
						"items": {
							"type": "number",
							"format": "double"
						},
						"type": "array"
					}
				},
				"required": [
					"type",
					"coordinates"
				],
				"type": "object",
				"additionalProperties": false
			},
			"StreetResponse": {
				"properties": {
					"usrn": {
						"type": "number",
						"format": "double"
					},
					"street_descriptor": {
						"type": "string"
					},
					"area": {
						"type": "string"
					},
					"town": {
						"type": "string"
					},
					"authority": {
						"type": "string"
					},
					"authority_swa_code": {
						"type": "string"
					},
					"road_category": {
						"type": "number",
						"format": "double",
						"description": "DEPRECATED"
					},
					"reinstatement_types": {
						"items": {
							"$ref": "#/components/schemas/ReinstatementTypeDetails"
						},
						"type": "array"
					},
					"traffic_sensitive": {
						"type": "boolean"
					},
					"primary_notice_authorities": {
						"items": {
							"$ref": "#/components/schemas/PrimaryNoticeAuthority"
						},
						"type": "array"
					},
					"interest_authorities": {
						"items": {
							"$ref": "#/components/schemas/InterestAuthority"
						},
						"type": "array"
					},
					"additional_special_designations_response": {
						"items": {
							"$ref": "#/components/schemas/AdditionalSpecialDesignationsResponse"
						},
						"type": "array"
					},
					"street_line": {
						"allOf": [
							{
								"$ref": "#/components/schemas/GeoJSONMultiLineString"
							}
						],
						"nullable": true
					},
					"street_centre_point": {
						"allOf": [
							{
								"$ref": "#/components/schemas/GeoJSONCentrePoint"
							}
						],
						"nullable": true
					}
				},
				"required": [
					"usrn",
					"street_descriptor",
					"area",
					"town",
					"authority",
					"authority_swa_code",
					"road_category",
					"reinstatement_types",
					"traffic_sensitive",
					"primary_notice_authorities",
					"interest_authorities",
					"additional_special_designations_response"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Coordinates": {
				"properties": {
					"easting": {
						"type": "number",
						"format": "double"
					},
					"northing": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"easting",
					"northing"
				],
				"type": "object",
				"additionalProperties": false
			},
			"StreetsRequest": {
				"properties": {
					"coordinates": {
						"items": {
							"$ref": "#/components/schemas/Coordinates"
						},
						"type": "array",
						"description": "Minimum size of 1\nMaximum size of 10\nEach element must be unique"
					}
				},
				"required": [
					"coordinates"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UsrnStreetRequest": {
				"properties": {
					"usrns": {
						"items": {
							"type": "number",
							"format": "double"
						},
						"type": "array",
						"description": "Minimum size of 1\nMaximum size of 25\nEach element must be a minimum value of 100001 and a maximum value of 99999999\nEach element must be unique\nEach element must be a whole number"
					}
				},
				"required": [
					"usrns"
				],
				"type": "object",
				"additionalProperties": false
			},
			"StreetSummaryResponse": {
				"properties": {
					"street_descriptor": {
						"type": "string"
					},
					"area": {
						"type": "string"
					},
					"town": {
						"type": "string"
					},
					"usrn": {
						"type": "number",
						"format": "double"
					},
					"administrative_area": {
						"type": "string"
					},
					"street_centre_point": {
						"$ref": "#/components/schemas/GeoJSONCentrePoint"
					}
				},
				"required": [
					"street_descriptor",
					"area",
					"town",
					"usrn",
					"administrative_area",
					"street_centre_point"
				],
				"type": "object",
				"additionalProperties": false
			}
		},
		"securitySchemes": {
			"token": {
				"type": "apiKey",
				"name": "token",
				"in": "header"
			}
		}
	},
	"info": {
		"title": "Street Manager Street Lookup API",
		"version": "1.0.0",
		"description": "See API specification Resource Guide > Street Lookup API for more information on endpoints\nNOTE: Swagger Editor/UI does not display all description text for enumerations and child elements, check swagger.json for full description text",
		"license": {
			"name": "MIT"
		},
		"contact": {}
	},
	"paths": {
		"/nsg/streets/search": {
			"post": {
				"operationId": "GetStreets",
				"responses": {
					"200": {
						"description": "NSG Street data",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/StreetResponse"
									},
									"type": "array"
								}
							}
						}
					},
					"404": {
						"description": "Not Found"
					}
				},
				"description": "See API specification Resource Guide > Street Lookup API > Get streets endpoint for more information\nAuthenticated user must have one of the following roles: Planner, Contractor, HighwayAuthority",
				"security": [
					{
						"token": [
							"Planner",
							"HighwayAuthority",
							"Contractor"
						]
					}
				],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/StreetsRequest"
							}
						}
					}
				}
			}
		},
		"/nsg/streets/{usrn}": {
			"get": {
				"operationId": "GetStreetsByUsrn",
				"responses": {
					"200": {
						"description": "NSG Street data",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/StreetResponse"
								}
							}
						}
					},
					"404": {
						"description": "Not Found"
					}
				},
				"description": "See API specification Resource Guide > Street Lookup API > Get streets endpoint for more information\nAuthenticated user must have one of the following roles: Planner, Contractor, HighwayAuthority",
				"security": [
					{
						"token": [
							"Planner",
							"HighwayAuthority",
							"Contractor"
						]
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "usrn",
						"required": true,
						"schema": {
							"format": "double",
							"type": "number"
						}
					}
				]
			}
		},
		"/nsg/search": {
			"get": {
				"operationId": "GetStreetsByQuery",
				"responses": {
					"200": {
						"description": "",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/StreetSummaryResponse"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "See API specification Resource Guide > Street Lookup API > Get nsg search endpoint for more information\nAuthenticated user must have one of the following roles: Planner, Contractor, HighwayAuthority",
				"security": [
					{
						"token": [
							"Planner",
							"HighwayAuthority",
							"Contractor"
						]
					}
				],
				"parameters": [
					{
						"in": "query",
						"name": "query",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		}
	},
	"servers": [
		{
			"url": "/"
		}
	]
}