swagger: '2.0' info: description: Swedish Companies Registration Office API for electronic annual reports version: '2.1' title: API for electronic annual reports contact: {name: The Swedish Companies Registration Office Group for electronic annual reports, email: emsdiar@bolagsverket.se} license: {name: Public document according to the Swedish Press Act, url: 'http://www.notisum.se/rnp/sls/lag/19490105.htm#K2P3'} host: api.bolagsverket.se basePath: /lamna-in-arsredovisning/v2.1 schemes: [https] tags: - {name: inlamning, description: Services that receive electronic annual reports for signing} - {name: kontroll, description: Services complementing submission of electronic annual reports} paths: /skapa-inlamningtoken: post: tags: [inlamning] summary: Create token for verification and submission to separate space description: The service creates the token for use when verifying and submitting an annual report. The same token is used both as kontrolltoken in operation /kontrollera/{kontrolltoken} and as inlamningtoken in operation /inlamning/{inlamningtoken}. operationId: skapa-inlamningtoken consumes: [application/json;charset=utf-8] produces: [application/json;charset=utf-8] parameters: - name: anropsobjekt description: Personal identification number and organization number in: body required: true schema: {$ref: '#/definitions/SkapaInlamningTokenAnrop'} responses: '200': description: Tasks received schema: {$ref: '#/definitions/SkapaTokenOK'} '400': description: Bad request schema: {$ref: '#/definitions/Fel'} '403': description: Unauthorized user of service schema: {$ref: '#/definitions/Fel'} '404': description: Personal identification number is missing schema: {$ref: '#/definitions/Fel'} '500': description: Unspecified technical problem schema: {$ref: '#/definitions/Fel'} '503': description: The service is temporarily unavailable schema: {$ref: '#/definitions/Fel'} '504': description: Timeout schema: {$ref: '#/definitions/Fel'} /inlamning/{inlamningtoken}: post: tags: [inlamning] summary: Submit an annual report to the separate space belonging to the user for review and electronic signing. description: |- The service checks that the electronic annual report is well-formed and stores it in the separate space belonging to the user. If the document passes inspection response code 200 is returned and no further action is needed from the client (the annual report should be signed later using the web page). operationId: inlamning consumes: [application/json;charset=utf-8] produces: [application/json;charset=utf-8] parameters: - {name: inlamningtoken, in: path, description: Token for submission, required: true, type: string, format: uuid} - name: anropsobjekt description: Other information and the annual report in: body required: true schema: {$ref: '#/definitions/InlamningAnrop'} responses: '200': description: Annual report is submitted to separate space for later signature via web. schema: {$ref: '#/definitions/InlamningOK'} '400': description: Bad request schema: {$ref: '#/definitions/Fel'} '403': description: Unauthorized user of service schema: {$ref: '#/definitions/Fel'} '404': description: Organisation number missing schema: {$ref: '#/definitions/Fel'} '500': description: Unspecified technical problem schema: {$ref: '#/definitions/Fel'} '503': description: The service is temporarily unavailable schema: {$ref: '#/definitions/Fel'} '504': description: Timeout schema: {$ref: '#/definitions/Fel'} /kontrollera/{kontrolltoken}: post: tags: [kontroll] summary: Verify annual report before submission to separate space operationId: kontrollera consumes: [application/json;charset=utf-8] produces: [application/json;charset=utf-8] parameters: - {name: kontrolltoken, in: path, description: Token for verification, required: true, type: string, format: uuid} - name: anropsobjekt description: The annual report in: body required: true schema: {$ref: '#/definitions/KontrolleraAnrop'} responses: '200': description: The annual report is verified, see outcome. The user of the client software should be informed about the outcome. The annual report can be submitted to the separate space regardless of outcome. schema: {$ref: '#/definitions/KontrolleraSvar'} '400': description: Bad request schema: {$ref: '#/definitions/Fel'} '403': description: Unauthorized user of service schema: {$ref: '#/definitions/Fel'} '500': description: Unspecified technical problem schema: {$ref: '#/definitions/Fel'} '503': description: The service is temporarily unavailable schema: {$ref: '#/definitions/Fel'} '504': description: Timeout schema: {$ref: '#/definitions/Fel'} parameters: orgnrPathParam: {name: orgnr, in: path, required: true, type: string, pattern: '[0-9]{10}', description: 'Organisation number for the public company. Ten digits, no dash.'} definitions: Upplysning: type: object description: Contains further details on errors etc. properties: kod: {type: integer, format: int32, description: Code that describes the kind of information. Described in a separate document.} text: {type: string, description: Text that leaves further information.} typ: type: string description: Classification of the information - info, warning or error. enum: [info, warn, error] required: [kod, text, typ] Fel: type: object description: Provides detailed error information. properties: kod: {type: integer, format: int32, description: Code that describes the error. Described in a separate document.} text: {type: string, description: Text that leaves further information about the error.} detaljinformation: type: array description: Detailed information about the error items: {$ref: '#/definitions/Upplysning'} required: [kod, text] SkapaTokenOK: type: object properties: token: {type: string, format: uuid, description: Token for verification and submission} avtalstext: {type: string, description: Text to show to the end user.} avtalstextAndrad: {type: string, format: date, description: Date of last change of agreement text.} required: [token] InlamningOK: type: object properties: orgnr: {type: string, pattern: '[0-9]{10}', description: 'Organisation number for the public company. Ten digits, no dash.'} avsandare: {description: Personal identification number incl. century of person to whom the document is stored, type: string, pattern: '(19|20)[0-9]{10}'} undertecknare: {description: Personal ID number of the signer including century, type: string, pattern: '(19|20)[0-9]{10}'} handlingsinfo: {$ref: '#/definitions/Handlingsinfo'} url: {type: string, description: When uploading annual report the url is returned where the annual report is signed.} required: [orgnr, avsandare, undertecknare, handlingsinfon] SkapaInlamningTokenAnrop: type: object description: Query object for personal identification number and organization number properties: pnr: {description: Personal identification number incl. century of person to whom the document is to be stored., type: string, pattern: '(19|20)[0-9]{10}'} orgnr: {type: string, pattern: '[0-9]{10}', description: 'Organisation number for the public company. Ten digits, no dash.'} required: [pnr, orgnr] InlamningAnrop: type: object description: Call object for submission of annual report to separate space properties: undertecknare: {description: Personal ID number of the signer including century, type: string, pattern: '(19|20)[0-9]{10}'} epostadresser: description: When submitting annual report email recipients are used to notify that there is an annual report to sign. type: array items: {type: string, minLength: 6, maxLength: 250} kvittensepostadresser: description: Used to notify when the document is signed and submitted to the Swedish Companies Registration Office. type: array items: {type: string, minLength: 6, maxLength: 250} notifieringEpostadresser: description: When submitting an annual report or auditor's report, notifieringEpostadresser is used to notify the accounting consultant or auditor that a document has been uploaded. If, for example, the call concerns the uploading of the annual report, enter the e-mail address of the auditor here so that he or she is informed that an audit report is expected to be uploaded. Correspondingly, you can notify an accounting consultant if the upload concerns an audit report. type: array items: {type: string, minLength: 6, maxLength: 250} handling: {$ref: '#/definitions/Handling'} required: [undertecknare, handling] Handling: type: object description: An act and the type intended. properties: fil: {type: string, format: byte, description: E.g. annual report in iXBRL format. The file shall be encoded in UTF-8.} typ: type: string description: Describes the file with the type intended. If you submit the annual report with the audit report in the same file or without an audit report (where no one is required) you choose the type arsredovisning_komplett (annual report complete). Do you intend to submit an annual report with an audit report as a separate file choose the type arsredovisning_kompletteras (annual report supplemented). enum: [arsredovisning_komplett, arsredovisning_kompletteras, revisionsberattelse] required: [fil, typ] Handlingsinfo: type: object description: Information about the submitted document. properties: typ: type: string description: Describes the file with the type intended. If you submit the annual report with the audit report in the same file or without an audit report (where no one is required) you choose the type arsredovisning_komplett (annual report complete). Do you intend to submit an annual report with an audit report as a separate file choose the type arsredovisning_kompletteras (annual report supplemented). enum: [arsredovisning_komplett, arsredovisning_kompletteras, revisionsberattelse] dokumentlangd: {type: integer, format: int32, description: The length in bytes of the submitted document} idnummer: {type: string, description: ID number of the document in the separate space belonging to the user. For debugging use only.} sha256checksumma: {type: string, format: byte, description: SHA-256 checksum of the submitted document} required: [typ, dokumentlangd, idnummer, sha256checksumma] KontrolleraAnrop: type: object description: Call object for verification of the file before submission to separate space properties: handling: {$ref: '#/definitions/Handling'} required: [handling] KontrolleraSvar: type: object description: Result of verified annual report properties: orgnr: {type: string, pattern: '[0-9]{10}', description: 'Organisation number for the public company. Ten digits, no dash.'} utfall: type: array description: List of outcomes from verification items: {$ref: '#/definitions/KontrolleraUtfall'} KontrolleraUtfall: type: object description: Outcome from verification. properties: kod: {type: string, description: Code corresponding to outcome. Described in a separate document.} text: {type: string, description: Text explaining the outcome.} typ: type: string description: Classification of the outcome - info, warning or error. enum: [info, warn, error] tekniskinformation: type: array description: Technical information about the outcome, only for logging and troubleshooting. items: {$ref: '#/definitions/KontrolleraUtfallTekniskInformation'} required: [kod, text, typ] KontrolleraUtfallTekniskInformation: type: object description: Technical information about the outcome. properties: meddelande: {type: string, description: Technical message} element: {type: string} varde: {type: string} externalDocs: {description: Information about electronic annual reports, url: 'http://bolagsverket.se/om/oss/utveckling-av-digitala-tjanster/digital-ingivning'}