> ## 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. # Create new electric premises > Operation is used to create new electric premises. Available from product version 3.2.2. ## OpenAPI ````json POST /el_premises/ { "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_premises/": { "post": { "tags": [ "Electric Premises" ], "summary": "Create new electric premises", "description": "Operation is used to create new electric premises. Available from product version 3.2.2.\n", "operationId": "createElPremises", "requestBody": { "description": "Electric Premises to be created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FlatElPremise" } } }, "required": true, "x-bodyName": "premise" }, "responses": { "201": { "description": "A created electric premises", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FlatElPremise" }, "example": { "address": null, "capacity": null, "connection": null, "contractor": null, "creation_date": "2019-02-21T21:04:53.809332", "creator": "api@keypro.fi", "deployment_date": null, "ground": null, "group_fuse": [], "guidance_address": null, "guiding_type": null, "height_accuracy": null, "id": 41241, "identification": "abc987", "installation_date": null, "installation_location": null, "installation_year": null, "location": null, "location_accuracy": null, "main_fuse": null, "manufacturer": null, "mapper": "", "mapping_date": null, "mapping_method": null, "network_area": null, "owner": null, "plan": null, "remarks": "", "renter": null, "safety_distance": 2060123445, "shade": null, "supplier": null, "surface": null, "surge_install_date": "2019-02-21", "surge_protector": 277877111, "survey_amount": "", "type": 21, "update_date": "2019-02-21T21:04:53.809332", "updated_by": "api@keypro.fi", "usage_state": 14621 } } } }, "400": { "description": "There was an error in request. Usually field validation failed.", "content": { "application/json": { "schema": { "minProperties": 1, "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string", "description": "Validation error" }, "description": "List of validation errors for this field name" }, "description": "Fields which failed validation" }, "example": { "type": [ "This field is required." ], "usage_state": [ "This field is required." ] } } } }, "401": { "$ref": "#/components/responses/Http401" } }, "security": [ { "Token": [] } ] } } }, "components": { "schemas": { "FlatElPremise": { "required": [ "identification", "usage_state", "type" ], "type": "object", "properties": { "address": { "type": "integer", "description": "Apartment address id" }, "capacity": { "type": "integer", "description": "capacity" }, "connection": { "type": "integer", "description": "Electric Premises Connection id" }, "contractor": { "type": "integer", "description": "Electric Premises Contractor id" }, "creation_date": { "type": "string", "description": "Creation date and time", "format": "date-time", "readOnly": true }, "creator": { "type": "string", "description": "Premises creator", "readOnly": true }, "deployment_date": { "type": "string", "description": "deployment date", "format": "date-time" }, "ground": { "type": "integer", "description": "Electric Premises Ground id" }, "group_fuse": { "type": "array", "items": { "type": "string", "format": "url" }, "description": "Group of fuses" }, "guidance_address": { "type": "integer", "description": "Unique Electric Premises guidance address id" }, "guiding_type": { "type": "integer", "description": "Electric Premises guiding type id" }, "height_accuracy": { "type": "integer", "description": "Height accuracy id" }, "id": { "type": "integer", "description": "Primary key", "readOnly": true }, "identification": { "type": "string", "description": "Identification" }, "installation_date": { "type": "string", "description": "Installation date", "format": "date" }, "installation_location": { "type": "integer", "description": "Installation location" }, "installation_year": { "type": "integer", "description": "Installation year" }, "location": { "type": "string", "description": "Geographical location", "format": "ewkt" }, "location_accuracy": { "type": "integer", "description": "Location accuracy id" }, "main_fuse": { "type": "integer", "description": "Electric Premises Main fuse type id" }, "manufacturer": { "type": "integer", "description": "Electric Premises Manufacturer id" }, "mapper": { "type": "string", "description": "mapper name" }, "mapping_date": { "type": "string", "description": "mapping date", "format": "date-time" }, "mapping_method": { "type": "integer", "description": "Mapping method id" }, "network_area": { "type": "integer", "description": "Network area id" }, "owner": { "type": "integer", "description": "Premises Owner id" }, "plan": { "type": "integer", "description": "Plan id" }, "remarks": { "type": "string", "description": "Remarks. Available from product version 3.2.14." }, "renter": { "type": "integer", "description": "Premises Renter id" }, "safety_distance": { "type": "integer", "description": "Safety Distance id. Available from product version 3.6.4" }, "shade": { "type": "integer", "description": "Electric Premises Shade id" }, "supplier": { "type": "integer", "description": "Electric Premises Supplier id" }, "surface": { "type": "integer", "description": "Electric Premises Surface type id" }, "surge_install_date": { "type": "string", "description": "Surge protector installation date. Available from product version 3.2.22", "format": "date" }, "surge_protector": { "type": "integer", "description": "Electric Surge Protector id. Available from product version 3.2.22" }, "survey_amount": { "type": "integer", "description": "unknown" }, "type": { "type": "integer", "description": "Electric Premises type id" }, "update_date": { "type": "string", "description": "Last update date time", "format": "date-time", "readOnly": true }, "updated_by": { "type": "string", "description": "Last updater of premises data", "readOnly": true }, "usage_state": { "type": "integer", "description": "Usage state id" } } }, "ErrorDetailsResponse": { "required": [ "details" ], "type": "object", "properties": { "details": { "type": "string", "description": "Detailed description of error" } }, "description": "Standard error response payload" } }, "responses": { "Http401": { "description": "Authentication credentials are missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetailsResponse" }, "example": { "details": "Authentication credentials were not provided" } } } } }, "securitySchemes": { "Token": { "type": "apiKey", "description": "Token issued for API consumer.", "name": "Authorization", "in": "header" } } } } ````