{"openapi":"3.1.0","info":{"title":"Haitaton Internal API","description":"API for Haitaton internal use. Can change without warning.","version":"1"},"servers":[{"url":"/api/"}],"paths":{"/taydennykset/{id}":{"put":{"tags":["taydennys-controller"],"summary":"Update a täydennys","description":"\nReturns the updated täydennys.\nThe täydennys can be updated until it has been sent to Allu.\nIf the täydennys hasn't changed since the last update, nothing more is done.\n","operationId":"update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/JohtoselvityshakemusUpdateRequest"},{"$ref":"#/components/schemas/KaivuilmoitusUpdateRequest"}]}}},"required":true},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"The updated täydennys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaydennysResponse"}}}},"400":{"description":"Request contains invalid data","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HankeErrorDetail"},{"$ref":"#/components/schemas/HankeError"}]},"examples":{"Validation error":{"summary":"Validation error example","description":"Validation error","value":"{hankeError: 'HAI2008', errorPaths: ['name']}"},"Incompatible request":{"summary":"Incompatible request example","description":"Incompatible request","value":"{hankeError: 'HAI2002'}"}}}}},"404":{"description":"A täydennys was not found with the given id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["taydennys-controller"],"summary":"Delete a täydennys","description":"Deletes a täydennys.","operationId":"delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"204":{"description":"Täydennys deleted, no body"},"404":{"description":"A täydennys was not found with the given id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/muutosilmoitukset/{id}":{"put":{"tags":["muutosilmoitus-controller"],"summary":"Update a muutosilmoitus","description":"\nReturns the updated muutosilmoitus.\nThe muutosilmoitus can be updated until it has been sent to Allu.\nIf the muutosilmoitus hasn't changed since the last update, nothing more is done.\n","operationId":"update_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/JohtoselvityshakemusUpdateRequest"},{"$ref":"#/components/schemas/KaivuilmoitusUpdateRequest"}]}}},"required":true},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"The updated muutosilmoitus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MuutosilmoitusResponse"}}}},"400":{"description":"Request contains invalid data","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HankeErrorDetail"},{"$ref":"#/components/schemas/HankeError"}]},"examples":{"Validation error":{"summary":"Validation error example","description":"Validation error","value":"{hankeError: 'HAI2008', errorPaths: ['name']}"},"Incompatible request":{"summary":"Incompatible request example","description":"Incompatible request","value":"{hankeError: 'HAI2002'}"}}}}},"404":{"description":"A muutosilmoitus was not found with the given id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"409":{"description":"The muutosilmoitus has already been sent to Allu and can not be updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["muutosilmoitus-controller"],"summary":"Delete a muutosilmoitus","description":"Cancels a muutosilmoitus and deletes all related data. A muutosilmoitus can not be canceled after it has been sent to Allu.","operationId":"delete_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"204":{"description":"Muutosilmoitus was deleted. No body."},"404":{"description":"A muutosilmoitus was not found with the given id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"409":{"description":"The muutosilmoitus has already been sent to Allu and can not be updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hankkeet/{hankeTunnus}":{"get":{"tags":["hanke-controller"],"summary":"Get hanke","description":"Get specific hanke by hankeTunnus.","operationId":"getHankeByTunnus","parameters":[{"name":"hankeTunnus","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hanke"}}}},"404":{"description":"Hanke by requested hankeTunnus not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["hanke-controller"],"summary":"Update hanke","description":"\nUpdate an existing hanke. Data must comply with the restrictions defined in Hanke schema definition.\n\nOn update following will happen automatically:\n1. Status is updated. PUBLIC if required fields are filled. Else DRAFT.\n2. Tormaystarkastelu (project nuisance) is re-calculated.","operationId":"updateHanke","parameters":[{"name":"hankeTunnus","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyHankeRequest"}}},"required":true},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hanke"}}}},"400":{"description":"Hanke contains invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeErrorDetail"}}}},"404":{"description":"Hanke by requested tunnus not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["hanke-controller"],"summary":"Delete hanke","description":"Delete an existing hanke. Deletion is not possible if Hanke contains active applications.","operationId":"deleteHanke","parameters":[{"name":"hankeTunnus","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"204":{"description":"Success, no content"},"404":{"description":"Hanke by requested hankeTunnus not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"409":{"description":"Hanke has active application(s) in Allu, will not delete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hankkeet/{hankeTunnus}/kayttajat":{"get":{"tags":["hanke-kayttaja-controller"],"summary":"Get Hanke users","description":"Returns a list of users and their Hanke related information.","operationId":"getHankeKayttajat","parameters":[{"name":"hankeTunnus","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Users in Hanke","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeKayttajaResponse"}}}},"404":{"description":"Hanke not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["hanke-kayttaja-controller"],"summary":"Update permissions of the listed users.","description":"\nFor each user, permissions are updated directly to the active permissions\nif the user in question has activated his permissions. If they haven't,\npermissions are updated to the user tokens, i.e. this call will change\nwhich permissions the user will get when they activate their permissions.\n\nThe reply from the list users endpoint can be modified and used here, but\nonly the ID and kayttooikeustaso fields are read.\n\nOnly the IDs that are mentioned are updated, so only updated IDs need to\nbe listed. This also means that this endpoint can't be used to remove\npermissions.\n\nIf removing or adding KAIKKI_OIKEUDET kayttooikeustaso, the caller needs to\nhave those same permissions.","operationId":"updatePermissions","parameters":[{"name":"hankeTunnus","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionUpdate"}}},"required":true},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"204":{"description":"Success, no response body"},"400":{"description":"The request body was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"403":{"description":"Not authorized to change admin permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"404":{"description":"Hanke by requested tunnus not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"409":{"description":"User tried editing their own permissions or there would be no users with KAIKKI_OIKEUDET left.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["hanke-kayttaja-controller"],"summary":"Add a user for the hanke.","description":"Add a new user for the hanke. Adds an invitation with viewing permissions. Sends an invitation email to them.","operationId":"createNewUser","parameters":[{"name":"hankeTunnus","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewUserRequest"}}},"required":true},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"The user that was added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeKayttajaDto"}}}},"404":{"description":"Hanke not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"409":{"description":"User with duplicate email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hankkeet/{hankeTunnus}/kayttajat/{kayttajaId}":{"put":{"tags":["hanke-kayttaja-controller"],"summary":"Update the contact information of a user","description":"\nUpdates the contact and (optionally) name information of the hankekayttaja.\n\nReturns the updated hankekayttaja.","operationId":"updateKayttajaInfo","parameters":[{"name":"hankeTunnus","in":"path","required":true,"schema":{"type":"string"}},{"name":"kayttajaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KayttajaUpdate"}}},"required":true},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Information updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeKayttajaDto"}}}},"400":{"description":"Email or telephone number is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeKayttajaDto"}}}},"404":{"description":"Hanke not found or not authorized or user is not in hanke","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeKayttajaDto"}}}},"409":{"description":"User has already been activated and therefore cannot update name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeKayttajaDto"}}}}},"security":[{"bearerAuth":[]}]}},"/hankkeet/{hankeTunnus}/kayttajat/self":{"put":{"tags":["hanke-kayttaja-controller"],"summary":"Update the user's own contact information","description":"\nUpdates the contact information of the hankekayttaja the user has in the hanke.\n\nThe sahkoposti and puhelinnumero are mandatory and can't be empty or blank.\n\nReturns the updated hankekayttaja.","operationId":"updateOwnContactInfo","parameters":[{"name":"hankeTunnus","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdate"}}},"required":true},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Information updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeKayttajaDto"}}}},"400":{"description":"Email or telephone number is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeKayttajaDto"}}}},"404":{"description":"Hanke not found or not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeKayttajaDto"}}}}},"security":[{"bearerAuth":[]}]}},"/hakemukset/{id}":{"get":{"tags":["hakemus-controller"],"summary":"Get one application","description":"Returns one application if it exists and the user can access it. Returns any decisions for the application as well.","operationId":"getById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"The requested application","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HakemusWithExtrasResponse"}}}},"404":{"description":"An application was not found with the given id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["hakemus-controller"],"summary":"Update an application","description":"\nReturns the updated application.\nThe application can be updated until it has been sent to Allu.\nIf the application hasn't changed since the last update, nothing more is done.\nThe pendingOnClient value can't be changed with this endpoint.\nUse [POST /hakemukset/{id}/laheta](#/application-controller/sendHakemus) for that.\n","operationId":"update_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/JohtoselvityshakemusUpdateRequest"},{"$ref":"#/components/schemas/KaivuilmoitusUpdateRequest"}]}}},"required":true},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"The updated application","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HakemusResponse"}}}},"400":{"description":"Request contains invalid data","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HankeErrorDetail"},{"$ref":"#/components/schemas/HankeError"}]},"examples":{"Validation error":{"summary":"Validation error example","description":"Validation error","value":"{hankeError: 'HAI2008', errorPaths: ['name']}"},"Incompatible request":{"summary":"Incompatible request example","description":"Incompatible request","value":"{hankeError: 'HAI2002'}"}}}}},"404":{"description":"An application was not found with the given id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"409":{"description":"The application can't be updated because it has been sent to Allu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["hakemus-controller"],"summary":"Delete an application","description":"Deletes an application.\n               If the application hasn't been sent to Allu, delete it directly.\n               If the application is pending in Allu, cancel it in Allu before deleting it locally.\n               If the application has proceeded beyond pending in Allu, refuse to delete it.\n            ","operationId":"delete_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Application deleted, no body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HakemusDeletionResultDto"}}}},"404":{"description":"An application was not found with the given id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"409":{"description":"The application is already processing in Allu and can't be deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/testdata/unlink-applications":{"post":{"tags":["test-data-controller"],"summary":"Unlink applications from allu","description":"Removes the Allu IDs and statuses from all applications, effectively unlinking them from Allu and returning them to drafts. The applications can be re-sent to allu whenever. This endpoint can be used to unlink all applications from Allu after Allu wipes all of it's data during test environment update. Allu will re-issue the same IDs, causing collisions in Haitaton.","operationId":"unlinkApplicationsFromAllu","responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"OK"}}}},"/testdata/create-public-hanke/{count}":{"post":{"tags":["test-data-controller"],"summary":"Create random public hanke","description":"Creates a specified number of random public hanke with geometries for testing map performance","operationId":"createPublicHanke","parameters":[{"name":"count","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/taydennykset/{taydennysId}/liitteet":{"post":{"tags":["taydennys-attachment-controller"],"summary":"Upload attachment for täydennys","description":"Upload attachment.","operationId":"postAttachment","parameters":[{"name":"taydennysId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"tyyppi","in":"query","required":true,"schema":{"type":"string","enum":["MUU","LIIKENNEJARJESTELY","VALTAKIRJA"]}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"liite":{"type":"string","format":"binary"}},"required":["liite"]}}}},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaydennysAttachmentMetadataDto"}}}},"404":{"description":"Täydennys not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"400":{"description":"Attachment invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/taydennykset/{id}/laheta":{"post":{"tags":["taydennys-controller"],"summary":"Send the täydennys, respond to the täydennyspyyntö","description":"\nSends the täydennys as a response to the information request it's based on.\n\nMerges the updated information to the hakemus. The täydennys and täydennyspyyntö will be removed.\n\nReturns the updated hakemus.                              \n","operationId":"send","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HakemusResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/public-hankkeet/grid":{"post":{"tags":["public-hanke-controller"],"summary":"Get public hanke by map grid cells","description":"\nReturns minimal public hanke data optimized for map rendering.\nContains only essential fields: id, hankeTunnus, nimi, and alueet \nwith geometry and tormaystarkastelu for map coloring.\n\nUses map grid cells for locating the right hanke. Grid cell coordinates \nmust be non-negative and within the valid grid bounds. Use the \n/grid/metadata endpoint to get the maximum valid coordinates.\n\nReturns HTTP 400 with error code HAI0003 if grid cell coordinates are invalid.\n","operationId":"getAllByDateAndGridCells","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicHankeGridCellRequest"}}},"required":true},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicHankeMinimal"}}}}}}}},"/muutosilmoitukset/{muutosilmoitusId}/liitteet":{"post":{"tags":["muutosilmoitus-attachment-controller"],"summary":"Upload attachment for muutosilmoitus","description":"Upload attachment.","operationId":"postAttachment_1","parameters":[{"name":"muutosilmoitusId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"tyyppi","in":"query","required":true,"schema":{"type":"string","enum":["MUU","LIIKENNEJARJESTELY","VALTAKIRJA"]}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"liite":{"type":"string","format":"binary"}},"required":["liite"]}}}},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MuutosilmoitusAttachmentMetadataDto"}}}},"404":{"description":"Muutosilmoitus not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"400":{"description":"Attachment invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"409":{"description":"Muutosilmoitus has been sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/muutosilmoitukset/{id}/laheta":{"post":{"tags":["muutosilmoitus-controller"],"summary":"Send the muutosilmoitus to Allu for processing","description":"\nSends the muutosilmoitus.\n- Marks the muutosilmoitus as sent by setting the `sent` field.\n- A clerk at Allu can process the change request after this call.\n- The muutosilmoitus can't be edited after it has been sent.\n\nRequest body is optional. Can be used to request a paper copy of\nthe decision replacement to be sent to the address provided.\nNull body will remove paper decision information even if it was set\non the original hakemus.\n\nReturns the hakemus for compatibility with sending täydennys and\nhakemus APIs. Sending the muutosilmoitus does not change the hakemus.\n","operationId":"send_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HakemusSendRequest"}}}},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HakemusResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/kayttajat":{"post":{"tags":["hanke-kayttaja-controller"],"summary":"Identify a user","description":"\nIdentifies a user who has been invited to a hanke. Finds a token in database\nthat's the same as the token given in the request. Activates the permission to\nthe hanke the token was created for.\n\nRemoves the token after a successful identification.\n\nResponds with information about the activated user and the hanke associated with it.","operationId":"identifyUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tunnistautuminen"}}},"required":true},"responses":{"500":{"description":"Token doesn't have a user associated with it or the verified name cannot be retrieved from Profiili","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"User identified, permission to hanke given","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TunnistautuminenResponse"}}}},"404":{"description":"Token not found or outdated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"409":{"description":"Permission already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/kayttajat/{kayttajaId}/kutsu":{"post":{"tags":["hanke-kayttaja-controller"],"summary":"Resend an invitation email","description":"\nResend the invitation email the user was sent when they were first added to the\nhanke as a contact person.\n\nRegenerates the invitation token and link. This means that the link in the\noriginal email will not work anymore. It also means that the period of validity\nof the token and link will be reset.\n\nReturns the updated hankekayttaja.","operationId":"resendInvitations","parameters":[{"name":"kayttajaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"204":{"description":"Invitation email resent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeKayttajaDto"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeKayttajaDto"}}}},"409":{"description":"User has already been activated or the current user doesn't have name and email registered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/johtoselvityshakemus":{"post":{"tags":["hakemus-controller"],"summary":"Generates new hanke from a cable report application and saves an application to it.","description":"Returns the created application. The new application is created as a draft, i.e. with true in pendingOnClient. The draft is not sent to Allu. ","operationId":"createWithGeneratedHanke","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateHankeRequest"}}},"required":true},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"The created application","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HakemusResponse"}}}},"400":{"description":"The request body was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hankkeet":{"get":{"tags":["hanke-controller"],"summary":"Get hanke list","description":"\nGet Hanke list to which the user has permission to.\n\nContains e.g. personal contact information, which is not available in a public Hanke.\n","operationId":"getHankeList","parameters":[{"name":"geometry","in":"query","description":"Boolean flag indicating whether endpoint should return geometry data for alueet. \n                    Geometriat fields will be null if false.","required":false,"schema":{"type":"boolean","default":false},"example":false}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Hanke"}}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["hanke-controller"],"summary":"Create new hanke","description":"\nA hanke is created with minimum information, but all information is necessary.\nThe hanke can be updated with the PUT endpoint after creation to flesh it out.\n\nWhen Hanke is created:\n1. A unique Hanke tunnus is created.\n2. The status of the hanke is set as DRAFT.","operationId":"createHanke","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateHankeRequest"}}},"required":true},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hanke"}}}},"400":{"description":"The request body was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hankkeet/{hankeTunnus}/liitteet":{"get":{"tags":["hanke-attachment-controller"],"summary":"Get metadata from hanke attachments","operationId":"getMetadataList","parameters":[{"name":"hankeTunnus","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Metadata of hanke attachments","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HankeAttachmentMetadataDto"}}}}},"404":{"description":"Hanke not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["hanke-attachment-controller"],"summary":"Upload an attachment for Hanke","operationId":"postAttachment_2","parameters":[{"name":"hankeTunnus","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"liite":{"type":"string","format":"binary"}},"required":["liite"]}}}},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeAttachmentMetadataDto"}}}},"404":{"description":"Hanke not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"400":{"description":"Invalid attachment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hakemukset":{"post":{"tags":["hakemus-controller"],"summary":"Create a new application","description":"Returns the created application. The new application is created as a draft, i.e. with true in pendingOnClient. The draft is not sent to Allu.","operationId":"create","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreateJohtoselvityshakemusRequest"},{"$ref":"#/components/schemas/CreateKaivuilmoitusRequest"}]}}},"required":true},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"The created application","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HakemusResponse"}}}},"400":{"description":"The request body was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hakemukset/{id}/tyo-valmis":{"post":{"tags":["hakemus-controller"],"summary":"Report the work finished date for an excavation notification","description":"\nReport the date the work finished on the excavation.\nThe reported date will be sent to Allu as the work finished date.\n\nThe excavation notification needs to be in a valid state to accept the report.\nThe valid states are:\n  - PENDING,\n  - HANDLING,\n  - INFORMATION_RECEIVED,\n  - RETURNED_TO_PREPARATION,\n  - DECISIONMAKING,\n  - DECISION,\n  - OPERATIONAL_CONDITION.\n\nThe date cannot be before the application was started and not in the future.\nThe id needs to reference an excavation notification.\n","operationId":"reportWorkFinished","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateReportRequest"}}},"required":true},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Work finished reported, no body"},"400":{"description":"The date is malformed, the date isn't in the allowed bounds or the application not an excavation notification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"404":{"description":"An application was not found with the given id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"409":{"description":"The application is not in one of the allowed states","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hakemukset/{id}/toiminnallinen-kunto":{"post":{"tags":["hakemus-controller"],"summary":"Report the operational condition date for an excavation notification","description":"\nReport the operational condition date for an excavation notification.\nThe reported date will be sent to Allu as the operational condition date.\n\nThe excavation notification needs to be in a valid state to accept the report.\nThe valid states are:\n  - PENDING,\n  - HANDLING,\n  - INFORMATION_RECEIVED,\n  - RETURNED_TO_PREPARATION,\n  - DECISIONMAKING,\n  - DECISION.\n\nThe date cannot be before the application was started and not in the future.\nThe id needs to reference an excavation notification.","operationId":"reportOperationalCondition","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateReportRequest"}}},"required":true},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Operational condition reported, no body"},"400":{"description":"The date is malformed, the date isn't in the allowed bounds or the application not an excavation notification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"404":{"description":"An application was not found with the given id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"409":{"description":"The application is not in one of the allowed states","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hakemukset/{id}/taydennys":{"post":{"tags":["taydennys-controller"],"summary":"Create a new response to an information request, i.e. a täydennys.","description":"\nReturns the created täydennys. The täydennys starts with a copy of the\ndata the application has.\n\nThe application needs to be in WAITING_INFORMATION status and there needs\nto be an open information request for the application. \n","operationId":"create_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"The created täydennys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaydennysResponse"}}}},"409":{"description":"The application was in the wrong status or there wasn't an open information request on the application.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hakemukset/{id}/muutosilmoitus":{"post":{"tags":["muutosilmoitus-controller"],"summary":"Create a change notification, i.e. a muutosilmoitus.","description":"\nReturns the created muutosilmoitus. The muutosilmoitus starts\nwith a copy of the data the application has.\n\nThe application needs to be in DECISION or OPERATIONAL_CONDITION\nstatus.\n\nFor the time being, creating a muutosilmoitus is only supported\nfor excavation notifications.\n","operationId":"create_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"The created muutosilmoitus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MuutosilmoitusResponse"}}}},"409":{"description":"The application was in the wrong status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"400":{"description":"Operation not supported for application type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hakemukset/{id}/laheta":{"post":{"tags":["hakemus-controller"],"summary":"Send an application to Allu for processing","description":"\nReturns the application with updated status fields.\n- Sets the pendingOnClient value of the application to false. This means the application is no longer a draft.\n- A clerk at Allu can start processing the application after this call.\n- The application cannot be edited after it has been sent.\n- The caller needs to be a contact on the application for at least one customer.\n\nRequest body is optional. Can be used to request a paper copy of the decision to be sent to the address provided.\n","operationId":"sendHakemus","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HakemusSendRequest"}}}},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"The sent application","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HakemusResponse"}}}},"400":{"description":"Application contains invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeErrorDetail"}}}},"404":{"description":"An application was not found with the given id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"409":{"description":"The application has been sent already","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hakemukset/{applicationId}/liitteet":{"get":{"tags":["application-attachment-controller"],"summary":"Get metadata from application attachments","operationId":"getApplicationAttachments","parameters":[{"name":"applicationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Application attachments","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationAttachmentMetadataDto"}}}}},"404":{"description":"Application not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["application-attachment-controller"],"summary":"Upload attachment for application","description":"Upload attachment. Sent to Allu if application has been sent but it is not yet in handling.","operationId":"postAttachment_3","parameters":[{"name":"applicationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"tyyppi","in":"query","required":true,"schema":{"type":"string","enum":["MUU","LIIKENNEJARJESTELY","VALTAKIRJA"]}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"liite":{"type":"string","format":"binary"}},"required":["liite"]}}}},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationAttachmentMetadataDto"}}}},"404":{"description":"Application not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"400":{"description":"Attachment invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"409":{"description":"Application already in Allu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/haittaindeksit":{"post":{"tags":["tormaystarkastelu-controller"],"summary":"Calculate nuisance indices","description":"Calculate nuisance indices with the given geometry and other information. The calculated indices will not be saved anywhere.","operationId":"calculate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TormaystarkasteluRequest"}}},"required":true},"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"The calculated nuisance indices for the given geometry and other information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TormaystarkasteluTulos"}}}},"400":{"description":"The given information was not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/backchannel-logout":{"post":{"tags":["back-channel-logout-controller"],"summary":"Backhannel logout","description":"Logs out the user from all Helsinki applications. Called by Helsinki Profiili.","operationId":"logout","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/MultiValueMapStringString"}}},"required":true},"responses":{"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackChannelLogoutError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackChannelLogoutError"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackChannelLogoutError"}}}}}}},"/testdata/trigger-allu":{"get":{"tags":["test-data-controller"],"summary":"Trigger Allu updates","operationId":"triggerAllu","responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/taydennykset/{taydennysId}/liitteet/{attachmentId}/content":{"get":{"tags":["taydennys-attachment-controller"],"summary":"Download attachment file","description":"\nDownload the content for the given attachment.\n\nIf the attachment is a power of attorney (valtakirja), it can't\nbe downloaded because of privacy concerns.\n","operationId":"getApplicationAttachmentContent","parameters":[{"name":"taydennysId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Attachment file","content":{"application/json":{"schema":{"type":"string","format":"byte"}}}},"404":{"description":"Attachment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"403":{"description":"Attachment is valtakirja","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/status":{"get":{"tags":["status-controller"],"summary":"Check application status","description":"Health check to verify application status. Checks that the database connection is working.","operationId":"getStatus","responses":{"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success"}}}},"/public-hankkeet/{hankeTunnus}":{"get":{"tags":["public-hanke-controller"],"summary":"Get full public hanke data by hankeTunnus","description":"\nReturns complete public hanke data for a single hanke by hankeTunnus.\nContains all public fields including full area details with geometry, nuisance control plans,\ncontact information, and project details.\n\nOnly returns data if the hanke has PUBLIC status.\n","operationId":"get","parameters":[{"name":"hankeTunnus","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicHanke"}}}},"404":{"description":"Hanke not found or not public","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicHanke"}}}}}}},"/public-hankkeet/grid/metadata":{"get":{"tags":["public-hanke-controller"],"summary":"Get grid metadata for client-side caching","description":"\nReturns grid configuration parameters needed by the UI for client-side caching\nand proper grid cell calculations.\n\nThis includes grid cell size in meters and the origin coordinates (0,0) \nthat define the grid system used by the /public-hankkeet/grid endpoint.\n","operationId":"getGridMetadata","responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GridMetadata"}}}}}}},"/profiili/verified-name":{"get":{"tags":["profiili-controller"],"summary":"Get verified name from Profiili","operationId":"verifiedName","responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Not authorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Names"}}}},"404":{"description":"Verification not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/paatokset/{id}":{"get":{"tags":["paatos-controller"],"summary":"Download decision with the given ID.","description":"\nDownloads the decision PDF for this decision. Decision can also be an approval\ndocument for an operational condition or a work finished.\n","operationId":"download","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"The decision PDF","content":{"application/pdf":{}}},"404":{"description":"A decision was not found with the given id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/my-permissions":{"get":{"tags":["hanke-kayttaja-controller"],"summary":"Get your permissions for your own projects","description":"Returns a map of current users Hanke identifiers and respective permissions.","operationId":"whoAmIByHanke","responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Permissions grouped by hankeTunnus.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WhoamiResponse"}}}}}},"security":[{"bearerAuth":[]}]}},"/muutosilmoitukset/{muutosilmoitusId}/liitteet/{attachmentId}/content":{"get":{"tags":["muutosilmoitus-attachment-controller"],"summary":"Download attachment file","description":"\nDownload the content for the given attachment.\n\nIf the attachment is a power of attorney (valtakirja), it can't\nbe downloaded because of privacy concerns.\n","operationId":"getApplicationAttachmentContent_1","parameters":[{"name":"muutosilmoitusId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Attachment file","content":{"application/json":{"schema":{"type":"string","format":"byte"}}}},"404":{"description":"Attachment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"403":{"description":"Attachment is valtakirja","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/kayttajat/{kayttajaId}":{"get":{"tags":["hanke-kayttaja-controller"],"summary":"Get a Hanke user","description":"Returns a single user and their Hanke related information.","operationId":"getHankeKayttaja","parameters":[{"name":"kayttajaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"User info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeKayttajaDto"}}}},"400":{"description":"Invalid UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"404":{"description":"Hanke or user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["hanke-kayttaja-controller"],"summary":"Delete the user","description":"\nDeletes the given hankekayttaja (user) from the hanke.\n\nCheck if there are active applications the user is a contact in or if the user is the only\ncontact in the applicant customer role. If either is true, refuse to delete the kayttaja.","operationId":"delete_3","parameters":[{"name":"kayttajaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"204":{"description":"User deleted. No body."},"400":{"description":"kayttajaId is not a proper UUID."},"404":{"description":"Hankekayttaja not found or not authorized."},"409":{"description":"Hankekayttaja is a contact on an active application or the only contact in the applicant customer role or there would be no admin users left."}},"security":[{"bearerAuth":[]}]}},"/kayttajat/{kayttajaId}/deleteInfo":{"get":{"tags":["hanke-kayttaja-controller"],"summary":"Check if user can be deleted","description":"\nCheck if there are active applications the user is a contact in that would\nprevent their deletion. Deleting would also be prevented if the user is the only\ncontact in the applicant customer role, so check that as well.\n\nAlso, collect draft applications the user is a contact in, since the frontend\nneeds to show them when asking for confirmation.\n\nDoes not check if the caller needs KAIKKI_OIKEUDET to delete this particular\nuser.","operationId":"checkForDelete","parameters":[{"name":"kayttajaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Return the results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteInfo"}}}},"400":{"description":"kayttajaId is not a proper UUID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteInfo"}}}},"404":{"description":"Hankekayttaja not found or not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteInfo"}}}}},"security":[{"bearerAuth":[]}]}},"/hankkeet/{hankeTunnus}/whoami":{"get":{"tags":["hanke-kayttaja-controller"],"summary":"Get your own permission for a hanke","operationId":"whoami","parameters":[{"name":"hankeTunnus","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Your permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhoamiResponse"}}}},"404":{"description":"Hanke not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hankkeet/{hankeTunnus}/liitteet/{attachmentId}/content":{"get":{"tags":["hanke-attachment-controller"],"summary":"Download attachment file.","operationId":"getAttachmentContent","parameters":[{"name":"hankeTunnus","in":"path","required":true,"schema":{"type":"string"}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"string","format":"byte"}}}},"404":{"description":"Attachment not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hankkeet/{hankeTunnus}/hakemukset":{"get":{"tags":["hakemus-controller"],"summary":"Get hanke applications","description":"Returns list of applications belonging to the given hanke.","operationId":"getHankkeenHakemukset","parameters":[{"name":"hankeTunnus","in":"path","required":true,"schema":{"type":"string"}},{"name":"areas","in":"query","description":"Boolean flag indicating whether endpoint should return application areas. \n                    Areas field will be null if false.","required":false,"schema":{"type":"boolean","default":false},"example":false}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Applications of the requested hanke","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankkeenHakemuksetResponse"}}}},"404":{"description":"Hanke was not found with the given id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hakemukset/{id}/paatos":{"get":{"tags":["hakemus-controller"],"summary":"Download a decision","description":"Downloads a decision for this application from Allu.","operationId":"downloadDecision","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"The decision PDF","content":{"application/pdf":{}}},"404":{"description":"An application was not found with the given id or the application didn't have a decision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hakemukset/{applicationId}/liitteet/{attachmentId}/content":{"get":{"tags":["application-attachment-controller"],"summary":"Download attachment file","description":"\nDownload the content for the given attachment.\n\nIf the attachment is a power of attorney (valtakirja), it can't\nbe downloaded because of privacy concerns.\n","operationId":"getApplicationAttachmentContent_2","parameters":[{"name":"applicationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Attachment file","content":{"application/json":{"schema":{"type":"string","format":"byte"}}}},"404":{"description":"Attachment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"403":{"description":"Attachment is valtakirja","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/gdpr-api/{userId}":{"get":{"tags":["gdpr-controller"],"summary":"Returns all personal information of the user","description":"Helsinki profiili calls this endpoint when the a user makes a GDPR request for all their personal information. We return all personal information we can link up with that user id. Information is returned if the person has created an application. We return the information they wrote down as their own info. \n\nThe API has a specific format for the response, it's documented in [Confluence](https://helsinkisolutionoffice.atlassian.net/wiki/spaces/DD/pages/80969736/GDPR+API).","operationId":"getByUserId","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GdprErrorResponse"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"GDPR information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionNode"}}}},"400":{"description":"Request’s parameters fail validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionNode"}}}},"204":{"description":"Profile’s data cannot be found with the given id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionNode"}}}}}},"delete":{"tags":["gdpr-controller"],"summary":"Deletes all personal information of the user","description":"Helsinki profiili calls this endpoint when a user makes a GDPR request to remove all their personal information. The only information we can associate with a user id is the information the creator of an application has entered as their own. We can't have applications without information about who has made them, so we have to delete the applications. If any of the user's applications have progressed to handling or beyond, we refuse to delete anything. \n\nSetting dry_run to true runs all the checks like we were deleting the information, but nothing is deleted. \n\nThe API has a specific format for the response, it's documented in [Confluence](https://helsinkisolutionoffice.atlassian.net/wiki/spaces/DD/pages/80969736/GDPR+API).","operationId":"deleteUserInformation","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GdprErrorResponse"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"204":{"description":"The service allows and has done everything needed so that it no longer contains personal data for the identified profile. This response is also given in the case that the service does not contain any data for the profile or is completely unaware of the identified profile."},"400":{"description":"Request’s parameters fail validation"},"403":{"description":"Service data related to the identified profile can't be removed from the called service because of some legal reason. The reason(s) for failure are detailed in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GdprErrorResponse"}}}}}}},"/banners":{"get":{"tags":["banner-controller"],"summary":"Get current notification banners","description":"Get a list of banners the UI should display to the users.","operationId":"listBanners","responses":{"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/BannerResponse"}}}}}}}},"/testdata/terminate-session":{"delete":{"tags":["test-data-controller"],"summary":"Terminate current user session","description":"Deletes the current user's session from the database to simulate backchannel logout. The next authenticated request will receive HAI0006 error. This endpoint requires authentication and is only available when testdata is enabled.","operationId":"terminateCurrentSession","responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]}]}},"/taydennykset/{taydennysId}/liitteet/{attachmentId}":{"delete":{"tags":["taydennys-attachment-controller"],"summary":"Delete attachment from täydennys","description":"Deletes attachment from täydennys.","operationId":"deleteAttachment","parameters":[{"name":"taydennysId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Delete attachment"},"404":{"description":"Attachment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/muutosilmoitukset/{muutosilmoitusId}/liitteet/{attachmentId}":{"delete":{"tags":["muutosilmoitus-attachment-controller"],"summary":"Delete attachment from muutosilmoitus","description":"\nCan be deleted if muutosilmoitus has not been sent to Allu.\n\nDon't delete if muutosilmoitus has value in sent.\n","operationId":"removeAttachment","parameters":[{"name":"muutosilmoitusId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Delete attachment"},"404":{"description":"Attachment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"409":{"description":"Application already in Allu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hankkeet/{hankeTunnus}/liitteet/{attachmentId}":{"delete":{"tags":["hanke-attachment-controller"],"summary":"Delete attachment from hanke","operationId":"deleteAttachment_1","parameters":[{"name":"hankeTunnus","in":"path","required":true,"schema":{"type":"string"}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Success"},"404":{"description":"Attachment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}},"/hakemukset/{applicationId}/liitteet/{attachmentId}":{"delete":{"tags":["application-attachment-controller"],"summary":"Delete attachment from application","description":"Can be deleted if application has not been sent to Allu. Don't delete if application has alluId.","operationId":"removeAttachment_1","parameters":[{"name":"applicationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"500":{"description":"There has been an unexpected error during the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"401":{"description":"Request’s credentials are missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"200":{"description":"Delete attachment"},"404":{"description":"Attachment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}},"409":{"description":"Application already in Allu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HankeError"}}}}},"security":[{"bearerAuth":[]}]}}},"components":{"schemas":{"HankeError":{"type":"string","enum":["HAI0001 - Access denied","HAI0002 - Internal error","HAI0003 - Invalid data","HAI0004 - Resource does not exist","HAI0005 - Insufficient permissions","HAI0006 - Session terminated","HAI1001 - Hanke not found","HAI1002 - Invalid Hanke data","HAI1003 - Internal error while saving Hanke","HAI1004 - Internal error while loading Hanke","HAI1005 - Database state invalid","HAI1006 - Internal error while creating tormaystarkastelu for Hanke","HAI1007 - Tormaystarkastelu not found","HAI1008 - Internal error while loading tormaystarkastelu for Hanke","HAI1011 - Invalid Hanke geometry","HAI1012 - Internal error while saving Hanke geometry","HAI1013 - Invalid coordinate system","HAI1014 - Internal error while loading Hanke geometry","HAI1015 - Hanke geometry not found","HAI1020 - HankeYhteystieto not found","HAI1030 - Problem with classification of geometries","HAI1031 - Invalid state: Missing needed data","HAI1032 - Invalid Hankealue data","HAI1034 - Hanke has been completed, operation is forbidden","HAI2001 - Application not found","HAI2002 - Incompatible application data type","HAI2003 - Application is already processing in Allu and can no longer be updated.","HAI2004 - Application data missing information needed by Allu.","HAI2005 - Invalid application geometry","HAI2006 - Application decision not found","HAI2007 - Application geometry not inside any hankealue","HAI2008 - Application contains invalid data","HAI2009 - Application is already sent to Allu, operation prohibited.","HAI2010 - Application contains invalid customer","HAI2011 - Application contains invalid contact","HAI2012 - User is not a contact on the application, operation forbidden","HAI2013 - Application has not been sent to Allu yet, operation prohibited.","HAI2014 - Date reported is before work was started or in the future.","HAI2015 - Operation not allowed in this application status.","HAI3001 - Attachment upload failed","HAI3002 - Loading attachment failed","HAI3003 - Attachment limit reached","HAI3004 - Valtakirja download forbidden","HAI4001 - HankeKayttaja not found","HAI4002 - Trying to change own permission","HAI4003 - Permission data conflict","HAI4004 - Kayttajatunniste not found","HAI4005 - Could not verify user identity","HAI4006 - Duplicate hankekayttaja","HAI4007 - Verified name not found in Profiili","HAI4008 - Verified name call was unauthorized","HAI5001 - Decision not found","HAI6001 - Taydennys not found","HAI6002 - Taydennys has no changes","HAI7001 - Muutosilmoitus not found","HAI7002 - Muutosilmoitus is already sent to Allu, operation prohibited.","HAI7003 - Muutosilmoitus has no changes"]},"Autoliikenneluokittelu":{"type":"object","description":"Car traffic nuisance index and classification","properties":{"indeksi":{"type":"number","format":"float"},"haitanKesto":{"type":"integer","format":"int32"},"katuluokka":{"type":"integer","format":"int32"},"liikennemaara":{"type":"integer","format":"int32"},"kaistahaitta":{"type":"integer","format":"int32"},"kaistapituushaitta":{"type":"integer","format":"int32"}},"required":["haitanKesto","indeksi","kaistahaitta","kaistapituushaitta","katuluokka","liikennemaara"]},"ContactRequest":{"type":"object","properties":{"hankekayttajaId":{"type":"string","format":"uuid"}},"required":["hankekayttajaId"]},"Crs":{"type":"object","properties":{"type":{"type":"string","enum":["name","link"]},"properties":{"type":"object","additionalProperties":{}}}},"CustomerRequest":{"type":"object","properties":{"yhteystietoId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PERSON","COMPANY","ASSOCIATION","OTHER"]},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"registryKey":{"type":"string"},"registryKeyHidden":{"type":"boolean"}},"required":["email","name","phone","registryKeyHidden","type"]},"CustomerWithContactsRequest":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/CustomerRequest"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/ContactRequest"}}},"required":["contacts","customer"]},"HakemusUpdateRequest":{"type":"object","discriminator":{"propertyName":"applicationType"},"properties":{"name":{"type":"string"},"areas":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/JohtoselvitysHakemusalue"},{"$ref":"#/components/schemas/KaivuilmoitusAlue"}]}},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"applicationType":{"type":"string","enum":["CABLE_REPORT","EXCAVATION_NOTIFICATION"]},"workDescription":{"type":"string"},"representativeWithContacts":{"$ref":"#/components/schemas/CustomerWithContactsRequest"},"customerWithContacts":{"$ref":"#/components/schemas/CustomerWithContactsRequest"}},"required":["applicationType","name","workDescription"]},"InvoicingCustomerRequest":{"type":"object","properties":{"type":{"type":"string","enum":["PERSON","COMPANY","ASSOCIATION","OTHER"]},"name":{"type":"string"},"registryKey":{"type":"string"},"registryKeyHidden":{"type":"boolean"},"ovt":{"type":"string"},"invoicingOperator":{"type":"string"},"customerReference":{"type":"string"},"postalAddress":{"$ref":"#/components/schemas/InvoicingPostalAddressRequest"},"email":{"type":"string"},"phone":{"type":"string"}},"required":["registryKeyHidden","type"]},"InvoicingPostalAddressRequest":{"type":"object","properties":{"streetAddress":{"$ref":"#/components/schemas/StreetAddress"},"postalCode":{"type":"string"},"city":{"type":"string"}}},"JohtoselvitysHakemusalue":{"type":"object","properties":{"name":{"type":"string"},"geometry":{"$ref":"#/components/schemas/Polygon"}},"required":["geometry","name"]},"JohtoselvityshakemusUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/HakemusUpdateRequest"},{"type":"object","properties":{"postalAddress":{"$ref":"#/components/schemas/PostalAddressRequest"},"constructionWork":{"type":"boolean"},"maintenanceWork":{"type":"boolean"},"propertyConnectivity":{"type":"boolean"},"emergencyWork":{"type":"boolean"},"rockExcavation":{"type":"boolean"},"areas":{"type":"array","items":{"$ref":"#/components/schemas/JohtoselvitysHakemusalue"}},"contractorWithContacts":{"$ref":"#/components/schemas/CustomerWithContactsRequest"},"propertyDeveloperWithContacts":{"$ref":"#/components/schemas/CustomerWithContactsRequest"}}}],"required":["applicationType","constructionWork","emergencyWork","maintenanceWork","name","propertyConnectivity","rockExcavation","workDescription"]},"KaivuilmoitusAlue":{"type":"object","properties":{"name":{"type":"string"},"hankealueId":{"type":"integer","format":"int32"},"tyoalueet":{"type":"array","items":{"$ref":"#/components/schemas/Tyoalue"}},"katuosoite":{"type":"string"},"tyonTarkoitukset":{"type":"array","items":{"type":"string","enum":["VESI","VIEMARI","SADEVESI","SAHKO","TIETOLIIKENNE","LIIKENNEVALO","ULKOVALAISTUS","KAAPPITYO","KAUKOLAMPO","KAUKOKYLMA","KAASUJOHTO","KISKOTYO","MUU","KADUNRAKENNUS","KADUN_KUNNOSSAPITO","KIINTEISTOLIITTYMA","SULKU_TAI_KAIVO","UUDISRAKENNUS","SANEERAUS","AKILLINEN_VIKAKORJAUS","VIHERTYO","RUNKOLINJA","NOSTOTYO","MUUTTO","PYSAKKITYO","KIINTEISTOREMONTTI","ULKOMAINOS","KUVAUKSET","LUMENPUDOTUS","YLEISOTILAISUUS","VAIHTOLAVA"]},"uniqueItems":true},"meluhaitta":{"type":"string","enum":["EI_MELUHAITTAA","SATUNNAINEN_MELUHAITTA","TOISTUVA_MELUHAITTA","JATKUVA_MELUHAITTA"]},"polyhaitta":{"type":"string","enum":["EI_POLYHAITTAA","SATUNNAINEN_POLYHAITTA","TOISTUVA_POLYHAITTA","JATKUVA_POLYHAITTA"]},"tarinahaitta":{"type":"string","enum":["EI_TARINAHAITTAA","SATUNNAINEN_TARINAHAITTA","TOISTUVA_TARINAHAITTA","JATKUVA_TARINAHAITTA"]},"kaistahaitta":{"type":"string","enum":["EI_VAIKUTA","YKSI_KAISTA_VAHENEE","YKSI_KAISTA_VAHENEE_KAHDELLA_AJOSUUNNALLA","USEITA_KAISTOJA_VAHENEE_AJOSUUNNILLA","YKSI_AJOSUUNTA_POISTUU_KAYTOSTA","USEITA_AJOSUUNTIA_POISTUU_KAYTOSTA"]},"kaistahaittojenPituus":{"type":"string","enum":["EI_VAIKUTA_KAISTAJARJESTELYIHIN","PITUUS_ALLE_10_METRIA","PITUUS_10_99_METRIA","PITUUS_100_499_METRIA","PITUUS_500_METRIA_TAI_ENEMMAN"]},"lisatiedot":{"type":"string"},"haittojenhallintasuunnitelma":{"type":"object","additionalProperties":{"type":"string"}}},"required":["haittojenhallintasuunnitelma","hankealueId","kaistahaitta","kaistahaittojenPituus","katuosoite","meluhaitta","name","polyhaitta","tarinahaitta","tyoalueet","tyonTarkoitukset"]},"KaivuilmoitusUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/HakemusUpdateRequest"},{"type":"object","properties":{"constructionWork":{"type":"boolean"},"maintenanceWork":{"type":"boolean"},"emergencyWork":{"type":"boolean"},"cableReportDone":{"type":"boolean"},"rockExcavation":{"type":"boolean"},"cableReports":{"type":"array","items":{"type":"string"}},"placementContracts":{"type":"array","items":{"type":"string"}},"requiredCompetence":{"type":"boolean"},"areas":{"type":"array","items":{"$ref":"#/components/schemas/KaivuilmoitusAlue"}},"contractorWithContacts":{"$ref":"#/components/schemas/CustomerWithContactsRequest"},"propertyDeveloperWithContacts":{"$ref":"#/components/schemas/CustomerWithContactsRequest"},"invoicingCustomer":{"$ref":"#/components/schemas/InvoicingCustomerRequest"},"additionalInfo":{"type":"string"}}}],"required":["applicationType","cableReportDone","constructionWork","emergencyWork","maintenanceWork","name","requiredCompetence","workDescription"]},"LiikennehaittaindeksiType":{"type":"object","description":"Traffic nuisance index type","properties":{"indeksi":{"type":"number","format":"float"},"tyyppi":{"type":"string","enum":["AUTOLIIKENNEINDEKSI","PYORALIIKENNEINDEKSI","LINJAAUTOLIIKENNEINDEKSI","RAITIOLIIKENNEINDEKSI"]}},"required":["indeksi","tyyppi"]},"LngLatAlt":{"type":"object","properties":{"longitude":{"type":"number","format":"double"},"latitude":{"type":"number","format":"double"},"altitude":{"type":"number","format":"double"},"additionalElements":{"type":"array","items":{"type":"number","format":"double"}}}},"Polygon":{"allOf":[{"$ref":"#/components/schemas/GeoJsonObject"},{"type":"object","properties":{"coordinates":{"type":"array","items":{"type":"array","items":{"$ref":"#/components/schemas/LngLatAlt"}}}}}]},"PostalAddressRequest":{"type":"object","properties":{"streetAddress":{"$ref":"#/components/schemas/StreetAddress"}},"required":["streetAddress"]},"StreetAddress":{"type":"object","properties":{"streetName":{"type":"string"}}},"TormaystarkasteluTulos":{"type":"object","description":"Collision review result","properties":{"autoliikenne":{"$ref":"#/components/schemas/Autoliikenneluokittelu","description":"Car traffic index results"},"pyoraliikenneindeksi":{"type":"number","format":"float","description":"Cycling index result"},"linjaautoliikenneindeksi":{"type":"number","format":"float","description":"Local bus traffic index result"},"raitioliikenneindeksi":{"type":"number","format":"float","description":"Tram traffic index result"},"liikennehaittaindeksi":{"$ref":"#/components/schemas/LiikennehaittaindeksiType"}},"required":["autoliikenne","liikennehaittaindeksi","linjaautoliikenneindeksi","pyoraliikenneindeksi","raitioliikenneindeksi"]},"Tyoalue":{"type":"object","properties":{"geometry":{"$ref":"#/components/schemas/Polygon"},"area":{"type":"number","format":"double"},"tormaystarkasteluTulos":{"$ref":"#/components/schemas/TormaystarkasteluTulos"}},"required":["area","geometry"]},"HankeErrorDetail":{"type":"object","properties":{"hankeError":{"$ref":"#/components/schemas/HankeError"},"errorPaths":{"type":"array","items":{"type":"string"}}},"required":["errorPaths","hankeError"]},"ContactResponse":{"type":"object","properties":{"hankekayttajaId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"orderer":{"type":"boolean"}},"required":["email","firstName","hankekayttajaId","lastName","orderer","phone"]},"CustomerResponse":{"type":"object","properties":{"yhteystietoId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["PERSON","COMPANY","ASSOCIATION","OTHER"]},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"registryKey":{"type":"string"},"registryKeyHidden":{"type":"boolean"}},"required":["email","name","phone","registryKeyHidden","type","yhteystietoId"]},"CustomerWithContactsResponse":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/CustomerResponse"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/ContactResponse"}}},"required":["contacts","customer"]},"HakemusDataResponse":{"type":"object","properties":{"name":{"type":"string"},"areas":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/JohtoselvitysHakemusalue"},{"$ref":"#/components/schemas/KaivuilmoitusAlue"}]}},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"applicationType":{"type":"string","enum":["CABLE_REPORT","EXCAVATION_NOTIFICATION"]},"paperDecisionReceiver":{"$ref":"#/components/schemas/PaperDecisionReceiver"},"customerWithContacts":{"$ref":"#/components/schemas/CustomerWithContactsResponse"}},"required":["applicationType","areas","name"]},"InvoicingCustomerResponse":{"type":"object","properties":{"type":{"type":"string","enum":["PERSON","COMPANY","ASSOCIATION","OTHER"]},"name":{"type":"string"},"registryKey":{"type":"string"},"registryKeyHidden":{"type":"boolean"},"ovt":{"type":"string"},"invoicingOperator":{"type":"string"},"customerReference":{"type":"string"},"postalAddress":{"$ref":"#/components/schemas/PostalAddress"},"email":{"type":"string"},"phone":{"type":"string"}},"required":["registryKeyHidden"]},"JohtoselvitysHakemusDataResponse":{"allOf":[{"$ref":"#/components/schemas/HakemusDataResponse"},{"type":"object","properties":{"postalAddress":{"$ref":"#/components/schemas/PostalAddress"},"constructionWork":{"type":"boolean"},"maintenanceWork":{"type":"boolean"},"propertyConnectivity":{"type":"boolean"},"emergencyWork":{"type":"boolean"},"rockExcavation":{"type":"boolean"},"workDescription":{"type":"string"},"areas":{"type":"array","items":{"$ref":"#/components/schemas/JohtoselvitysHakemusalue"}},"contractorWithContacts":{"$ref":"#/components/schemas/CustomerWithContactsResponse"},"propertyDeveloperWithContacts":{"$ref":"#/components/schemas/CustomerWithContactsResponse"},"representativeWithContacts":{"$ref":"#/components/schemas/CustomerWithContactsResponse"}}}],"required":["applicationType","areas","constructionWork","emergencyWork","maintenanceWork","name","propertyConnectivity","workDescription"]},"KaivuilmoitusDataResponse":{"allOf":[{"$ref":"#/components/schemas/HakemusDataResponse"},{"type":"object","properties":{"workDescription":{"type":"string"},"constructionWork":{"type":"boolean"},"maintenanceWork":{"type":"boolean"},"emergencyWork":{"type":"boolean"},"cableReportDone":{"type":"boolean"},"rockExcavation":{"type":"boolean"},"cableReports":{"type":"array","items":{"type":"string"}},"placementContracts":{"type":"array","items":{"type":"string"}},"requiredCompetence":{"type":"boolean"},"areas":{"type":"array","items":{"$ref":"#/components/schemas/KaivuilmoitusAlue"}},"contractorWithContacts":{"$ref":"#/components/schemas/CustomerWithContactsResponse"},"propertyDeveloperWithContacts":{"$ref":"#/components/schemas/CustomerWithContactsResponse"},"representativeWithContacts":{"$ref":"#/components/schemas/CustomerWithContactsResponse"},"invoicingCustomer":{"$ref":"#/components/schemas/InvoicingCustomerResponse"},"additionalInfo":{"type":"string"}}}],"required":["applicationType","areas","cableReportDone","constructionWork","emergencyWork","maintenanceWork","name","requiredCompetence","workDescription"]},"PaperDecisionReceiver":{"type":"object","properties":{"name":{"type":"string"},"streetAddress":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"}},"required":["city","name","postalCode","streetAddress"]},"PostalAddress":{"type":"object","properties":{"streetAddress":{"$ref":"#/components/schemas/StreetAddress"},"postalCode":{"type":"string"},"city":{"type":"string"}},"required":["city","postalCode","streetAddress"]},"TaydennysResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"applicationData":{"oneOf":[{"$ref":"#/components/schemas/JohtoselvitysHakemusDataResponse"},{"$ref":"#/components/schemas/KaivuilmoitusDataResponse"}]}},"required":["applicationData","id"]},"MuutosilmoitusResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sent":{"type":"string","format":"date-time"},"applicationData":{"oneOf":[{"$ref":"#/components/schemas/JohtoselvitysHakemusDataResponse"},{"$ref":"#/components/schemas/KaivuilmoitusDataResponse"}]}},"required":["applicationData","id"]},"Feature":{"type":"object","properties":{"crs":{"$ref":"#/components/schemas/Crs"},"bbox":{"type":"array","items":{"type":"number","format":"double"}},"properties":{"type":"object","additionalProperties":{}},"geometry":{"oneOf":[{"$ref":"#/components/schemas/Feature"},{"$ref":"#/components/schemas/FeatureCollection"},{"$ref":"#/components/schemas/GeometryCollection"},{"$ref":"#/components/schemas/LineString"},{"$ref":"#/components/schemas/MultiLineString"},{"$ref":"#/components/schemas/MultiPoint"},{"$ref":"#/components/schemas/MultiPolygon"},{"$ref":"#/components/schemas/Point"},{"$ref":"#/components/schemas/Polygon"}]},"id":{"type":"string"}}},"FeatureCollection":{"type":"object","properties":{"crs":{"$ref":"#/components/schemas/Crs"},"bbox":{"type":"array","items":{"type":"number","format":"double"}},"features":{"type":"array","items":{"$ref":"#/components/schemas/Feature"}}}},"GeoJsonObject":{"type":"object","discriminator":{"propertyName":"type"},"properties":{"crs":{"$ref":"#/components/schemas/Crs"},"bbox":{"type":"array","items":{"type":"number","format":"double"}},"type":{"type":"string"}},"required":["type"]},"GeometryCollection":{"allOf":[{"$ref":"#/components/schemas/GeoJsonObject"},{"type":"object","properties":{"geometries":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/Feature"},{"$ref":"#/components/schemas/FeatureCollection"},{"$ref":"#/components/schemas/GeometryCollection"},{"$ref":"#/components/schemas/LineString"},{"$ref":"#/components/schemas/MultiLineString"},{"$ref":"#/components/schemas/MultiPoint"},{"$ref":"#/components/schemas/MultiPolygon"},{"$ref":"#/components/schemas/Point"},{"$ref":"#/components/schemas/Polygon"}]}}}}]},"LineString":{"allOf":[{"$ref":"#/components/schemas/GeoJsonObject"},{"type":"object","properties":{"coordinates":{"type":"array","items":{"$ref":"#/components/schemas/LngLatAlt"}}}}]},"ModifyGeometriaRequest":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"featureCollection":{"$ref":"#/components/schemas/FeatureCollection"}}},"ModifyHankeRequest":{"type":"object","properties":{"onYKTHanke":{"type":"boolean","description":"Shared Public Utility Site (Yhteinen kunnallistekninen työmaa). Optional."},"nimi":{"type":"string","description":"Name of the project, must not be blank."},"kuvaus":{"type":"string","description":"Description of the project and the work done during it. Required for the project to be published."},"vaihe":{"type":"string","description":"Current stage of the project. Required for the hanke to be published.","enum":["OHJELMOINTI","SUUNNITTELU","RAKENTAMINEN"]},"omistajat":{"type":"array","description":"Project owners, contact information. At least one is required for the hanke to be published.","items":{"$ref":"#/components/schemas/ModifyHankeYhteystietoRequest"}},"rakennuttajat":{"type":"array","description":"Property developers, contact information. Not required for the hanke to be published.","items":{"$ref":"#/components/schemas/ModifyHankeYhteystietoRequest"}},"toteuttajat":{"type":"array","description":"Executor of the work. Not required for the hanke to be published.","items":{"$ref":"#/components/schemas/ModifyHankeYhteystietoRequest"}},"muut":{"type":"array","description":"Other contacts. Not required for the hanke to be published.","items":{"$ref":"#/components/schemas/ModifyHankeYhteystietoRequest"}},"tyomaaKatuosoite":{"type":"string","description":"Work site street address. Required for the hanke to be published.","maxLength":2000},"tyomaaTyyppi":{"type":"array","description":"Work site types. Not required for the hanke to be published.","items":{"type":"string","enum":["VESI","VIEMARI","SADEVESI","SAHKO","TIETOLIIKENNE","LIIKENNEVALO","ULKOVALAISTUS","KAAPPITYO","KAUKOLAMPO","KAUKOKYLMA","KAASUJOHTO","KISKOTYO","MUU","KADUNRAKENNUS","KADUN_KUNNOSSAPITO","KIINTEISTOLIITTYMA","SULKU_TAI_KAIVO","UUDISRAKENNUS","SANEERAUS","AKILLINEN_VIKAKORJAUS","VIHERTYO","RUNKOLINJA","NOSTOTYO","MUUTTO","PYSAKKITYO","KIINTEISTOREMONTTI","ULKOMAINOS","KUVAUKSET","LUMENPUDOTUS","YLEISOTILAISUUS","VAIHTOLAVA"]},"uniqueItems":true},"alueet":{"type":"array","items":{"$ref":"#/components/schemas/ModifyHankealueRequest"}}},"required":["alueet","nimi","omistajat","tyomaaTyyppi"]},"ModifyHankeYhteystietoRequest":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Id, set if this yhteystieto is not a new one."},"nimi":{"type":"string","description":"Contact name. Full name if an actual person."},"email":{"type":"string","description":"Contact email address"},"puhelinnumero":{"type":"string","description":"Phone number"},"organisaatioNimi":{"type":"string","description":"Organisation name"},"osasto":{"type":"string","description":"Contact department"},"rooli":{"type":"string","description":"Role of the contact"},"tyyppi":{"type":"string","description":"Contact type","enum":["YKSITYISHENKILO","YRITYS","YHTEISO"]},"ytunnus":{"type":"string","description":"Business id, for contacts with tyyppi other than YKSITYISHENKILO"},"yhteyshenkilot":{"type":"array","description":"IDs of the hanke kayttajat to contact for this contact","items":{"type":"string","format":"uuid"}}},"required":["email","nimi","yhteyshenkilot"]},"ModifyHankealueRequest":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Id, set if this hankealue is not a new one."},"nimi":{"type":"string","description":"Area name, must not be null or empty"},"haittaAlkuPvm":{"type":"string","format":"date-time","description":"Nuisance start date"},"haittaLoppuPvm":{"type":"string","format":"date-time","description":"Nuisance end date, must not be before haittaAlkuPvm"},"geometriat":{"$ref":"#/components/schemas/ModifyGeometriaRequest"},"kaistaHaitta":{"type":"string","description":"Street lane hindrance value and explanation","enum":["EI_VAIKUTA","YKSI_KAISTA_VAHENEE","YKSI_KAISTA_VAHENEE_KAHDELLA_AJOSUUNNALLA","USEITA_KAISTOJA_VAHENEE_AJOSUUNNILLA","YKSI_AJOSUUNTA_POISTUU_KAYTOSTA","USEITA_AJOSUUNTIA_POISTUU_KAYTOSTA"]},"kaistaPituusHaitta":{"type":"string","description":"Street lane hindrance length","enum":["EI_VAIKUTA_KAISTAJARJESTELYIHIN","PITUUS_ALLE_10_METRIA","PITUUS_10_99_METRIA","PITUUS_100_499_METRIA","PITUUS_500_METRIA_TAI_ENEMMAN"]},"meluHaitta":{"type":"string","description":"Noise nuisance","enum":["EI_MELUHAITTAA","SATUNNAINEN_MELUHAITTA","TOISTUVA_MELUHAITTA","JATKUVA_MELUHAITTA"]},"polyHaitta":{"type":"string","description":"Dust nuisance","enum":["EI_POLYHAITTAA","SATUNNAINEN_POLYHAITTA","TOISTUVA_POLYHAITTA","JATKUVA_POLYHAITTA"]},"tarinaHaitta":{"type":"string","description":"Vibration nuisance","enum":["EI_TARINAHAITTAA","SATUNNAINEN_TARINAHAITTA","TOISTUVA_TARINAHAITTA","JATKUVA_TARINAHAITTA"]},"haittojenhallintasuunnitelma":{"type":"object","additionalProperties":{"type":"string"},"description":"Nuisance control plan for this area"}},"required":["nimi"]},"MultiLineString":{"allOf":[{"$ref":"#/components/schemas/GeoJsonObject"},{"type":"object","properties":{"coordinates":{"type":"array","items":{"type":"array","items":{"$ref":"#/components/schemas/LngLatAlt"}}}}}]},"MultiPoint":{"allOf":[{"$ref":"#/components/schemas/GeoJsonObject"},{"type":"object","properties":{"coordinates":{"type":"array","items":{"$ref":"#/components/schemas/LngLatAlt"}}}}]},"MultiPolygon":{"allOf":[{"$ref":"#/components/schemas/GeoJsonObject"},{"type":"object","properties":{"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"$ref":"#/components/schemas/LngLatAlt"}}}}}}]},"Point":{"allOf":[{"$ref":"#/components/schemas/GeoJsonObject"},{"type":"object","properties":{"coordinates":{"$ref":"#/components/schemas/LngLatAlt"}}}]},"Geometriat":{"type":"object","description":"Geometry data","properties":{"id":{"type":"integer","format":"int32","description":"Id, set by the service"},"featureCollection":{"$ref":"#/components/schemas/FeatureCollection","description":"The geometry data"},"version":{"type":"integer","format":"int32","description":"Version, set by the service"},"createdByUserId":{"type":"string","description":"User id of the geometry data creator, set by the service"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp of last modification, set by the service"},"modifiedByUserId":{"type":"string","description":"User id of the last modifier, set by the service"},"modifiedAt":{"type":"string","format":"date-time","description":"Timestamp of last modification, set by the service"}},"required":["version"]},"Hanke":{"type":"object","description":"The project within which applications are processed.","properties":{"id":{"type":"integer","format":"int32","description":"Id, set by the service."},"hankeTunnus":{"type":"string","description":"Hanke identity for external purposes, set by the service.","example":"HAI24-123"},"onYKTHanke":{"type":"boolean","description":"Shared Public Utility Site (Yhteinen kunnallistekninen työmaa). Optional."},"nimi":{"type":"string","description":"Name of the project, must not be blank."},"kuvaus":{"type":"string","description":"Description of the project and the work done during it. Required for the project to be published."},"vaihe":{"type":"string","description":"Current stage of the project. Required for the hanke to be published.","enum":["OHJELMOINTI","SUUNNITTELU","RAKENTAMINEN"]},"version":{"type":"integer","format":"int32","description":"Version, set by the service."},"createdBy":{"type":"string","description":"User id of the Hanke creator, set by the service."},"createdAt":{"type":"string","format":"date-time","description":"Timestamp of creation, set by the service."},"modifiedBy":{"type":"string","description":"User id of the last modifier, set by the service."},"modifiedAt":{"type":"string","format":"date-time","description":"Timestamp of last modification, set by the service."},"deletionDate":{"type":"string","format":"date","description":"The date the completed hanke will be automatically deleted."},"status":{"type":"string","description":"Hanke current status, set by the service.","enum":["DRAFT","PUBLIC","COMPLETED"]},"generated":{"type":"boolean","description":"Indicates if Hanke data is generated, set by the service."},"omistajat":{"type":"array","description":"Project owners, contact information. At least one is required for the hanke to be published.","items":{"$ref":"#/components/schemas/HankeYhteystieto"}},"rakennuttajat":{"type":"array","description":"Property developers, contact information. Not required for the hanke to be published.","items":{"$ref":"#/components/schemas/HankeYhteystieto"}},"toteuttajat":{"type":"array","description":"Executor of the work. Not required for the hanke to be published.","items":{"$ref":"#/components/schemas/HankeYhteystieto"}},"muut":{"type":"array","description":"Other contacts. Not required for the hanke to be published.","items":{"$ref":"#/components/schemas/HankeYhteystieto"}},"tyomaaKatuosoite":{"type":"string","description":"Work site street address. Required for the hanke to be published.","maxLength":2000},"tyomaaTyyppi":{"type":"array","description":"Work site types. Not required for the hanke to be published.","items":{"type":"string","enum":["VESI","VIEMARI","SADEVESI","SAHKO","TIETOLIIKENNE","LIIKENNEVALO","ULKOVALAISTUS","KAAPPITYO","KAUKOLAMPO","KAUKOKYLMA","KAASUJOHTO","KISKOTYO","MUU","KADUNRAKENNUS","KADUN_KUNNOSSAPITO","KIINTEISTOLIITTYMA","SULKU_TAI_KAIVO","UUDISRAKENNUS","SANEERAUS","AKILLINEN_VIKAKORJAUS","VIHERTYO","RUNKOLINJA","NOSTOTYO","MUUTTO","PYSAKKITYO","KIINTEISTOREMONTTI","ULKOMAINOS","KUVAUKSET","LUMENPUDOTUS","YLEISOTILAISUUS","VAIHTOLAVA"]},"uniqueItems":true},"alueet":{"type":"array","description":"Hanke areas data. At least one alue is required for the hanke to be published.","items":{"$ref":"#/components/schemas/SavedHankealue"}},"alkuPvm":{"type":"string","format":"date-time"},"loppuPvm":{"type":"string","format":"date-time"}},"required":["alueet","generated","hankeTunnus","id","muut","nimi","omistajat","rakennuttajat","toteuttajat","tyomaaTyyppi"]},"HankeYhteystieto":{"type":"object","description":"Hanke contact","properties":{"id":{"type":"integer","format":"int32","description":"Id, set by the service"},"nimi":{"type":"string","description":"Contact name. Full name if an actual person."},"email":{"type":"string","description":"Contact email address"},"puhelinnumero":{"type":"string","description":"Phone number"},"organisaatioNimi":{"type":"string","description":"Organisation name"},"osasto":{"type":"string","description":"Contact department"},"rooli":{"type":"string","description":"Role of the contact"},"tyyppi":{"type":"string","description":"Contact type","enum":["YKSITYISHENKILO","YRITYS","YHTEISO"]},"ytunnus":{"type":"string","description":"Business id, for contacts with tyyppi other than YKSITYISHENKILO"},"yhteyshenkilot":{"type":"array","description":"Persons to contact for this contact","items":{"$ref":"#/components/schemas/Yhteyshenkilo"}},"createdBy":{"type":"string","description":"User id of the creator, set by the service"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp of creation, set by the service"},"modifiedBy":{"type":"string","description":"User id of the last modifier, set by the service"},"modifiedAt":{"type":"string","format":"date-time","description":"Timestamp of last modification, set by the service"}},"required":["email","nimi","yhteyshenkilot"]},"SavedHankealue":{"type":"object","description":"Area data of a Hanke","properties":{"id":{"type":"integer","format":"int32","description":"Area identity, set by the service"},"hankeId":{"type":"integer","format":"int32","description":"Hanke identity of this area"},"haittaAlkuPvm":{"type":"string","format":"date-time","description":"Nuisance start date, must not be null"},"haittaLoppuPvm":{"type":"string","format":"date-time","description":"Nuisance end date, must not be before haittaAlkuPvm"},"geometriat":{"$ref":"#/components/schemas/Geometriat","description":"Geometry data"},"kaistaHaitta":{"type":"string","description":"Street lane hindrance value and explanation","enum":["EI_VAIKUTA","YKSI_KAISTA_VAHENEE","YKSI_KAISTA_VAHENEE_KAHDELLA_AJOSUUNNALLA","USEITA_KAISTOJA_VAHENEE_AJOSUUNNILLA","YKSI_AJOSUUNTA_POISTUU_KAYTOSTA","USEITA_AJOSUUNTIA_POISTUU_KAYTOSTA"]},"kaistaPituusHaitta":{"type":"string","description":"Street lane hindrance length","enum":["EI_VAIKUTA_KAISTAJARJESTELYIHIN","PITUUS_ALLE_10_METRIA","PITUUS_10_99_METRIA","PITUUS_100_499_METRIA","PITUUS_500_METRIA_TAI_ENEMMAN"]},"meluHaitta":{"type":"string","description":"Noise nuisance","enum":["EI_MELUHAITTAA","SATUNNAINEN_MELUHAITTA","TOISTUVA_MELUHAITTA","JATKUVA_MELUHAITTA"]},"polyHaitta":{"type":"string","description":"Dust nuisance","enum":["EI_POLYHAITTAA","SATUNNAINEN_POLYHAITTA","TOISTUVA_POLYHAITTA","JATKUVA_POLYHAITTA"]},"tarinaHaitta":{"type":"string","description":"Vibration nuisance","enum":["EI_TARINAHAITTAA","SATUNNAINEN_TARINAHAITTA","TOISTUVA_TARINAHAITTA","JATKUVA_TARINAHAITTA"]},"nimi":{"type":"string","description":"Area name, must not be null or empty"},"tormaystarkasteluTulos":{"$ref":"#/components/schemas/TormaystarkasteluTulos","description":"Collision review result for this area"},"haittojenhallintasuunnitelma":{"type":"object","additionalProperties":{"type":"string"},"description":"Nuisance control plan for this area"}},"required":["nimi"]},"Yhteyshenkilo":{"type":"object","description":"Contact person","properties":{"id":{"type":"string","format":"uuid","description":"Id of the HankeKayttaja"},"etunimi":{"type":"string","description":"First name"},"sukunimi":{"type":"string","description":"Last name"},"sahkoposti":{"type":"string","description":"Email address"},"puhelinnumero":{"type":"string","description":"Phone number"}},"required":["etunimi","id","puhelinnumero","sahkoposti","sukunimi"]},"PermissionDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"HankeKayttaja ID"},"kayttooikeustaso":{"type":"string","description":"New access level in Hanke","enum":["KAIKKI_OIKEUDET","KAIKKIEN_MUOKKAUS","HANKEMUOKKAUS","HAKEMUSASIOINTI","KATSELUOIKEUS"]}},"required":["id","kayttooikeustaso"]},"PermissionUpdate":{"type":"object","properties":{"kayttajat":{"type":"array","description":"Permissions to update.","items":{"$ref":"#/components/schemas/PermissionDto"}}},"required":["kayttajat"]},"KayttajaUpdate":{"type":"object","properties":{"sahkoposti":{"type":"string","minLength":1},"puhelinnumero":{"type":"string","minLength":1},"etunimi":{"type":"string"},"sukunimi":{"type":"string"}},"required":["puhelinnumero","sahkoposti"]},"HankeKayttajaDto":{"type":"object","description":"Hanke user","properties":{"id":{"type":"string","format":"uuid","description":"Id, set by the service"},"sahkoposti":{"type":"string","description":"Email address"},"etunimi":{"type":"string","description":"First name"},"sukunimi":{"type":"string","description":"Last name"},"puhelinnumero":{"type":"string","description":"Phone number"},"kayttooikeustaso":{"type":"string","description":"Access level in Hanke","enum":["KAIKKI_OIKEUDET","KAIKKIEN_MUOKKAUS","HANKEMUOKKAUS","HAKEMUSASIOINTI","KATSELUOIKEUS"]},"roolit":{"type":"array","description":"User roles in Hanke","items":{"type":"string","enum":["OMISTAJA","RAKENNUTTAJA","TOTEUTTAJA","MUU"]}},"tunnistautunut":{"type":"boolean","description":"Has user logged in to view Hanke"},"kutsuttu":{"type":"string","format":"date-time","description":"When their latest invitation was sent"}},"required":["etunimi","id","puhelinnumero","roolit","sahkoposti","sukunimi","tunnistautunut"]},"ContactUpdate":{"type":"object","properties":{"sahkoposti":{"type":"string","minLength":1},"puhelinnumero":{"type":"string","minLength":1}},"required":["puhelinnumero","sahkoposti"]},"HakemusResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"alluid":{"type":"integer","format":"int32"},"alluStatus":{"type":"string","enum":["PRE_RESERVED","NOTE","PENDING_CLIENT","PENDING","WAITING_INFORMATION","INFORMATION_RECEIVED","HANDLING","RETURNED_TO_PREPARATION","WAITING_CONTRACT_APPROVAL","APPROVED","REJECTED","DECISIONMAKING","DECISION","OPERATIONAL_CONDITION","TERMINATED","FINISHED","CANCELLED","ARCHIVED","REPLACED","COMMENT_ADDED","ANONYMIZED"]},"applicationIdentifier":{"type":"string"},"applicationType":{"type":"string","enum":["CABLE_REPORT","EXCAVATION_NOTIFICATION"]},"applicationData":{"oneOf":[{"$ref":"#/components/schemas/JohtoselvitysHakemusDataResponse"},{"$ref":"#/components/schemas/KaivuilmoitusDataResponse"}]},"hankeTunnus":{"type":"string"},"valmistumisilmoitukset":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/ValmistumisilmoitusResponse"}}}},"required":["applicationData","applicationType","hankeTunnus","id"]},"ValmistumisilmoitusResponse":{"type":"object","properties":{"type":{"type":"string","enum":["TOIMINNALLINEN_KUNTO","TYO_VALMIS"]},"dateReported":{"type":"string","format":"date"},"reportedAt":{"type":"string","format":"date-time"}},"required":["dateReported","reportedAt","type"]},"TaydennysAttachmentMetadataDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fileName":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"integer","format":"int64"},"attachmentType":{"type":"string","enum":["MUU","LIIKENNEJARJESTELY","VALTAKIRJA"]},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"taydennysId":{"type":"string","format":"uuid"}},"required":["attachmentType","contentType","createdAt","createdByUserId","fileName","id","size","taydennysId"]},"GridCell":{"type":"object","properties":{"x":{"type":"integer","format":"int32"},"y":{"type":"integer","format":"int32"}},"required":["x","y"]},"PublicHankeGridCellRequest":{"type":"object","properties":{"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"cells":{"type":"array","items":{"$ref":"#/components/schemas/GridCell"}}},"required":["cells","endDate","startDate"]},"PublicGeometriat":{"type":"object","properties":{"featureCollection":{"$ref":"#/components/schemas/FeatureCollection"}}},"PublicHankeMinimal":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"hankeTunnus":{"type":"string"},"nimi":{"type":"string"},"alueet":{"type":"array","items":{"$ref":"#/components/schemas/PublicHankealueMinimal"}}},"required":["alueet","hankeTunnus","id","nimi"]},"PublicHankealueMinimal":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"hankeId":{"type":"integer","format":"int32"},"nimi":{"type":"string"},"haittaAlkuPvm":{"type":"string","format":"date-time"},"haittaLoppuPvm":{"type":"string","format":"date-time"},"geometriat":{"$ref":"#/components/schemas/PublicGeometriat"},"tormaystarkastelu":{"$ref":"#/components/schemas/TormaystarkasteluTulos"}},"required":["nimi"]},"MuutosilmoitusAttachmentMetadataDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fileName":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"integer","format":"int64"},"attachmentType":{"type":"string","enum":["MUU","LIIKENNEJARJESTELY","VALTAKIRJA"]},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"muutosilmoitusId":{"type":"string","format":"uuid"}},"required":["attachmentType","contentType","createdAt","createdByUserId","fileName","id","muutosilmoitusId","size"]},"HakemusSendRequest":{"type":"object","properties":{"paperDecisionReceiver":{"$ref":"#/components/schemas/PaperDecisionReceiver"}}},"Tunnistautuminen":{"type":"object","properties":{"tunniste":{"type":"string"}},"required":["tunniste"]},"TunnistautuminenResponse":{"type":"object","properties":{"kayttajaId":{"type":"string","format":"uuid"},"hankeTunnus":{"type":"string"},"hankeNimi":{"type":"string"}},"required":["hankeNimi","hankeTunnus","kayttajaId"]},"CreateHankeRequest":{"type":"object","properties":{"nimi":{"type":"string","description":"Name of the project, must not be blank.","maxLength":100},"perustaja":{"$ref":"#/components/schemas/HankePerustaja","description":"Required project founder details"}},"required":["nimi","perustaja"]},"HankePerustaja":{"type":"object","properties":{"sahkoposti":{"type":"string","description":"Email of the founding user. Users with sufficient access to the project can add the email address to project contacts and application forms. Haitaton uses it is used for sending notification emails."},"puhelinnumero":{"type":"string","description":"Phone number of the founding user. Users with sufficient access to the project can add the phone number to project contacts and application forms."}},"required":["puhelinnumero","sahkoposti"]},"HankeAttachmentMetadataDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fileName":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"integer","format":"int64"},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"hankeTunnus":{"type":"string"}},"required":["contentType","createdAt","createdByUserId","fileName","hankeTunnus","id","size"]},"NewUserRequest":{"type":"object","properties":{"etunimi":{"type":"string","description":"The first name of the user"},"sukunimi":{"type":"string","description":"The last name of the user"},"sahkoposti":{"type":"string","description":"The email address of the user. The invitation will be sent to this address."},"puhelinnumero":{"type":"string","description":"The phone number of the user."}},"required":["etunimi","puhelinnumero","sahkoposti","sukunimi"]},"CreateHakemusRequest":{"type":"object","discriminator":{"propertyName":"applicationType"},"properties":{"name":{"type":"string"},"hankeTunnus":{"type":"string"},"applicationType":{"type":"string","enum":["CABLE_REPORT","EXCAVATION_NOTIFICATION"]},"workDescription":{"type":"string"}},"required":["applicationType","hankeTunnus","name","workDescription"]},"CreateJohtoselvityshakemusRequest":{"allOf":[{"$ref":"#/components/schemas/CreateHakemusRequest"},{"type":"object","properties":{"postalAddress":{"$ref":"#/components/schemas/PostalAddressRequest"},"constructionWork":{"type":"boolean"},"maintenanceWork":{"type":"boolean"},"propertyConnectivity":{"type":"boolean"},"emergencyWork":{"type":"boolean"},"rockExcavation":{"type":"boolean"}}}],"required":["applicationType","constructionWork","emergencyWork","hankeTunnus","maintenanceWork","name","propertyConnectivity","rockExcavation","workDescription"]},"CreateKaivuilmoitusRequest":{"allOf":[{"$ref":"#/components/schemas/CreateHakemusRequest"},{"type":"object","properties":{"constructionWork":{"type":"boolean"},"maintenanceWork":{"type":"boolean"},"emergencyWork":{"type":"boolean"},"cableReportDone":{"type":"boolean"},"rockExcavation":{"type":"boolean"},"cableReports":{"type":"array","items":{"type":"string"}},"placementContracts":{"type":"array","items":{"type":"string"}},"requiredCompetence":{"type":"boolean"}}}],"required":["applicationType","cableReportDone","constructionWork","emergencyWork","hankeTunnus","maintenanceWork","name","requiredCompetence","workDescription"]},"DateReportRequest":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"required":["date"]},"ApplicationAttachmentMetadataDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fileName":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"integer","format":"int64"},"attachmentType":{"type":"string","enum":["MUU","LIIKENNEJARJESTELY","VALTAKIRJA"]},"createdByUserId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"applicationId":{"type":"integer","format":"int64"}},"required":["applicationId","attachmentType","contentType","createdAt","createdByUserId","fileName","id","size"]},"TormaystarkasteluRequest":{"type":"object","properties":{"geometriat":{"$ref":"#/components/schemas/Geometriat","description":"Geometry data"},"haittaAlkuPvm":{"type":"string","format":"date-time","description":"Nuisance start date"},"haittaLoppuPvm":{"type":"string","format":"date-time","description":"Nuisance end date, must not be before haittaAlkuPvm"},"kaistaHaitta":{"type":"string","description":"Street lane hindrance value","enum":["EI_VAIKUTA","YKSI_KAISTA_VAHENEE","YKSI_KAISTA_VAHENEE_KAHDELLA_AJOSUUNNALLA","USEITA_KAISTOJA_VAHENEE_AJOSUUNNILLA","YKSI_AJOSUUNTA_POISTUU_KAYTOSTA","USEITA_AJOSUUNTIA_POISTUU_KAYTOSTA"]},"kaistaPituusHaitta":{"type":"string","description":"Street lane hindrance length","enum":["EI_VAIKUTA_KAISTAJARJESTELYIHIN","PITUUS_ALLE_10_METRIA","PITUUS_10_99_METRIA","PITUUS_100_499_METRIA","PITUUS_500_METRIA_TAI_ENEMMAN"]}},"required":["geometriat","haittaAlkuPvm","haittaLoppuPvm","kaistaHaitta","kaistaPituusHaitta"]},"MultiValueMapStringString":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"properties":{"all":{"type":"object","additionalProperties":{"type":"string"},"writeOnly":true},"empty":{"type":"boolean"}}},"BackChannelLogoutError":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}},"required":["error"]},"PublicHanke":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"hankeTunnus":{"type":"string"},"nimi":{"type":"string"},"kuvaus":{"type":"string"},"alkuPvm":{"type":"string","format":"date-time"},"loppuPvm":{"type":"string","format":"date-time"},"vaihe":{"type":"string","enum":["OHJELMOINTI","SUUNNITTELU","RAKENTAMINEN"]},"tyomaaTyyppi":{"type":"array","items":{"type":"string","enum":["VESI","VIEMARI","SADEVESI","SAHKO","TIETOLIIKENNE","LIIKENNEVALO","ULKOVALAISTUS","KAAPPITYO","KAUKOLAMPO","KAUKOKYLMA","KAASUJOHTO","KISKOTYO","MUU","KADUNRAKENNUS","KADUN_KUNNOSSAPITO","KIINTEISTOLIITTYMA","SULKU_TAI_KAIVO","UUDISRAKENNUS","SANEERAUS","AKILLINEN_VIKAKORJAUS","VIHERTYO","RUNKOLINJA","NOSTOTYO","MUUTTO","PYSAKKITYO","KIINTEISTOREMONTTI","ULKOMAINOS","KUVAUKSET","LUMENPUDOTUS","YLEISOTILAISUUS","VAIHTOLAVA"]},"uniqueItems":true},"omistajat":{"type":"array","items":{"$ref":"#/components/schemas/PublicHankeYhteystieto"}},"alueet":{"type":"array","items":{"$ref":"#/components/schemas/PublicHankealue"}}},"required":["alkuPvm","alueet","hankeTunnus","id","kuvaus","loppuPvm","nimi","omistajat","tyomaaTyyppi","vaihe"]},"PublicHankeYhteystieto":{"type":"object","properties":{"organisaatioNimi":{"type":"string"}}},"PublicHankealue":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"hankeId":{"type":"integer","format":"int32"},"haittaAlkuPvm":{"type":"string","format":"date-time"},"haittaLoppuPvm":{"type":"string","format":"date-time"},"geometriat":{"$ref":"#/components/schemas/PublicGeometriat"},"kaistaHaitta":{"type":"string","enum":["EI_VAIKUTA","YKSI_KAISTA_VAHENEE","YKSI_KAISTA_VAHENEE_KAHDELLA_AJOSUUNNALLA","USEITA_KAISTOJA_VAHENEE_AJOSUUNNILLA","YKSI_AJOSUUNTA_POISTUU_KAYTOSTA","USEITA_AJOSUUNTIA_POISTUU_KAYTOSTA"]},"kaistaPituusHaitta":{"type":"string","enum":["EI_VAIKUTA_KAISTAJARJESTELYIHIN","PITUUS_ALLE_10_METRIA","PITUUS_10_99_METRIA","PITUUS_100_499_METRIA","PITUUS_500_METRIA_TAI_ENEMMAN"]},"meluHaitta":{"type":"string","enum":["EI_MELUHAITTAA","SATUNNAINEN_MELUHAITTA","TOISTUVA_MELUHAITTA","JATKUVA_MELUHAITTA"]},"polyHaitta":{"type":"string","enum":["EI_POLYHAITTAA","SATUNNAINEN_POLYHAITTA","TOISTUVA_POLYHAITTA","JATKUVA_POLYHAITTA"]},"tarinaHaitta":{"type":"string","enum":["EI_TARINAHAITTAA","SATUNNAINEN_TARINAHAITTA","TOISTUVA_TARINAHAITTA","JATKUVA_TARINAHAITTA"]},"nimi":{"type":"string"},"tormaystarkastelu":{"$ref":"#/components/schemas/TormaystarkasteluTulos"}},"required":["nimi"]},"GridMetadata":{"type":"object","properties":{"cellSizeMeters":{"type":"integer","format":"int32"},"originX":{"type":"number","format":"double"},"originY":{"type":"number","format":"double"},"maxX":{"type":"number","format":"double"},"maxY":{"type":"number","format":"double"}},"required":["cellSizeMeters","maxX","maxY","originX","originY"]},"Names":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"givenName":{"type":"string"}},"required":["firstName","givenName","lastName"]},"WhoamiResponse":{"type":"object","properties":{"hankeKayttajaId":{"type":"string","format":"uuid"},"kayttooikeustaso":{"type":"string","enum":["KAIKKI_OIKEUDET","KAIKKIEN_MUOKKAUS","HANKEMUOKKAUS","HAKEMUSASIOINTI","KATSELUOIKEUS"]},"kayttooikeudet":{"type":"array","items":{"type":"string","enum":["VIEW","MODIFY_VIEW_PERMISSIONS","EDIT","MODIFY_EDIT_PERMISSIONS","DELETE","MODIFY_DELETE_PERMISSIONS","EDIT_APPLICATIONS","MODIFY_APPLICATION_PERMISSIONS","RESEND_INVITATION","CREATE_USER","MODIFY_USER","DELETE_USER"]}}},"required":["kayttooikeudet","kayttooikeustaso"]},"DeleteInfo":{"type":"object","properties":{"activeHakemukset":{"type":"array","items":{"$ref":"#/components/schemas/HakemusDetails"}},"draftHakemukset":{"type":"array","items":{"$ref":"#/components/schemas/HakemusDetails"}},"onlyOmistajanYhteyshenkilo":{"type":"boolean"}},"required":["activeHakemukset","draftHakemukset","onlyOmistajanYhteyshenkilo"]},"HakemusDetails":{"type":"object","properties":{"nimi":{"type":"string"},"applicationIdentifier":{"type":"string"},"alluStatus":{"type":"string","enum":["PRE_RESERVED","NOTE","PENDING_CLIENT","PENDING","WAITING_INFORMATION","INFORMATION_RECEIVED","HANDLING","RETURNED_TO_PREPARATION","WAITING_CONTRACT_APPROVAL","APPROVED","REJECTED","DECISIONMAKING","DECISION","OPERATIONAL_CONDITION","TERMINATED","FINISHED","CANCELLED","ARCHIVED","REPLACED","COMMENT_ADDED","ANONYMIZED"]}},"required":["nimi"]},"HankeKayttajaResponse":{"type":"object","description":"Api response of user data of given Hanke","properties":{"kayttajat":{"type":"array","description":"Hanke users","items":{"$ref":"#/components/schemas/HankeKayttajaDto"}}},"required":["kayttajat"]},"HankkeenHakemuksetResponse":{"type":"object","properties":{"applications":{"type":"array","items":{"$ref":"#/components/schemas/HankkeenHakemusResponse"}}},"required":["applications"]},"HankkeenHakemusDataResponse":{"type":"object","properties":{"name":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"areas":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/JohtoselvitysHakemusalue"},{"$ref":"#/components/schemas/KaivuilmoitusAlue"}]}}},"required":["name"]},"HankkeenHakemusMuutosilmoitusResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sent":{"type":"string","format":"date-time"},"applicationData":{"$ref":"#/components/schemas/HankkeenHakemusDataResponse"}},"required":["applicationData","id"]},"HankkeenHakemusResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"alluid":{"type":"integer","format":"int32"},"alluStatus":{"type":"string","enum":["PRE_RESERVED","NOTE","PENDING_CLIENT","PENDING","WAITING_INFORMATION","INFORMATION_RECEIVED","HANDLING","RETURNED_TO_PREPARATION","WAITING_CONTRACT_APPROVAL","APPROVED","REJECTED","DECISIONMAKING","DECISION","OPERATIONAL_CONDITION","TERMINATED","FINISHED","CANCELLED","ARCHIVED","REPLACED","COMMENT_ADDED","ANONYMIZED"]},"applicationIdentifier":{"type":"string"},"applicationType":{"type":"string","enum":["CABLE_REPORT","EXCAVATION_NOTIFICATION"]},"applicationData":{"$ref":"#/components/schemas/HankkeenHakemusDataResponse"},"muutosilmoitus":{"$ref":"#/components/schemas/HankkeenHakemusMuutosilmoitusResponse"},"paatokset":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/PaatosResponse"}}}},"required":["applicationData","applicationType","id","paatokset"]},"PaatosResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"hakemusId":{"type":"integer","format":"int64"},"hakemustunnus":{"type":"string"},"tyyppi":{"type":"string","enum":["PAATOS","TOIMINNALLINEN_KUNTO","TYO_VALMIS"]},"tila":{"type":"string","enum":["NYKYINEN","KORVATTU"]},"nimi":{"type":"string"},"alkupaiva":{"type":"string","format":"date"},"loppupaiva":{"type":"string","format":"date"},"size":{"type":"integer","format":"int32"}},"required":["alkupaiva","hakemusId","hakemustunnus","id","loppupaiva","nimi","size","tila","tyyppi"]},"HakemusWithExtrasResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"alluid":{"type":"integer","format":"int32"},"alluStatus":{"type":"string","enum":["PRE_RESERVED","NOTE","PENDING_CLIENT","PENDING","WAITING_INFORMATION","INFORMATION_RECEIVED","HANDLING","RETURNED_TO_PREPARATION","WAITING_CONTRACT_APPROVAL","APPROVED","REJECTED","DECISIONMAKING","DECISION","OPERATIONAL_CONDITION","TERMINATED","FINISHED","CANCELLED","ARCHIVED","REPLACED","COMMENT_ADDED","ANONYMIZED"]},"applicationIdentifier":{"type":"string"},"applicationType":{"type":"string","enum":["CABLE_REPORT","EXCAVATION_NOTIFICATION"]},"applicationData":{"oneOf":[{"$ref":"#/components/schemas/JohtoselvitysHakemusDataResponse"},{"$ref":"#/components/schemas/KaivuilmoitusDataResponse"}]},"hankeTunnus":{"type":"string"},"valmistumisilmoitukset":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/ValmistumisilmoitusResponse"}}},"paatokset":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/PaatosResponse"}}},"taydennyspyynto":{"$ref":"#/components/schemas/TaydennyspyyntoResponse"},"taydennys":{"$ref":"#/components/schemas/TaydennysWithExtrasResponse"},"muutosilmoitus":{"$ref":"#/components/schemas/MuutosilmoitusWithExtrasResponse"}},"required":["applicationData","applicationType","hankeTunnus","id","paatokset"]},"MuutosilmoitusWithExtrasResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sent":{"type":"string","format":"date-time"},"applicationData":{"oneOf":[{"$ref":"#/components/schemas/JohtoselvitysHakemusDataResponse"},{"$ref":"#/components/schemas/KaivuilmoitusDataResponse"}]},"muutokset":{"type":"array","items":{"type":"string"}},"liitteet":{"type":"array","items":{"$ref":"#/components/schemas/MuutosilmoitusAttachmentMetadataDto"}}},"required":["applicationData","id","liitteet"]},"TaydennysWithExtrasResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"applicationData":{"oneOf":[{"$ref":"#/components/schemas/JohtoselvitysHakemusDataResponse"},{"$ref":"#/components/schemas/KaivuilmoitusDataResponse"}]},"muutokset":{"type":"array","items":{"type":"string"}},"liitteet":{"type":"array","items":{"$ref":"#/components/schemas/TaydennysAttachmentMetadataDto"}}},"required":["applicationData","id","liitteet","muutokset"]},"TaydennyspyyntoKenttaResponse":{"type":"object","properties":{"key":{"type":"string","enum":["CUSTOMER","INVOICING_CUSTOMER","PROPERTY_DEVELOPER","CONTRACTOR","REPRESENTATIVE","GEOMETRY","START_TIME","END_TIME","IDENTIFICATION_NUMBER","CLIENT_APPLICATION_KIND","APPLICATION_KIND","POSTAL_ADDRESS","WORK_DESCRIPTION","PROPERTY_IDENTIFICATION_NUMBER","ATTACHMENT","AREA","OTHER"]},"message":{"type":"string"}},"required":["key","message"]},"TaydennyspyyntoResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kentat":{"type":"array","items":{"$ref":"#/components/schemas/TaydennyspyyntoKenttaResponse"}}},"required":["id","kentat"]},"GdprError":{"type":"object","properties":{"code":{"type":"string"},"message":{"$ref":"#/components/schemas/LocalizedMessage"}},"required":["code","message"]},"GdprErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/GdprError"}}},"required":["errors"]},"LocalizedMessage":{"type":"object","properties":{"fi":{"type":"string"},"sv":{"type":"string"},"en":{"type":"string"}},"required":["en","fi","sv"]},"CollectionNode":{"type":"object","properties":{"key":{"type":"string"},"children":{"type":"array","items":{"$ref":"#/components/schemas/Node"}}},"required":["children","key"]},"Node":{"type":"object","properties":{"key":{"type":"string"}},"required":["key"]},"BannerResponse":{"type":"object","properties":{"label":{"$ref":"#/components/schemas/LocalizedText"},"text":{"$ref":"#/components/schemas/LocalizedText"}},"required":["label","text"]},"LocalizedText":{"type":"object","properties":{"fi":{"type":"string"},"sv":{"type":"string"},"en":{"type":"string"}},"required":["en","fi","sv"]},"HakemusDeletionResultDto":{"type":"object","properties":{"hankeDeleted":{"type":"boolean"}},"required":["hankeDeleted"]}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}}}