{"components":{"schemas":{"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"]},"io.roaring.api.global.dataupdater.input.StartInput":{"properties":{"companyIds":{"description":"Array of company identifiers for which to fetch data updater data","items":{"description":"Array of company identifiers for which to fetch data updater data","type":"string"},"type":"array"},"services":{"description":"Array of service names from which fetch data updater data","items":{"description":"Array of service names from which fetch data updater data","type":"string"},"type":"array"}},"required":["companyIds","services"]},"io.roaring.api.global.dataupdater.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.global.dataupdater.resource.DataUpdaterExecutionResult":{"properties":{"protocol":{"$ref":"#/components/schemas/io.roaring.api.global.dataupdater.resource.DataUpdaterProtocol"},"status":{"$ref":"#/components/schemas/io.roaring.api.company.resource.SearchResultStatus"},"task":{"$ref":"#/components/schemas/io.roaring.api.global.dataupdater.resource.DataUpdaterTask"}},"required":["status"]},"io.roaring.api.global.dataupdater.resource.DataUpdaterProtocol":{"properties":{"services":{"description":"List of protocol for each included service","items":{"$ref":"#/components/schemas/io.roaring.api.global.dataupdater.resource.DataUpdaterServiceProtocol"},"type":"array"}},"required":["services"]},"io.roaring.api.global.dataupdater.resource.DataUpdaterResult":{"properties":{"status":{"$ref":"#/components/schemas/io.roaring.api.company.resource.SearchResultStatus"},"task":{"$ref":"#/components/schemas/io.roaring.api.global.dataupdater.resource.DataUpdaterTask"}},"required":["status"]},"io.roaring.api.global.dataupdater.resource.DataUpdaterServiceProtocol":{"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.global.dataupdater.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.global.dataupdater.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.global.dataupdater.resource.DataUpdaterTask":{"properties":{"companyIdsCount":{"description":"Count of companies included into task","format":"int32","type":"integer"},"completedAt":{"description":"Date of data updater 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 data updater task","type":"string"},"lastModifiedAt":{"description":"Date of data updater 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 data updater events","items":{"description":"List of services for which to generate data updater events","type":"string"},"type":"array"},"startedAt":{"description":"Date of data updater task creation (Date in ISO 8601 standard, UTC)","type":"string"},"status":{"description":"Status of data updater 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 data updater events","type":"string"}},"required":["id","status","companyIdsCount","generatedCount","deliveredCount","startedAt","services","webhookId"]},"io.roaring.api.global.dataupdater.resource.DataUpdatersResult":{"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.global.dataupdater.resource.DataUpdaterTask"},"nullable":true,"type":"array"}},"required":["status"]},"io.roaring.api.global.dataupdater.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.global.dataupdater.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 data updater task","type":"string"}},"required":["name","api","apiVersion","countryCode"]},"io.roaring.api.global.dataupdater.resource.ServicesInfoResult":{"properties":{"services":{"description":"List of available services","items":{"$ref":"#/components/schemas/io.roaring.api.global.dataupdater.resource.ServiceInfo"},"type":"array"},"status":{"$ref":"#/components/schemas/io.roaring.api.company.resource.SearchResultStatus"}},"required":["services","status"]},"io.roaring.api.global.dataupdater.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.global.dataupdater.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.global.dataupdater.resource.Webhook"},"nullable":true,"type":"array"}},"required":["status"]}},"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":"Orchestrates data update tasks 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":"Data Updater 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 data updater task","operationId":"services","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.global.dataupdater.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 data updater tasks performed by user","operationId":"tasks","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.global.dataupdater.resource.DataUpdatersResult"}}},"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 data updater tasks performed by user","tags":["dataUpdaters"]}},"/startWithFile/{webhookId}":{"put":{"description":"Starts data updater task for specified services and companies from a file","operationId":"startWithFile","parameters":[{"description":"Id of webhook to which to send data updater 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 data updater 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.global.dataupdater.resource.DataUpdaterResult"}}},"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 data updater task with file","tags":["dataUpdater"]}},"/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.global.dataupdater.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 data updater task for specified companies and services","operationId":"start","parameters":[{"description":"Id of webhook to which to send data updater events","in":"path","name":"webhookId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.global.dataupdater.input.StartInput"}}},"description":"Input data for starting data updater task","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.global.dataupdater.resource.DataUpdaterResult"}}},"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 data updater task","tags":["dataUpdater"]}},"/status/{dataUpdaterId}":{"get":{"description":"Get status of data updater task for specified task id","operationId":"status","parameters":[{"description":"Id of data updater task","in":"path","name":"dataUpdaterId","required":true,"schema":{"type":"string"}},{"description":"Whether to include data updater 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.global.dataupdater.resource.DataUpdaterExecutionResult"}}},"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 data updater task","tags":["dataUpdater"]}},"/webhooks":{"get":{"description":"Get available webhooks which could be used to start data updater task","operationId":"webhooks","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/io.roaring.api.global.dataupdater.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/global/data-updater/1.0"}],"x-category":"global","x-countries":["global"],"x-id":"DataUpdaterApi"}