swagger: "2.0"
schemes:
  - https
  - http
host: api.roaring.io
basePath: /company/1.0
info:
  contact:
    x-twitter: roaring_io
  title: CompanyAPI
  version: "1.0"
  x-apisguru-categories:
    - customer_relation
  x-logo:
    url: https://twitter.com/roaring_io/profile_image?size=original
  x-origin:
    - format: swagger
      url: https://developer.roaring.io/store/api-docs/admin/CompanyAPI/1.0
      version: "2.0"
  x-providerName: roaring.io
securityDefinitions:
  default:
    authorizationUrl: https://api.roaring.io/authorize
    flow: implicit
    scopes: {}
    type: oauth2
paths:
  /company-board-members:
    get:
      parameters:
        - description: Country code for the company
          in: query
          name: countryCode
          required: true
          type: string
        - description: Company identification for the company
          in: query
          name: companyId
          required: true
          type: string
      responses:
        "200":
          description: OK, successful response
          schema:
            $ref: "#/definitions/CompanyBoardMembersResult"
        "400":
          description: Returned when something is wrong in the request, e.g. too many entities are requested or arguments are missing
          schema:
            $ref: "#/definitions/BadRequest"
        "404":
          description: Requested resource could not be found
          schema:
            $ref: "#/definitions/NotFound"
        "500":
          description: An internal server error occurred, please contact the system administrator with information on the error
          schema:
            $ref: "#/definitions/ServerError"
      x-auth-type: Application & Application User
      x-throttling-tier: "20"
    post:
      consumes:
        - application/json
      parameters:
        - description: Country code for the company
          in: query
          name: countryCode
          required: true
          type: string
        - description: Request body with company identifiers to lookup
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/CompanyLookupRequestBody"
      produces:
        - application/json
      responses:
        "200":
          description: OK, successfull response
          schema:
            $ref: "#/definitions/CompanyBoardMembersMulti"
        "400":
          description: Returned when something is wrong in the request, e.g. too many entities are requested or arguments are missing
          schema:
            $ref: "#/definitions/BadRequest"
        "404":
          description: Requested resource could not be found
          schema:
            $ref: "#/definitions/NotFound"
        "500":
          description: An internal server error occurred, please contact the system administrator with information on the error
          schema:
            $ref: "#/definitions/ServerError"
      x-auth-type: Application & Application User
      x-throttling-tier: "20"
  /company-credit-decision:
    get:
      parameters:
        - description: Country code for the company
          in: query
          name: countryCode
          required: true
          type: string
        - description: Company identification for the company
          in: query
          name: companyId
          required: true
          type: string
        - description: Template for credit decision
          in: query
          name: template
          required: true
          type: string
      responses:
        "200":
          description: OK, successful response
          schema:
            $ref: "#/definitions/CompanyCreditDecisionResult"
        "400":
          description: Returned when something is wrong in the request, e.g. too many entities are requested or arguments are missing
          schema:
            $ref: "#/definitions/BadRequest"
        "404":
          description: Requested resource could not be found
          schema:
            $ref: "#/definitions/NotFound"
        "500":
          description: An internal server error occurred, please contact the system administrator with information on the error
          schema:
            $ref: "#/definitions/ServerError"
      x-auth-type: Application & Application User
      x-throttling-tier: "250"
  /company-economy-overview:
    get:
      parameters:
        - description: Country code for the company
          in: query
          name: countryCode
          required: true
          type: string
        - description: Company identification for the company
          in: query
          name: companyId
          required: true
          type: string
      responses:
        "200":
          description: OK, successful response
          schema:
            $ref: "#/definitions/CompanyEconomyOverviewResult"
        "400":
          description: Returned when something is wrong in the request, e.g. too many entities are requested or arguments are missing
          schema:
            $ref: "#/definitions/BadRequest"
        "404":
          description: Requested resource could not be found
          schema:
            $ref: "#/definitions/NotFound"
        "500":
          description: An internal server error occurred, please contact the system administrator with information on the error
          schema:
            $ref: "#/definitions/ServerError"
      x-auth-type: Application & Application User
      x-throttling-tier: "20"
    post:
      consumes:
        - application/json
      parameters:
        - description: Country code for the company
          in: query
          name: countryCode
          required: true
          type: string
        - description: Request body with company identifiers to lookup
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/CompanyLookupRequestBody"
      produces:
        - application/json
      responses:
        "200":
          description: OK, successfull response
          schema:
            $ref: "#/definitions/CompanyEconomyOverviewMulti"
        "400":
          description: Returned when something is wrong in the request, e.g. too many entities are requested or arguments are missing
          schema:
            $ref: "#/definitions/BadRequest"
        "404":
          description: Requested resource could not be found
          schema:
            $ref: "#/definitions/NotFound"
        "500":
          description: An internal server error occurred, please contact the system administrator with information on the error
          schema:
            $ref: "#/definitions/ServerError"
      x-auth-type: Application & Application User
      x-throttling-tier: "20"
  /company-event:
    post:
      consumes:
        - application/json
      parameters:
        - description: Country code for the company
          in: query
          name: countryCode
          required: true
          type: string
        - description: Request body with company identifiers to lookup
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/CompanyEventRequestBody"
      produces:
        - application/json
      responses:
        "200":
          description: OK, successfull response
          schema:
            $ref: "#/definitions/CompanyEventResult"
        "400":
          description: Returned when something is wrong in the request, e.g. too many entities are requested or arguments are missing
          schema:
            $ref: "#/definitions/BadRequest"
        "404":
          description: Requested resource could not be found
          schema:
            $ref: "#/definitions/NotFound"
        "500":
          description: An internal server error occurred, please contact the system administrator with information on the error
          schema:
            $ref: "#/definitions/ServerError"
      x-auth-type: Application & Application User
      x-throttling-tier: "5"
  /company-overview:
    get:
      parameters:
        - description: Country code for the company
          in: query
          name: countryCode
          required: true
          type: string
        - description: Company identification for the company
          in: query
          name: companyId
          required: true
          type: string
      responses:
        "200":
          description: OK, successfull response
          schema:
            $ref: "#/definitions/CompanyOverviewResult"
        "400":
          description: Returned when something is wrong in the request, e.g. too many entities are requested or arguments are missing
          schema:
            $ref: "#/definitions/BadRequest"
        "404":
          description: Requested resource could not be found
          schema:
            $ref: "#/definitions/NotFound"
        "500":
          description: An internal server error occurred, please contact the system administrator with information on the error
          schema:
            $ref: "#/definitions/ServerError"
      x-auth-type: Application & Application User
      x-throttling-tier: "10"
    post:
      consumes:
        - application/json
      parameters:
        - description: Country code for the company
          in: query
          name: countryCode
          required: true
          type: string
        - description: Request body with company identifiers to lookup
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/CompanyLookupRequestBody"
      produces:
        - application/json
      responses:
        "200":
          description: OK, successfull response
          schema:
            $ref: "#/definitions/CompanyOverviewMulti"
        "400":
          description: Returned when something is wrong in the request, e.g. too many entities are requested or arguments are missing
          schema:
            $ref: "#/definitions/BadRequest"
        "404":
          description: Requested resource could not be found
          schema:
            $ref: "#/definitions/NotFound"
        "500":
          description: An internal server error occurred, please contact the system administrator with information on the error
          schema:
            $ref: "#/definitions/ServerError"
      x-auth-type: Application & Application User
      x-throttling-tier: "10"
  /company-signatory:
    get:
      parameters:
        - description: Country code for the company
          in: query
          name: countryCode
          required: true
          type: string
        - description: Company identification for the company
          in: query
          name: companyId
          required: true
          type: string
      responses:
        "200":
          description: OK, successful response
          schema:
            $ref: "#/definitions/CompanySignatoryResult"
        "400":
          description: Returned when something is wrong in the request, e.g. too many entities are requested or arguments are missing
          schema:
            $ref: "#/definitions/BadRequest"
        "404":
          description: Requested resource could not be found
          schema:
            $ref: "#/definitions/NotFound"
        "500":
          description: An internal server error occurred, please contact the system administrator with information on the error
          schema:
            $ref: "#/definitions/ServerError"
      x-auth-type: Application & Application User
      x-throttling-tier: "20"
    post:
      consumes:
        - application/json
      parameters:
        - description: Country code for the company
          in: query
          name: countryCode
          required: true
          type: string
        - description: Request body with company identifiers to lookup
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/CompanyLookupRequestBody"
      produces:
        - application/json
      responses:
        "200":
          description: OK, successfull response
          schema:
            $ref: "#/definitions/CompanySignatoryMulti"
        "400":
          description: Returned when something is wrong in the request, e.g. too many entities are requested or arguments are missing
          schema:
            $ref: "#/definitions/BadRequest"
        "404":
          description: Requested resource could not be found
          schema:
            $ref: "#/definitions/NotFound"
        "500":
          description: An internal server error occurred, please contact the system administrator with information on the error
          schema:
            $ref: "#/definitions/ServerError"
      x-auth-type: Application & Application User
      x-throttling-tier: "20"
  /company-simple-search:
    get:
      consumes:
        - application/json
      parameters:
        - description: Country code for the company
          in: query
          name: countryCode
          required: true
          type: string
        - description: Company name
          in: query
          name: companyName
          required: false
          type: string
        - description: Town
          in: query
          name: town
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: ""
      x-auth-type: Application & Application User
      x-throttling-tier: "0"
definitions:
  BadRequest:
    description: Returned when something is wrong in the request, e.g. too many entities are requested or arguments are missing
    properties:
      error:
        default: BadRequest
        type: string
      message:
        default: Required arguments are missing in the request
        type: string
    type: object
  CompanyBoardMembersMulti:
    properties:
      companies:
        items:
          $ref: "#/definitions/CompanyBoardMembersResult"
        type: array
      responseInfo:
        $ref: "#/definitions/ResponseInfo"
  CompanyBoardMembersResult:
    description: Roaring Apps company board members lookup. list contains all possible fields returned
    properties:
      boardMembers:
        description: Array of board members for the requested company
        items:
          properties:
            boardMemberCompanyId:
              description: ""
              type: string
            firstName:
              description: ""
              type: string
            fromDate:
              description: ""
              type: string
            fullName:
              description: ""
              type: string
            givenName:
              description: ""
              type: string
            middleName:
              description: ""
              type: string
            personalNumber:
              description: ""
              type: string
            roleCode:
              description: ""
              type: string
            roleName:
              description: ""
              type: string
            surName:
              description: ""
              type: string
            toDate:
              description: ""
              type: string
          type: object
        type: array
      changeDate:
        description: ""
        type: string
      companyId:
        description: ""
        type: string
    type: object
  CompanyCreditDecisionResult:
    description: Roaring Apps company credit decision
    properties:
      address:
        description: ""
        type: string
      companyId:
        description: Company identifier
        type: string
      rejections:
        $ref: "#/definitions/CompanyRejection"
      statusCode:
        description: ""
        type: string
      statusText:
        description: ""
        type: string
      town:
        description: ""
        type: string
      zipCode:
        description: ""
        type: string
    type: object
  CompanyEconomyOverviewMulti:
    properties:
      companies:
        items:
          $ref: "#/definitions/CompanyEconomyOverviewResult"
        type: array
      responseInfo:
        $ref: "#/definitions/ResponseInfo"
  CompanyEconomyOverviewResult:
    description: Roaring Apps company economy overview in a lookup. list contains all possible fields returned
    properties:
      bsCashAndBankBalances:
        description: ""
        type: string
      bsShareCapital:
        description: ""
        type: string
      bsTotalAssets:
        description: ""
        type: string
      bsTotalEquity:
        description: ""
        type: string
      changeDate:
        description: ""
        type: string
      companyId:
        description: ""
        type: string
      kpiNetMarginPercent:
        description: ""
        type: string
      kpiQuickRatioPercent:
        description: ""
        type: string
      kpiSolidityPercent:
        description: ""
        type: string
      nbrOfEmployees:
        description: ""
        type: string
      nbrOfEmployeesInterval:
        description: ""
        type: string
      nbrOfEmployeesOfficeInterval:
        description: ""
        type: string
      netTurnover:
        description: ""
        type: string
      plNetIncome:
        description: ""
        type: string
      plOperatingProfit:
        description: ""
        type: string
      plProfitLossAfterFinItems:
        description: ""
        type: string
      turnoverInterval:
        description: ""
        type: string
      turnoverPerEmployee:
        description: ""
        type: string
    type: object
  CompanyEventRequestBody:
    properties:
      requests:
        items:
          properties:
            companyId:
              description: Company identifier
              type: string
            date:
              description: Earliest date to fetch events for
              type: string
          type: object
        type: array
  CompanyEventResult:
    description: Roaring Apps company event lookup. list contains all possible fields returned
    properties:
      responses:
        description: Array of events for the requested companies
        items:
          properties:
            changeDate:
              description: Date for when the event occurred
              type: string
            code:
              description: Change code for the event
              type: string
            companyId:
              description: Company identifier
              type: string
            dataSet:
              description: List of all Roaring datasets affected by the event
              items:
                type: string
              type: array
          type: object
        type: array
    type: object
  CompanyLookupRequestBody:
    properties:
      companyIds:
        items:
          type: string
        type: array
  CompanyOverviewMulti:
    properties:
      companies:
        items:
          $ref: "#/definitions/CompanyOverviewResult"
        type: array
      responseInfo:
        $ref: "#/definitions/ResponseInfo"
  CompanyOverviewResult:
    description: Roaring Apps company overview in a lookup. list contains all possible fields returned by either of the api verb calls
    properties:
      address:
        description: Postal address, street/P.O BOX
        type: string
      changeDate:
        description: "Date for when the record was last changed "
        type: string
      coAddress:
        description: Postal address, C/O address
        type: string
      commune:
        description: Postal address, commune name
        type: string
      companyHolder:
        description: Name of company holder
        type: string
      companyId:
        description: Company identifier (company registration number / organization number)
        type: string
      companyName:
        description: Company name
        type: string
      companyRegistrationDate:
        description: Company registration date
        type: string
      county:
        description: Postal address, county
        type: string
      email:
        description: Email address
        type: string
      employerContributionReg:
        description: Company is registererd for employer contribution tax (Arb.avg Sweden)
        type: string
      faxNumber:
        description: Fax number
        type: string
      industryCode:
        description: Company main industry, NACE code
        type: string
      industryText:
        description: Company main industry, NACE text
        type: string
      legalGroupCode:
        description: Company type code
        type: string
      legalGroupText:
        description: Company type text
        type: string
      numberCompanyUnits:
        description: Number of company units/workplaces
        type: integer
      numberEmployees:
        description: Number of employees (pcs)
        type: string
      phoneNumber:
        description: Telephone number
        type: string
      preliminaryTaxReg:
        description: Company is approved for preliminary tax (F-skatt Sweden)
        type: string
      severalCompanyName:
        description: Indicates if the company have more than one active name
        type: boolean
      statusCode:
        description: Company status code
        type: string
      statusDateFrom:
        description: Company status date from
        type: string
      statusTextDetailed:
        description: Company status text detailed
        type: string
      statusTextHigh:
        description: Company status text
        type: string
      topDirectorFunction:
        description: Top director's function
        type: string
      topDirectorName:
        description: Top director's name
        type: string
      town:
        description: Postal address, town
        type: string
      vatReg:
        description: Company is registered for VAT (MOMS Sweden)
        type: string
      vepChangedDate:
        description: Show the latest date any of preliminaryTaxReg, employerContributionReg or vatReg has had a change
        type: string
      visitAddress:
        description: Visiting address, street name, street number and unit
        type: string
      visitCommune:
        description: Visiting address, commune
        type: string
      visitCounty:
        description: Visiting address, county
        type: string
      visitStreet:
        description: Visiting address, street
        type: string
      visitStreetNumber:
        description: Visiting address, number
        type: string
      visitStreetUnit:
        description: Visiting address, unit
        type: string
      visitTown:
        description: Visiting address, town
        type: string
      visitZipCode:
        description: Visiting address, zip code
        type: string
      webAddress:
        description: Web address
        type: string
      zipCode:
        description: Postal address, zipcode
        type: string
    type: object
  CompanyRejection:
    description: Credit decision rejection
    properties:
      causeOfReject:
        description: ""
        type: string
      rejectComment:
        description: ""
        type: string
      rejectText:
        description: ""
        type: string
    type: object
  CompanySignatoryMulti:
    properties:
      companies:
        items:
          $ref: "#/definitions/CompanySignatoryResult"
        type: array
      responseInfo:
        $ref: "#/definitions/ResponseInfo"
  CompanySignatoryResult:
    description: Roaring Apps company signatory in a lookup. list contains all possible fields returned
    properties:
      changeDate:
        description: date for when the result signatory was set
        type: string
      companyId:
        description: Company identifier
        type: string
      companySignatory:
        description: Signatory for the company
        type: string
    type: object
  NotFound:
    description: Requested resource could not be found
    properties:
      error:
        default: NotFound
        type: string
      message:
        default: Requested resource could not be found
        type: string
    type: object
  ResponseInfo:
    properties:
      hitCount:
        description: Number of companyIds in response (companyIds that could be found)
        type: integer
      noMatchIds:
        description: Array of companyIds that was in request but could not be matched
        items:
          type: string
        type: array
      requestCount:
        description: Number of requested companyIds
        type: integer
  ServerError:
    description: Internal server error
    properties:
      error:
        default: InternalServerError
        type: string
      message:
        default: An internal server error occurred, please contact the system administrator with information on the error
        type: string
    type: object
