swagger: '2.0' info: description: Swedish Companies Registration Office API for subscription to annual report events version: '1.1' title: API for subscription to annual report events 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.1 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 urls 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: '202': {description: Accepted} '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'} get: tags: [prenumeration] summary: Retrieve subscriptions description: The service retrieves subscriptions available for a specific url, org. number, from date, end date or combinations thereof. At least one (1) search criteria must be specified. operationId: hamta-prenumerationer consumes: [application/json;charset=utf-8] produces: [application/json;charset=utf-8] parameters: - {in: query, name: url, type: string, description: URL, required: false} - {in: query, name: orgnr, type: string, pattern: '[0-9]{10}', description: Organization number for subscription., required: false} - {in: query, name: from, type: string, format: date, description: From date when the subscription was registered, required: false} - {in: query, name: tom, type: string, format: date, description: End date when the subscription was registered, required: false} responses: '200': description: OK schema: {$ref: '#/definitions/HamtaPrenumerationerOK'} '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'} 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: '202': {description: Accepted} '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'} 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] Prenumeration: type: object description: Information for subscription. properties: url: {description: URL for subscription to annual report events., type: string} orgnr: {description: Organization number for subscription., type: string, pattern: '[0-9]{10}'} authKey: {description: Subscription key (optional). This key is sent with when sending events and can be used to ensure that it is the Swedish Companies Registration Office that sent the event., type: string, maxLength: 40} skickaTestmeddelande: {description: 'If ''true'', a test message is sent immediately when the subscription is created. This test message has number -1.', type: boolean, default: false} required: [url, orgnr] HamtaPrenumerationerOK: type: object description: Results for retrieving subscriptions to a URL. properties: prenumerationer: type: array items: {$ref: '#/definitions/LagradPrenumeration'} required: [prenumerationer] LagradPrenumeration: type: object description: Information about existing subscription at requested URL. properties: url: {description: URL for subscription to annual report events., type: string} orgnr: {description: Organization number for subscription., type: string, pattern: '[0-9]{10}'} registrerad: {description: Time when the subscription was registered., type: string, format: date-time} avslutas: {description: Date after which the subscription is automatically removed., type: string, format: date} required: [url, orgnr, registrerad, avslutas] 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 subscription. Om det utelämnas tas alla prenumerationer på angiven url bort., type: string, pattern: '[0-9]{10}'} required: [url] externalDocs: {description: Information aboud electronic annual reports, url: 'http://bolagsverket.se/om/oss/utveckling-av-digitala-tjanster/digital-ingivning'}