# This is a template # # 'host', 'basePath' and 'paths./pushmeddelande' must be adjusted by the implementor. # # Changes from v1.3 # - Removed http protocol (only https allowed) # - Removed properties 'idnummer' and 'idnummerRevisionsberattelse' in 'data'. # - Added variant to enum 'handling' # - Increased max length of properties 'idnummer' and 'digest' # swagger: '2.0' info: description: The Swedish Companies Registration Office API for push notifications regarding status changes on electronically submitted annual reports. version: '2.0' title: API for push notifications regarding annual reports host: programvaruleverantor.example.com basePath: /bolagsverket/ schemes: - https paths: '/pushmeddelande': post: summary: Receive annual reporting events from the Swedish Companies Registration Office. operationId: pushmeddelande consumes: - "application/json" parameters: - name: Auth in: header type: string required: false description: Contains the authKey entered when the subscription was created. - name: pushmeddelande in: body required: true schema: $ref: '#/definitions/Pushmeddelande' responses: '200': description: OK '201': description: OK '202': description: OK '204': description: OK default: description: Other statuses will be counted as errors. The Swedish Companies Registration Office will then try to send the same message again. definitions: Pushmeddelande: type: object description: Push message sent from the Swedish Companies Registration Office to those who subscribe to events with type and ID. properties: typ: type: string maxLength: 20 description: Type of event. Always starts with AR for push notifications regarding annual reports. example: AR-v2 id: type: string maxLength: 40 description: The identity of the event in the form of the organization number for the organization. example: "5566778899" nr: type: integer format: int64 description: | Sequence number of the event. Gaps in this sequence mean that there are events that have not reached the external party. If a test message is sent, these numbers get -1 and can be ignored. example: 12 tid: type: string format: date-time description: Time when the event occurred. data: $ref: '#/definitions/Arsredovisningshandelse' required: ["typ", "id", "nr", "tid", "data"] Arsredovisningshandelse: type: object description: Information on status changes for electronically submitted annual reports. properties: version: type: string maxLength: 10 pattern: '[0-9]+\.[0-9]+' description: Version for the annual report event. example: '2.0' handlingsinfo: type: array description: | Contains information about one / several submitted document(s) on a company registration number. Test messages (status 'test') have no documents items: $ref: '#/definitions/Handlingsinfo' minItems: 0 status: type: string description: Current status of the annual report. Status 'test' does not occur when events are fetched via API enum: - arsred_inkommen - arsred_registrerad - arsred_avslutad_ej_registrerad - arsred_forelaggande_skickat - arsred_komplettering_inkommen - test required: ["version", "status", "handlingsinfo"] Handlingsinfo: type: object properties: handling: type: string description: >- Specifies the type of document, eg arsredovisning (annual report). There is always an annual report (main document) included in the list. If the audit report is submitted separately, it is also included in the list. If the annual report is submitted together with a certificate (different certificates depending on the type of organization), then one of the certificate types is included in the list. enum: - arsredovisning - revisionsberattelse - faststallelseintyg - bestyrkandeintyg idnummer: type: string maxLength: 36 description: Unique identification number for the document submitted. example: '30acf69f-26b4-4192-8bf1-c470bb79e9ee' kontrollsumma: $ref: '#/definitions/Kontrollsumma' required: ["handling", "idnummer"] Kontrollsumma: type: object description: Contains the checksum, algorithm and possible information in case an error has occurred for a specific document. properties: digest: type: string format: byte description: The checksum contained in the file. maxLength: 100 example: WhiJ4NAOkpwco83BSrAIuTjGvEIwRlDbPtoTO31J8HA= algoritm: type: string description: Algorithm used to generate checksum. example: SHA-256 upplysning: type: string description: An information is displayed when the checksum in the file does not match the contents of the file. example: Kontrollsumman stämmer inte required: ["digest", "algoritm"]