{
	"openapi": "3.0.0",
	"components": {
		"examples": {},
		"headers": {},
		"parameters": {},
		"requestBodies": {},
		"responses": {},
		"schemas": {
			"ChangeRequestsAboutToDeemResponse": {
				"properties": {
					"work_reference_number": {
						"type": "string",
						"description": "Reference number of the work the change request belongs to"
					},
					"permit_reference_number": {
						"type": "string",
						"description": "Reference number of the permit the change request is against"
					},
					"change_request_reference_number": {
						"type": "string",
						"description": "Reference number of the change request"
					},
					"works_location": {
						"type": "string",
						"description": "Street name of the works"
					},
					"promoter": {
						"type": "string",
						"description": "Name of the promoter organisation"
					},
					"deem_date": {
						"type": "string",
						"format": "date-time",
						"description": "Date and time the change request is deemed if not assessed. Listed when this is on or before the end of today (UK time), until one minute after it passes"
					},
					"change_submission_date": {
						"type": "string",
						"format": "date-time",
						"description": "Date and time the change request was submitted"
					},
					"works_category": {
						"type": "string",
						"description": "Work category of the permit: minor, standard, major, immediate_urgent, immediate_emergency, paa or hs2_highway"
					},
					"work_status": {
						"type": "string",
						"description": "Status of the work: planned, in_progress, completed, cancelled, unattributable, historical, non_notifiable or section_81"
					},
					"start_date": {
						"type": "string",
						"format": "date-time",
						"description": "Start date of the permit"
					},
					"end_date": {
						"type": "string",
						"format": "date-time",
						"description": "End date of the permit"
					}
				},
				"required": [
					"work_reference_number",
					"permit_reference_number",
					"change_request_reference_number",
					"works_location",
					"promoter",
					"deem_date",
					"change_submission_date",
					"works_category",
					"work_status",
					"start_date",
					"end_date"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PermitsAboutToDeemResponse": {
				"properties": {
					"work_reference_number": {
						"type": "string",
						"description": "Reference number of the work the permit belongs to"
					},
					"permit_reference_number": {
						"type": "string",
						"description": "Reference number of the permit"
					},
					"works_location": {
						"type": "string",
						"description": "Street name of the works"
					},
					"promoter": {
						"type": "string",
						"description": "Name of the promoter organisation"
					},
					"deem_date": {
						"type": "string",
						"format": "date-time",
						"description": "Date and time the permit is deemed if not assessed. Listed only when this is today (UK time), until one minute after it passes"
					},
					"application_submission_date": {
						"type": "string",
						"format": "date-time",
						"description": "Date and time the permit application was submitted"
					},
					"works_category": {
						"type": "string",
						"description": "Work category of the permit: minor, standard, major, immediate_urgent, immediate_emergency, paa or hs2_highway"
					},
					"highest_traffic_management_type": {
						"type": "string",
						"description": "Highest traffic management type on the permit: road_closure, contra_flow, lane_closure, multi_way_signals, two_way_signals, convoy_workings, stop_go_boards, priority_working, give_and_take, some_carriageway_incursion, no_carriageway_incursion or temp_obstruction_15_minute_delay"
					},
					"start_date": {
						"type": "string",
						"format": "date-time",
						"description": "Start date of the permit"
					},
					"end_date": {
						"type": "string",
						"format": "date-time",
						"description": "End date of the permit"
					}
				},
				"required": [
					"work_reference_number",
					"permit_reference_number",
					"works_location",
					"promoter",
					"deem_date",
					"application_submission_date",
					"works_category",
					"highest_traffic_management_type",
					"start_date",
					"end_date"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RefusedPermitsResponse": {
				"properties": {
					"work_reference_number": {
						"type": "string",
						"description": "Reference number of the work the permit belongs to"
					},
					"permit_reference_number": {
						"type": "string",
						"description": "Reference number of the refused permit"
					},
					"works_location": {
						"type": "string",
						"description": "Street name of the works"
					},
					"highway_authority": {
						"type": "string",
						"description": "Name of the highway authority organisation"
					},
					"proposed_start_date": {
						"type": "string",
						"format": "date-time",
						"description": "Proposed start date and time of the works"
					},
					"proposed_end_date": {
						"type": "string",
						"format": "date-time",
						"description": "Proposed end date and time of the works"
					},
					"refused_date": {
						"type": "string",
						"format": "date-time",
						"description": "Date and time the permit was refused. Listed until the end of the 7th day after this (UK time)"
					},
					"reasons_for_refusal": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Reason for refusal codes: RC10, RC11, RC12, RC20, RC21, RC22, RC23, RC30, RC31, RC32, RC33, RC40, RC41, RC42, RC43, RC44 or RC50"
					}
				},
				"required": [
					"work_reference_number",
					"permit_reference_number",
					"works_location",
					"highway_authority",
					"proposed_start_date",
					"proposed_end_date",
					"refused_date",
					"reasons_for_refusal"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PotentialWorksOverrunningResponse": {
				"properties": {
					"work_reference_number": {
						"type": "string",
						"description": "Reference number of the work the permit belongs to"
					},
					"permit_reference_number": {
						"type": "string",
						"description": "Reference number of the permit"
					},
					"works_location": {
						"type": "string",
						"description": "Street name of the works"
					},
					"promoter": {
						"type": "string",
						"description": "Name of the promoter organisation"
					},
					"start_date": {
						"type": "string",
						"format": "date-time",
						"description": "Date and time the works actually started"
					},
					"end_date": {
						"type": "string",
						"format": "date-time",
						"description": "Proposed end date of the works"
					},
					"reasonable_period_end_date": {
						"type": "string",
						"format": "date-time",
						"description": "End of the reasonable period. Listed from the day after it passes, for up to 7 days"
					}
				},
				"required": [
					"work_reference_number",
					"permit_reference_number",
					"works_location",
					"promoter",
					"start_date",
					"end_date",
					"reasonable_period_end_date"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WorkStopsDueResponse": {
				"properties": {
					"work_reference_number": {
						"type": "string",
						"description": "Reference number of the work"
					},
					"permit_reference_number": {
						"type": "string",
						"description": "Reference number of the permit"
					},
					"works_location": {
						"type": "string",
						"description": "Street name of the works"
					},
					"highway_authority": {
						"type": "string",
						"description": "Name of the highway authority organisation"
					},
					"start_date": {
						"type": "string",
						"format": "date-time",
						"description": "Start date and time of the work"
					},
					"proposed_end_date": {
						"type": "string",
						"format": "date-time",
						"description": "Proposed end date and time of the works. Listed when this was yesterday, is today or is tomorrow (UK time), until the end of the day after it"
					},
					"reasonable_period_end_date": {
						"type": "string",
						"format": "date-time",
						"description": "End of the reasonable period set by the highway authority"
					},
					"workstream_prefix": {
						"type": "string",
						"description": "Prefix of the workstream, assigned to the requesting user, that the work belongs to"
					}
				},
				"required": [
					"work_reference_number",
					"permit_reference_number",
					"works_location",
					"highway_authority",
					"start_date",
					"proposed_end_date",
					"reasonable_period_end_date",
					"workstream_prefix"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WorkStartsDueResponse": {
				"properties": {
					"work_reference_number": {
						"type": "string",
						"description": "Reference number of the work the permit belongs to"
					},
					"permit_reference_number": {
						"type": "string",
						"description": "Reference number of the permit whose work is due to start"
					},
					"works_location": {
						"type": "string",
						"description": "Street name of the works"
					},
					"highway_authority": {
						"type": "string",
						"description": "Name of the highway authority organisation"
					},
					"proposed_start_date": {
						"type": "string",
						"format": "date-time",
						"description": "Start date and time of the works. Listed only when within the next 7 days (UK time), until the end of this day"
					},
					"proposed_end_date": {
						"type": "string",
						"format": "date-time"
					},
					"validity_period_end_date": {
						"type": "string",
						"format": "date-time",
						"description": "End of the permit validity period; the permit is no longer listed after the end of this day"
					},
					"workstream_prefix": {
						"type": "string",
						"description": "Prefix of the workstream, assigned to the requesting user, that the permit belongs to"
					}
				},
				"required": [
					"work_reference_number",
					"permit_reference_number",
					"works_location",
					"highway_authority",
					"proposed_start_date",
					"proposed_end_date",
					"validity_period_end_date",
					"workstream_prefix"
				],
				"type": "object",
				"additionalProperties": false
			}
		},
		"securitySchemes": {
			"token": {
				"type": "apiKey",
				"name": "token",
				"in": "header"
			}
		}
	},
	"info": {
		"title": "Street Manager Worklist API",
		"version": "1.0.0",
		"description": "See API specification Resource Guide > Worklist 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": {
		"/change-requests-about-to-deem": {
			"get": {
				"operationId": "GetChangeRequestsAboutToDeem",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/ChangeRequestsAboutToDeemResponse"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Returns the change requests that are due to be deemed by the end of today (UK time) if not assessed, for the requesting highway authority.\nA change request stays listed until one minute after its deem date. Change requests that are applied automatically (promoter-imposed, highway authority-imposed and modified permit changes) are never listed.\nWorks in progress are listed first, then change requests are ordered by submission date, oldest first.\n\nAccess: highway authority users only; the list is always for the user's own organisation.",
				"security": [
					{
						"token": [
							"HighwayAuthority"
						]
					}
				],
				"parameters": []
			}
		},
		"/permits-about-to-deem": {
			"get": {
				"operationId": "GetPermitsAboutToDeem",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/PermitsAboutToDeemResponse"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Returns the submitted permit applications that are due to be deemed today (UK time) if not assessed, for the requesting highway authority.\nA permit stays listed until one minute after its deem date, and is removed once it is assessed or is no longer submitted. The order of results is not guaranteed.\n\nAccess: highway authority users only; the list is always for the user's own organisation.",
				"security": [
					{
						"token": [
							"HighwayAuthority"
						]
					}
				],
				"parameters": []
			}
		},
		"/refused-permits": {
			"get": {
				"operationId": "GetRefusedPermits",
				"responses": {
					"200": {
						"description": "OK",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/RefusedPermitsResponse"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Returns the permits that were refused in the last 7 days, most recently refused first.\nA refused permit stays listed until the end of the 7th day after it was refused (UK time). Only permits in the workstreams assigned to the requesting user are returned; the list is empty if the user has none.\n\nAccess: planners and contractors only; highway authority users are rejected.\nContractors must supply the swa_code of a non-suspended, non-disabled organisation they are contracted to, and receive that organisation's list.\nThe swa_code is ignored for planners, who always receive their own organisation's list.",
				"security": [
					{
						"token": [
							"Planner",
							"Contractor"
						]
					}
				],
				"parameters": [
					{
						"in": "query",
						"name": "swa_code",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/potential-works-overrunning": {
			"get": {
				"operationId": "GetPotentialWorksOverrunning",
				"responses": {
					"200": {
						"description": "OK",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/PotentialWorksOverrunningResponse"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Returns the permits whose works have started but not stopped and whose reasonable period ended between 1 and 7 days ago, for the requesting highway authority.\nResults are ordered by reasonable period end date, earliest first. A permit that has been dismissed is not listed.\n\nAccess: highway authority users only; the list is always for the user's own organisation.",
				"security": [
					{
						"token": [
							"HighwayAuthority"
						]
					}
				],
				"parameters": []
			}
		},
		"/potential-works-overrunning/{permitReferenceNumber}": {
			"delete": {
				"operationId": "DeletePotentialWorksOverrunning",
				"responses": {
					"204": {
						"description": "No Content"
					}
				},
				"description": "Dismisses a permit from the potential works overrunning worklist of the requesting highway authority.\nThe dismissal is recorded against the permit, so it is not listed again until later activity on the permit (such as a change request, or a work start or stop being logged or reverted) resets it. Returns 204 even if the permit reference is unknown or the permit is not on the worklist.\n\nAccess: highway authority users only. The permit reference is not checked against the user's organisation.",
				"security": [
					{
						"token": [
							"HighwayAuthority"
						]
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "permitReferenceNumber",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/work-stops-due": {
			"get": {
				"operationId": "GetWorkStopsDue",
				"responses": {
					"200": {
						"description": "OK",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/WorkStopsDueResponse"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Returns the works that have started but not stopped and whose proposed end date was yesterday, is today or is tomorrow (UK time), ordered by proposed end date.\nA work stays listed until the end of the day after its proposed end date. Only works in the workstreams assigned to the requesting user are returned; the list is empty if the user has none.\n\nAccess: planners and contractors only; highway authority users are rejected.\nContractors must supply the swa_code of a non-suspended, non-disabled organisation they are contracted to, and receive that organisation's list.\nThe swa_code is ignored for planners, who always receive their own organisation's list.",
				"security": [
					{
						"token": [
							"Planner",
							"Contractor"
						]
					}
				],
				"parameters": [
					{
						"in": "query",
						"name": "swa_code",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/work-starts-due": {
			"get": {
				"operationId": "GetWorkStartsDue",
				"responses": {
					"200": {
						"description": "OK",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/WorkStartsDueResponse"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Returns the granted permits whose work has not yet started and is due to start within the next 7 days, ordered by proposed start date.\nA permit stays listed until the end of its proposed start day or the end of its validity period (UK time), whichever is earlier.\nOnly permits in the workstreams assigned to the requesting user are returned; the list is empty if the user has none.\n\nAccess: planners and contractors only; highway authority users are rejected.\nContractors must supply the swa_code of a non-suspended, non-disabled organisation they are contracted to, and receive that organisation's list.\nThe swa_code is ignored for planners, who always receive their own organisation's list.",
				"security": [
					{
						"token": [
							"Planner",
							"Contractor"
						]
					}
				],
				"parameters": [
					{
						"in": "query",
						"name": "swa_code",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		}
	},
	"servers": [
		{
			"url": "/"
		}
	]
}