> ## Documentation Index > Fetch the complete documentation index at: https://support.keypro.fi/llms.txt > Use this file to discover all available pages before exploring further. # Partially update traffic signal > Updates traffic signal fields. When heads is omitted, existing signal heads are preserved. When heads is supplied, entries with an id update existing heads, entries without an id create new heads, and existing heads omitted from the request are deleted. order_no values must be unique per traffic signal. warranty_exp_date is read-only. ## OpenAPI ````json PATCH /el_traffic_signals/{id}/ { "openapi": "3.0.4", "info": { "title": "KeyLight REST API", "termsOfService": "https://www.keypro.fi/en/terms-of-service", "contact": { "name": "Keypro Oy", "url": "https://keypro.fi/", "email": "keypro@keypro.fi" }, "license": { "name": "Copyright (C) Keypro Oy. All rights reserved.", "url": "https://www.keypro.fi/" }, "version": "2.0.0" }, "servers": [ { "url": "/api/v2" } ], "tags": [ { "name": "Plan", "description": "Plan related operations." }, { "name": "FreeArea", "description": "FreeArea related operations." }, { "name": "FreeLine", "description": "FreeLine related operations." }, { "name": "FreeText", "description": "FreeText related operations." }, { "name": "FreeTextComponent", "description": "FreeText component related operations." }, { "name": "Address", "description": "Building address related operations." }, { "name": "Apartment", "description": "Building apartments related operations." }, { "name": "Extra Attribute", "description": "Extra attributes related operations." }, { "name": "Extra Value", "description": "Extra attribute values related operations." }, { "name": "EAV Enum", "description": "EAV Enum value related operations." }, { "name": "EAV Enum Group", "description": "EAV Enum group related operations." }, { "name": "External Document", "description": "External documents related operations." }, { "name": "Attached Document", "description": "Attached Documents related operations." }, { "name": "Collections", "description": "Collection related operations." }, { "name": "Source system apartment", "description": "External source system derived apartment related operations." }, { "name": "Source system address", "description": "External source system derived address related operations." }, { "name": "Address alias", "description": "Address aliases related operations" }, { "name": "TxtConstant", "description": "TxtConstants related operations." }, { "name": "Point", "description": "Point objects related operations." }, { "name": "Survey Constant", "description": "Survey Constants related operations." }, { "name": "Survey Point", "description": "Survey Points related operations." }, { "name": "Survey Line String", "description": "Survey Line Strings related operations." }, { "name": "Template Catalog", "description": "Template Catalog related operations." }, { "name": "Route Following", "description": "Route following related operations." }, { "name": "Contact Person", "description": "Contact person related operations." }, { "name": "Contact Person Connection", "description": "Contact person connection related operations." }, { "name": "Electric Premises", "description": "Electric Premises related operations." }, { "name": "Electric Fuse", "description": "Fuse related operations." }, { "name": "Electric Splice", "description": "Electric Splice related operations." }, { "name": "Electric Manhole", "description": "Electric Manhole related operations." }, { "name": "Electric Point Object", "description": "Other electric point objects related operations." }, { "name": "Electric Pole", "description": "Electric Pole related operations." }, { "name": "Streetlight", "description": "Streetlight related operations." }, { "name": "Traffic Signal", "description": "Traffic signal related operations." }, { "name": "Electric Cable", "description": "Electric Cable related operations." }, { "name": "Electric Cable Connection", "description": "Operations related to connecting Electric Cables and Electric endpoints(Streetlights, Splices, Premises)." }, { "name": "Electric Conduit", "description": "Electric Conduit related operations." }, { "name": "Electric Conduit Link", "description": "Operations related to putting Electric Cables and Ducts into Conduits." }, { "name": "Electric Conduit Connection", "description": "Operations related to connecting Conduits and endpoints(Streetlights, Splices, Premises)." }, { "name": "Electric Duct", "description": "Electric Duct related operations." }, { "name": "Electric Duct Link", "description": "Operations related to putting Electric Cables into Ducts." }, { "name": "Electric Routefollower", "description": "Electric Routefollower related operations." }, { "name": "Task", "description": "Task related operations." }, { "name": "Subregion", "description": "Subregion related operations." }, { "name": "SAttribute", "description": "SAttribute related operations." }, { "name": "Fault", "description": "Fault related operations." }, { "name": "Maintenance history", "description": "Maintenance history related operations." }, { "name": "Deflection", "description": "Deflection related operations." }, { "name": "Fault Component", "description": "Fault Component related operations." }, { "name": "Task Comment", "description": "Task comment related operations." }, { "name": "FaultComponentFault", "description": "FaultComponentFault related operations." } ], "paths": { "/el_traffic_signals/{id}/": { "patch": { "tags": [ "Traffic Signal" ], "summary": "Partially update traffic signal", "description": "Updates traffic signal fields. When heads is omitted, existing signal heads\nare preserved. When heads is supplied, entries with an id update existing\nheads, entries without an id create new heads, and existing heads omitted\nfrom the request are deleted. order_no values must be unique per traffic\nsignal. warranty_exp_date is read-only.\n", "operationId": "patchElTrafficSignal", "parameters": [ { "name": "id", "in": "path", "description": "Traffic signal ID.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "description": "Traffic signal attributes to update.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FlatElTrafficSignal" } } }, "required": true, "x-bodyName": "traffic_signal" }, "responses": { "200": { "description": "Updated traffic signal.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FlatElTrafficSignal" } } } }, "400": { "$ref": "#/components/responses/Http400" }, "401": { "$ref": "#/components/responses/Http401" }, "403": { "$ref": "#/components/responses/Http403" }, "404": { "$ref": "#/components/responses/Http404" } }, "security": [ { "Token": [] } ] } } }, "components": { "schemas": { "FlatElTrafficSignal": { "type": "object", "properties": { "additional_information": { "type": "string" }, "angle": { "type": "number", "format": "float" }, "color": { "type": "integer", "description": "ID of a TS_COLOR constant." }, "contractor": { "type": "integer", "description": "ID of a TS_CONTRACTOR constant." }, "creation_date": { "type": "string", "format": "date-time", "readOnly": true }, "creator": { "type": "string", "readOnly": true }, "group_cleaning_date": { "type": "string", "format": "date" }, "heads": { "type": "array", "items": { "$ref": "#/components/schemas/FlatElTrafficSignalHead" }, "description": "Signal heads. Supplying this field replaces the signal's current heads." }, "height_accuracy": { "type": "integer", "description": "Height accuracy constant ID." }, "id": { "type": "integer", "description": "Traffic signal ID.", "readOnly": true }, "identification": { "type": "string" }, "ik_class": { "type": "integer", "description": "ID of a TS_IK_CLASS constant." }, "install_date": { "type": "string", "format": "date" }, "install_height": { "type": "number", "format": "float" }, "installation_type": { "type": "integer", "description": "ID of a TS_INSTALLATION_TYPE constant." }, "ip_class": { "type": "integer", "description": "ID of a TS_IP_CLASS constant." }, "latest_warranty_fix_date": { "type": "string", "format": "date" }, "location": { "type": "string", "format": "ewkt" }, "location_accuracy": { "type": "integer", "description": "Location accuracy constant ID." }, "manufacturer": { "type": "integer", "description": "ID of a TS_MANUFACTURER constant." }, "mapper": { "type": "string" }, "mapping_date": { "type": "string", "format": "date" }, "mapping_method": { "type": "integer", "description": "Mapping method constant ID." }, "model": { "type": "integer", "description": "ID of a TS_MODEL constant." }, "network_area": { "type": "integer", "description": "Electric division ID." }, "owner": { "type": "integer", "description": "ID of a TS_OWNER constant." }, "plan": { "type": "integer", "description": "Plan ID." }, "pole": { "type": "integer", "description": "Electric pole ID." }, "protection": { "type": "integer", "description": "ID of a TS_PROTECTION constant." }, "remarks": { "type": "string" }, "scale": { "type": "number", "format": "float" }, "signal_type": { "type": "integer", "description": "ID of a TS_SIGNAL_TYPE constant." }, "supply_cable": { "type": "integer", "description": "ID of a TS_SUPPLY_CABLE constant." }, "survey_amount": { "type": "string" }, "update_date": { "type": "string", "format": "date-time", "readOnly": true }, "updated_by": { "type": "string", "readOnly": true }, "usage_state": { "type": "integer", "description": "ID of a TS_STATE constant." }, "warranty_exp_date": { "type": "string", "description": "Computed from install_date and warranty_period.", "format": "date", "readOnly": true }, "warranty_fix_type": { "type": "integer", "description": "ID of a TS_WARRANTY_FIX_TYPE constant." }, "warranty_period": { "type": "integer", "description": "Warranty period in months." } } }, "FlatElTrafficSignalHead": { "required": [ "order_no" ], "type": "object", "properties": { "head_type": { "type": "integer", "description": "ID of a TS_HEAD_TYPE constant." }, "id": { "type": "integer", "description": "Existing signal head ID. Omit to create a new head." }, "light_source": { "type": "integer", "description": "ID of a TS_LIGHT_SOURCE constant." }, "order_no": { "type": "integer", "description": "Unique row order within the traffic signal." }, "power": { "type": "integer", "description": "ID of a TS_HEAD_POWER constant." } } }, "ErrorDetailsResponse": { "required": [ "details" ], "type": "object", "properties": { "details": { "type": "string", "description": "Detailed description of error" } }, "description": "Standard error response payload" } }, "responses": { "Http400": { "description": "Request could not be processed because it was invalid.\n\nEither validation failed (field-level errors are returned),\nor a generic bad request message is provided.\n", "content": { "application/json": { "schema": { "minProperties": 1, "type": "object", "properties": { "details": { "type": "string", "description": "Description of the error for generic bad request responses" } }, "additionalProperties": { "type": "array", "items": { "type": "string", "description": "Validation error message" }, "description": "List of validation error messages for this field name" }, "description": "Validation errors by field name or a generic bad request description" }, "example": { "email": [ "Email is required", "Email must be valid" ], "password": [ "Password must be at least 8 characters" ] } } } }, "Http401": { "description": "Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetailsResponse" }, "example": { "details": "Authentication credentials were not provided" } } } }, "Http403": { "description": "Request is valid, but for some reason cannot be executed.\n\nFor example deletion is forbidden if object has at least one dependent object.\nThis also covers generic access forbidden responses.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetailsResponse" } } } }, "Http404": { "description": "Object was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetailsResponse" }, "example": { "details": "Not found." } } } } }, "securitySchemes": { "Token": { "type": "apiKey", "description": "Token issued for API consumer.", "name": "Authorization", "in": "header" } } } } ````