{"components":{"schemas":{"io.roaring.api.company.currentstate.input.StartInput":{"properties":{"companyIds":{"description":"Array of company identifiers for which to fetch current information data","items":{"description":"Array of company identifiers for which to fetch current information data","type":"string"},"type":"array"},"services":{"description":"Array of service names from which fetch current information data","items":{"description":"Array of service names from which fetch current information data","type":"string"},"type":"array"}},"required":["companyIds","services"]},"io.roaring.api.company.currentstate.resource.CompanyIdsFileValidationResult":{"properties":{"badIdsQuantity":{"description":"Count of lines having values not looking like companyId","format":"int32","nullable":true,"type":"integer"},"contentType":{"description":"Content type of the file","nullable":true,"type":"string"},"fileName":{"description":"Name of the file","type":"string"},"fileSize":{"description":"Size of the file","format":"float","type":"number"},"fileSizeUnit":{"description":"Measurement of file size (B - bytes, K - kilobytes, M - megabytes)","type":"string"},"goodIdsQuantity":{"description":"Count of lines having values looking like companyId","format":"int32","nullable":true,"type":"integer"},"valid":{"description":"Whether companyIds file is valid","type":"boolean"},"validationMessage":{"description":"Descriptions of found validation errors","nullable":true,"type":"string"}},"required":["valid","fileSize","fileSizeUnit","fileName"]},"io.roaring.api.company.currentstate.resource.CurrentInformationExecutionResult":{"properties":{"protocol":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.CurrentInformationProtocol"},"status":{"$ref":"#/components/schemas/io.roaring.api.company.resource.SearchResultStatus"},"task":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.CurrentInformationTask"}},"required":["status"]},"io.roaring.api.company.currentstate.resource.CurrentInformationProtocol":{"properties":{"services":{"description":"List of protocol for each included service","items":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.CurrentInformationServiceProtocol"},"type":"array"}},"required":["services"]},"io.roaring.api.company.currentstate.resource.CurrentInformationResult":{"properties":{"status":{"$ref":"#/components/schemas/io.roaring.api.company.resource.SearchResultStatus"},"task":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.CurrentInformationTask"}},"required":["status"]},"io.roaring.api.company.currentstate.resource.CurrentInformationServiceProtocol":{"properties":{"delivered":{"description":"List of company identifiers for which generated data is delivered successfully","items":{"description":"List of company identifiers for which generated data is delivered successfully","type":"string"},"nullable":true,"type":"array"},"deliveredCount":{"description":"Count of company identifiers for which generated data is delivered successfully","format":"int32","nullable":true,"type":"integer"},"deliveryFailed":{"description":"List of company identifier, failure message and code for failures happened while delivering generated data","items":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.ProtocolFailure"},"nullable":true,"type":"array"},"deliveryFailedCount":{"description":"Count of company identifiers for which delivery failed","format":"int32","nullable":true,"type":"integer"},"generated":{"description":"List of company identifiers for which data is generated successfully","items":{"description":"List of company identifiers for which data is generated successfully","type":"string"},"nullable":true,"type":"array"},"generatedCount":{"description":"Count of company identifiers for which data is generated successfully","format":"int32","nullable":true,"type":"integer"},"notFound":{"description":"List of company identifiers for which no data found","items":{"description":"List of company identifiers for which no data found","type":"string"},"nullable":true,"type":"array"},"notFoundCount":{"description":"Count of company identifiers for which no data found","format":"int32","nullable":true,"type":"integer"},"pending":{"description":"List of company identifiers which have not been processed yet","items":{"description":"List of company identifiers which have not been processed yet","type":"string"},"nullable":true,"type":"array"},"pendingCount":{"description":"Count of company identifiers which have not been processed yet","format":"int32","nullable":true,"type":"integer"},"serviceName":{"description":"Name of service","type":"string"},"validationFailed":{"description":"List of company identifier and validation message for failures happened when generating data","items":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.ProtocolFailure"},"nullable":true,"type":"array"},"validationFailedCount":{"description":"Count of company identifiers for which validation failed during generating data","format":"int32","nullable":true,"type":"integer"}},"required":["serviceName"]},"io.roaring.api.company.currentstate.resource.CurrentInformationTask":{"properties":{"companyIdsCount":{"description":"Count of companies included into task","format":"int32","type":"integer"},"completedAt":{"description":"Date of current information task completion (Date in ISO 8601 standard, UTC)","nullable":true,"type":"string"},"deliveredCount":{"description":"Count of delivered events","format":"int32","type":"integer"},"deliveryFailedCount":{"description":"Count of delivery failures","format":"int32","nullable":true,"type":"integer"},"generatedCount":{"description":"Count of generated events","format":"int32","type":"integer"},"id":{"description":"Id of current information task","type":"string"},"lastModifiedAt":{"description":"Date of current information task last modification (Date in ISO 8601 standard, UTC)","nullable":true,"type":"string"},"notFoundCount":{"description":"Count of not found occurrences","format":"int32","nullable":true,"type":"integer"},"services":{"description":"List of services for which to generate current information events","items":{"description":"List of services for which to generate current information events","type":"string"},"type":"array"},"startedAt":{"description":"Date of current information task creation (Date in ISO 8601 standard, UTC)","type":"string"},"status":{"description":"Status of current information task (new, generating, complete)","enum":["new","generating","completed"],"type":"string"},"validationFailedCount":{"description":"Count of validation failures","format":"int32","nullable":true,"type":"integer"},"webhookId":{"description":"Id of webhook to which to send current information events","type":"string"}},"required":["id","status","companyIdsCount","generatedCount","deliveredCount","startedAt","services","webhookId"]},"io.roaring.api.company.currentstate.resource.CurrentInformationsResult":{"properties":{"status":{"$ref":"#/components/schemas/io.roaring.api.company.resource.SearchResultStatus"},"tasks":{"description":"List of tasks performed by organization","items":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.CurrentInformationTask"},"nullable":true,"type":"array"}},"required":["status"]},"io.roaring.api.company.currentstate.resource.ProtocolFailure":{"properties":{"companyId":{"description":"Company identifier","type":"string"},"failure":{"description":"Failure message","type":"string"},"failureCode":{"description":"Failure code if any","format":"int32","nullable":true,"type":"integer"}},"required":["companyId","failure"]},"io.roaring.api.company.currentstate.resource.ServiceInfo":{"properties":{"api":{"description":"Name of api","type":"string"},"apiVersion":{"description":"Version of api","type":"string"},"countryCode":{"description":"Iso2 country code of api","type":"string"},"name":{"description":"Name of a service which could be used as parameter when starting current information task","type":"string"}},"required":["name","api","apiVersion","countryCode"]},"io.roaring.api.company.currentstate.resource.ServicesInfoResult":{"properties":{"services":{"description":"List of available services","items":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.ServiceInfo"},"type":"array"},"status":{"$ref":"#/components/schemas/io.roaring.api.company.resource.SearchResultStatus"}},"required":["services","status"]},"io.roaring.api.company.currentstate.resource.Webhook":{"properties":{"eventTypes":{"description":"List of event types bound to webhook","items":{"description":"List of event types bound to webhook","type":"string"},"type":"array"},"id":{"description":"Identificator of webhook","type":"string"},"name":{"description":"Name of webhook","type":"string"},"url":{"description":"Url of webhook","type":"string"}},"required":["id","name","url","eventTypes"]},"io.roaring.api.company.currentstate.resource.WebhooksResult":{"properties":{"status":{"$ref":"#/components/schemas/io.roaring.api.company.resource.SearchResultStatus"},"webhooks":{"description":"List of found webhooks","items":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.Webhook"},"nullable":true,"type":"array"}},"required":["status"]},"io.roaring.api.company.resource.BadRequest":{"properties":{"attributes":{"items":{"$ref":"#/components/schemas/io.roaring.api.company.resource.RequestAttribute"},"nullable":true,"type":"array"},"error":{"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["error"]},"io.roaring.api.company.resource.RequestAttribute":{"properties":{"attribute":{"nullable":true,"type":"string"},"message":{"type":"string"},"value":{"nullable":true,"type":"string"}},"required":["message"]},"io.roaring.api.company.resource.SearchResultStatus":{"properties":{"code":{"format":"int32","type":"integer"},"text":{"type":"string"}},"required":["code","text"]},"io.roaring.api.company.resource.ServerError":{"properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}},"securitySchemes":{"OAuth2":{"description":"All requests require authentication via OAuth2 client credentials.\n\nBase URL: https://api.roaring.io\n\n1. Obtain a Consumer key and Consumer secret from https://developer.roaring.io/keys\n   (separate sandbox and production pairs).\n2. Request an access token by POSTing to the token endpoint:\n\n   POST https://api.roaring.io/token\n   Content-Type: application/x-www-form-urlencoded\n   Authorization: Basic base64(consumer-key:consumer-secret)\n\n   body: grant_type=client_credentials\n\n   Tokens are valid for 3600 seconds. The response contains an access_token of\n   type Bearer.\n3. Send the access token on every API call:\n\n   Authorization: Bearer <access_token>","flows":{"clientCredentials":{"tokenUrl":"https://api.roaring.io/token","scopes":{}}},"type":"oauth2"}}},"info":{"description":"Provides current information for specified companies and services\n\nAll requests require authentication via OAuth2 client credentials.\n\nBase URL: https://api.roaring.io\n\n1. Obtain a Consumer key and Consumer secret from https://developer.roaring.io/keys\n   (separate sandbox and production pairs).\n2. Request an access token by POSTing to the token endpoint:\n\n   POST https://api.roaring.io/token\n   Content-Type: application/x-www-form-urlencoded\n   Authorization: Basic base64(consumer-key:consumer-secret)\n\n   body: grant_type=client_credentials\n\n   Tokens are valid for 3600 seconds. The response contains an access_token of\n   type Bearer.\n3. Send the access token on every API call:\n\n   Authorization: Bearer <access_token>","title":"Current Information API","version":"1.0","x-logo":{"url":"https://assets.roaring.io/svg/dataUpdaterIcon.svg"}},"openapi":"3.0.1","paths":{"/services":{"get":{"description":"Get available services which could be used to start current information task","operationId":"services","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.ServicesInfoResult"}}},"description":"OK, successfull response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.resource.BadRequest"}}},"description":"Returned when something is wrong in the request, e.g. failed argument validation or arguments are missing"},"404":{"description":"Requested resource could not be found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.resource.ServerError"}}},"description":"An internal server error occurred, please contact the system administrator with information on the error"}},"summary":"List available services","tags":["services"]}},"/tasks":{"get":{"description":"Fetch information about all current information tasks performed by user","operationId":"tasks","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.CurrentInformationsResult"}}},"description":"OK, successfull response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.resource.BadRequest"}}},"description":"Returned when something is wrong in the request, e.g. failed argument validation or arguments are missing"},"404":{"description":"Requested resource could not be found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.resource.ServerError"}}},"description":"An internal server error occurred, please contact the system administrator with information on the error"}},"summary":"List current information tasks performed by user","tags":["currentInformations"]}},"/startWithFile/{webhookId}":{"put":{"description":"Starts current information task for specified services and companies from a file","operationId":"startWithFile","parameters":[{"description":"Id of webhook to which to send current information events","in":"path","name":"webhookId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"companyIds":{"description":"text file with company id-s each in a new line","format":"binary","type":"string"},"services":{"description":"list of service names","items":{"type":"string"},"type":"array"}},"type":"object"}}},"description":"Input data for starting current information task having organization numbers in a file and services in a parameter","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.CurrentInformationResult"}}},"description":"OK, successfull response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.resource.BadRequest"}}},"description":"Returned when something is wrong in the request, e.g. failed argument validation or arguments are missing"},"404":{"description":"Requested resource could not be found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.resource.ServerError"}}},"description":"An internal server error occurred, please contact the system administrator with information on the error"}},"summary":"Start current information task with file","tags":["currentInformation"]}},"/validate":{"put":{"description":"Validate the file has good company ids","operationId":"validateCompanyIdsFile","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"text file with company id-s each in a new line","format":"binary","type":"string"}},"type":"object"}}},"description":"File with company ids each in a new line","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.CompanyIdsFileValidationResult"}}},"description":"OK, successfull response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.resource.BadRequest"}}},"description":"Returned when something is wrong in the request, e.g. failed argument validation or arguments are missing"},"404":{"description":"Requested resource could not be found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.resource.ServerError"}}},"description":"An internal server error occurred, please contact the system administrator with information on the error"}},"summary":"Validate company ids file","tags":["validation"]}},"/start/{webhookId}":{"put":{"description":"Starts current information task for specified companies and services","operationId":"start","parameters":[{"description":"Id of webhook to which to send current information events","in":"path","name":"webhookId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.input.StartInput"}}},"description":"Input data for starting current information task","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.CurrentInformationResult"}}},"description":"OK, successfull response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.resource.BadRequest"}}},"description":"Returned when something is wrong in the request, e.g. failed argument validation or arguments are missing"},"404":{"description":"Requested resource could not be found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.resource.ServerError"}}},"description":"An internal server error occurred, please contact the system administrator with information on the error"}},"summary":"Start current information task","tags":["currentInformation"]}},"/status/{currentInformationId}":{"get":{"description":"Get status of current information task for specified task id","operationId":"status","parameters":[{"description":"Id of current information task","in":"path","name":"currentInformationId","required":true,"schema":{"type":"string"}},{"description":"Whether to include current information task execution protocol, default false","in":"query","name":"withProtocol","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.CurrentInformationExecutionResult"}}},"description":"OK, successfull response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.resource.BadRequest"}}},"description":"Returned when something is wrong in the request, e.g. failed argument validation or arguments are missing"},"404":{"description":"Requested resource could not be found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.resource.ServerError"}}},"description":"An internal server error occurred, please contact the system administrator with information on the error"}},"summary":"Get status of current information task","tags":["currentInformation"]}},"/webhooks":{"get":{"description":"Get available webhooks which could be used to start current information task","operationId":"webhooks","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.currentstate.resource.WebhooksResult"}}},"description":"OK, successfull response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.resource.BadRequest"}}},"description":"Returned when something is wrong in the request, e.g. failed argument validation or arguments are missing"},"404":{"description":"Requested resource could not be found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.company.resource.ServerError"}}},"description":"An internal server error occurred, please contact the system administrator with information on the error"}},"summary":"List available webhooks","tags":["webhooks"]}}},"security":[{"OAuth2":[]}],"servers":[{"url":"https://api.roaring.io/se/company/current-information/1.0"}],"x-category":"company","x-countries":["global"],"x-id":"CurrentInformationApi"}