swagger: '2.0' info: description: Swedish Companies Registration Office API for subscription to annual report events version: '1.0' title: API for subscription to annual report events termsOfService: http://diar.bolagsverket.se/api/terms/ 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: /hantera-arsredovisningsprenumerationer/v1.0 schemes: [https] tags: - {name: prenumeration, description: Services for management of subscriptions to annual report events} paths: /handelseprenumeration: post: tags: [prenumeration] summary: Subscribe to annual report events description: The service handles requests for subscriptions to an url and verifies that the supplied organization numbers are valid. operationId: prenumerera consumes: [application/json;charset=utf-8] produces: [application/json;charset=utf-8] parameters: - name: anropsobjekt description: URL and organisation number in: body required: true schema: {$ref: '#/definitions/PrenumerationAnrop'} responses: '200': description: OK schema: {$ref: '#/definitions/PrenumerationOK'} '400': description: Bad request schema: {$ref: '#/definitions/Fel'} '403': description: Unauthorized user of service schema: {$ref: '#/definitions/Fel'} '404': description: No such subscription 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'} delete: tags: [prenumeration] summary: Terminate subscription to annual report events description: The service handles requests for termination of subscriptions to annual report events. operationId: avsluta-prenumeration consumes: [application/json;charset=utf-8] produces: [application/json;charset=utf-8] parameters: - name: anropsobjekt description: URL and organisation number in: body required: true schema: {$ref: '#/definitions/AvslutaPrenumerationAnrop'} responses: '200': description: OK schema: {$ref: '#/definitions/AvslutaPrenumerationOK'} '400': description: Bad request schema: {$ref: '#/definitions/Fel'} '403': description: Unauthorized user of service schema: {$ref: '#/definitions/Fel'} '404': description: No such subscription 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'} 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] PrenumerationAnrop: type: object description: Call object for subscriptions properties: prenumerationer: type: array items: {$ref: '#/definitions/Prenumeration'} required: [prenumerationer] PrenumerationOK: type: object description: Response object for subscription creation. Contains all subscriptions for the url:s that were supplied. properties: prenumerationer: type: array items: {$ref: '#/definitions/LagradPrenumeration'} required: [prenumerationer] Prenumeration: type: object description: Uppgifter för prenumeration. properties: url: {description: URL for subscription to annual report events., type: string} orgnr: {description: Organisationsnummer för prenumeration., type: string, pattern: '[0-9]{10}'} authKey: {description: Nyckel för prenumerationen (valfri). Dennna nyckel skickas med vid utskick av händelser och kan användas för att säkerställa att det är bolagsverket som skickat händelsen., type: string, maxLength: 40} skickaTestmeddelande: {description: Om 'true' skickas ett testmeddelande direkt när prenumerationen skapats. Detta testmeddelande har nummer -1., type: boolean, default: false} required: [url, orgnr] LagradPrenumeration: type: object description: Information about new or existing subscriptions. properties: url: {description: URL for subscription to annual report events., type: string} orgnr: {description: Organisationsnummer för prenumeration., type: string, pattern: '[0-9]{10}'} required: [url, orgnr] AvslutaPrenumerationAnrop: type: object description: Call object for subscriptions. properties: url: {description: URL for subscription to annual report events., type: string} orgnr: {description: 'Organization number for this subscription. If removed, all subscriptions for this URL are removed.', type: string, pattern: '[0-9]{10}'} required: [url] AvslutaPrenumerationOK: type: object description: Response object for termination of subscription. properties: orgnr: type: array items: {description: Organization numbers of all terminated subscriptions ., type: string, pattern: '[0-9]{10}'} required: [orgnr] externalDocs: {description: Information aboud electronic annual reports, url: 'http://bolagsverket.se/om/oss/utveckling-av-digitala-tjanster/digital-ingivning'}