openapi: 3.0.0
info:
  title: VisibilityIQ Support Cases
  version: 1.2.0
servers:
- url: https://api.zebra.com/v2/services/support/analytics/visibility
  description: For US
- url: https://api.zebra.com/v2/eu/services/support/analytics/visibility
  description: For EU
security:
- BearerAuth: []
- ApiKeyAuth: []
paths:
  /open-cases:
    get:
      tags:
      - Support Cases
      summary: Retrieves open cases information
      description: Retrieves <i>open</i> cases information for a company-partner combination
        within a given date range.
      operationId: Retrieve Open Cases
      parameters:
      - name: companyName
        in: header
        description: Company name
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: partnerName
        in: header
        description: Partner name
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: startDatetime
        in: header
        description: ISO timestamp for the start of the time period in which data
          is retrieved. The startDatetime should be less than endDatetime. Example=2020-04-13T00:00:00Z
        required: true
        style: simple
        explode: false
        schema:
          $ref: '#/components/schemas/DateTime'
      - name: endDatetime
        in: header
        description: ISO timestamp for the end of the time period in which data is
          fetched. Example=2020-04-13T00:00:00Z
        required: true
        style: simple
        explode: false
        schema:
          $ref: '#/components/schemas/DateTime'
      - name: offset
        in: query
        description: 'Pagination parameter indicating the starting record position
          for returning the results from the result set.  Any positive value is acceptable.
          An offset bigger than the number of available results will result in an
          error. A negative value will be replaced with 0. Normally, value should
          be 0 or a positive multiple of limit. '
        required: false
        style: form
        explode: true
        schema:
          type: integer
          default: 0
      - name: limit
        in: query
        description: 'Pagination size indicating the maximum number of results to
          be returned in the response. Valid values are 1 to 20000. Values higher
          than 20000 will be replaced with 20000. Values less than 1 will be replaced
          with 250. '
        required: false
        schema:
          type: integer
          default: 250
      - name: sort
        in: header
        description: "Sort cases for the results.  Specified as a JSON object. Currently,\
          \ only one sort case is supported in the criteria even though it is an array.\
          \ Elements other than the first one will be ignored currently. \n\n  {\n\
          \    \"criteria\": [\n      {\n        \"a\": \"caseOpenDatetime\",\n  \
          \      \"o\": \"asc\"\n      }\n    ]\n  } "
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenCasesSortCriteria'
      - name: filter
        in: header
        description: |-
          Filter based on column values.  Numeric value will be filtered by an exact match.  Strings will be filtered by partial matches as well and are case insensitive matches.  The filter criteria are ANDed together. Example
           {
             "caseId": "12312386",
             "serialNum": "12312312312385"
           }
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenCaseFilterCriteria'
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenCasesApiResponse'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse400'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse401'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorForbidden'
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseOpenCases500'
  /case-activities:
    get:
      tags:
      - Support Cases
      summary: Retrieves case activities information
      description: Retrieves <i>case activities</i> information for a company partner
        and given date range.
      operationId: Retrieve Case Activities
      parameters:
      - name: companyName
        in: header
        description: Company name
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: partnerName
        in: header
        description: Partner name
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: startDatetime
        in: header
        description: ISO timestamp for the start of the time period in which data
          is retrieved. The startDatetime should be less than endDatetime. Example=2020-04-13T00:00:00Z
        required: true
        style: simple
        explode: false
        schema:
          $ref: '#/components/schemas/DateTime'
      - name: endDatetime
        in: header
        description: ISO timestamp for the end of the time period in which data is
          fetched. Example=2020-04-13T00:00:00Z
        required: true
        style: simple
        explode: false
        schema:
          $ref: '#/components/schemas/DateTime'
      - name: offset
        in: query
        description: 'Pagination parameter indicating the starting record position
          for returning the results from the result set.  Any positive value is acceptable.
          An offset bigger than the number of available results will result in an
          error. A negative value will be replaced with 0. Normally, value should
          be 0 or a positive multiple of limit. '
        required: false
        style: form
        explode: true
        schema:
          type: integer
          default: 0
      - name: limit
        in: query
        description: 'Pagination size indicating the maximum number of results to
          be returned in the response. Valid values are 1 to 20000. Values higher
          than 20000 will be replaced with 20000. Values less than 1 will be replaced
          with 250. '
        required: false
        schema:
          type: integer
          default: 250
      - name: sort
        in: header
        description: "Sort cases for the results.  Specified as a JSON object. Currently,\
          \ only one sort case is supported in the criteria even though it is an array.\
          \ Elements other than the first one will be ignored currently. \n  {\n \
          \   \"criteria\": [\n      {\n        \"a\": \"caseOpenDatetime\",\n   \
          \     \"o\": \"asc\"\n      }\n    ]\n  } "
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CasesActivitiesSortCriteria'
      - name: filter
        in: header
        description: "Filter based on column values.  Numeric value will be filtered\
          \ by an exact match.  Strings will be filtered by partial matches as well\
          \ and are case insensitive matches.  The filter criteria are ANDed together.\
          \ Example\n  {\n    \"caseId\": \"12312386\",\n    \"serialNum\": \"12312312312385\"\
          \n  }    "
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CasesActivitiesFilterCriteria'
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CaseActivitiesApiResponse'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse400'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse401'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorForbidden'
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseCaseActivites500'
      deprecated: false
  /open-case-age-histogram:
    get:
      tags:
      - Support Cases
      summary: Retrieves open cases chart information
      description: Retrieves counts of <i>open cases</i> by age groups (how long has
        the case been open) – Good, Warning, Critical. The thresholds separating these
        groups can be specified. Data is fetched for a company-partner combination
        and the given date range.It doesn't have filter and sort functionality because
        it returns total counts.
      operationId: Retrieve Open Case Age Histogram
      parameters:
      - name: companyName
        in: header
        description: Company name
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: partnerName
        in: header
        description: Partner name
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: startDatetime
        in: header
        description: ISO timestamp for the start of the time period in which data
          is retrieved. The startDatetime should be less than endDatetime. Example=2020-04-13T00:00:00Z
        required: true
        style: simple
        explode: false
        schema:
          $ref: '#/components/schemas/DateTime'
      - name: endDatetime
        in: header
        description: ISO timestamp for the end of the time period in which data is
          fetched. Example=2020-04-13T00:00:00Z
        required: true
        style: simple
        explode: false
        schema:
          $ref: '#/components/schemas/DateTime'
      - name: openCaseAgeWarningThreshold
        in: header
        description: Lower threshold default 30 days
        required: true
        style: simple
        explode: false
        schema:
          type: integer
      - name: openCaseAgeCriticalThreshold
        in: header
        description: Higher threshold default 90 days
        required: true
        style: simple
        explode: false
        schema:
          type: integer
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenCaseAgeHistogramApiResponse'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse400'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse401'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorForbidden'
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseOpenCaseAgeHistogram500'
      deprecated: false
components:
  schemas:
    DateTime:
      type: string
      format: date-time
    Date:
      type: string
      format: date
    OpenCasesApiResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ApiResponseStatus'
        links:
          $ref: '#/components/schemas/ApiResponseLinks'
        meta:
          $ref: '#/components/schemas/ApiResponseMeta'
        data:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/OpenCases'
    CaseActivitiesApiResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ApiResponseStatus'
        meta:
          $ref: '#/components/schemas/ApiResponseMeta'
        links:
          $ref: '#/components/schemas/ApiResponseLinks'
        data:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/CaseActivities'
    OpenCaseAgeHistogramApiResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ApiResponseStatus'
        meta:
          $ref: '#/components/schemas/ApiResponseMeta'
        links:
          $ref: '#/components/schemas/ApiResponseLinks'
        data:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/OpenCaseAgeHistogramGood'
            - $ref: '#/components/schemas/OpenCaseAgeHistogramWarning'
            - $ref: '#/components/schemas/OpenCaseAgeHistogramCritical'
    ApiResponse400:
      required:
      - response_description
      - response_status
      type: object
      properties:
        id:
          type: string
          description: id
          example: "123"
        status:
          type: integer
          description: status
          example: 400
        code:
          type: string
          description: code
          example: 1.2.1
        title:
          type: string
          description: title
          example: 'ERROR: Bad Request'
        detail:
          type: string
          description: detail
          example: Required parameter missing
        source:
          type: object
          properties:
            parameter:
              type: string
              example: companyName
            pointer:
              type: string
              example: header/companyName
          description: source
    ApiResponse401:
      required:
      - response_description
      - response_status
      type: object
      properties:
        fault:
          type: object
          properties:
            faultstring:
              type: string
              example: Invalid ApiKey
            detail:
              type: object
              properties:
                errorcode:
                  type: string
                  example: oauth.v2.InvalidApiKey
              description: detail
          description: source
    ApiResponse500:
      required:
      - response_description
      - response_status
      type: object
      properties:
        timestamp:
          type: string
          description: timestamp
          example: 2023-01-03T12:10:00
        status:
          type: integer
          description: status
          example: 500
        error:
          type: string
          description: error
          example: Internal Server Error
        path:
          type: string
          description: detail
          example: /partners/devices
    ApiResponseOpenCases500:
      required:
      - response_description
      - response_status
      type: object
      properties:
        timestamp:
          type: string
          description: timestamp
          example: 2023-01-03T12:10:00
        status:
          type: integer
          description: status
          example: 500
        error:
          type: string
          description: error
          example: Internal Server Error
        path:
          type: string
          description: detail
          example: /partners/open-cases
    ApiResponseCaseActivites500:
      required:
      - response_description
      - response_status
      type: object
      properties:
        timestamp:
          type: string
          description: timestamp
          example: 2023-01-03T12:10:00
        status:
          type: integer
          description: status
          example: 500
        error:
          type: string
          description: error
          example: Internal Server Error
        path:
          type: string
          description: detail
          example: /partners/case-activities
    ApiResponseOpenCaseAgeHistogram500:
      required:
      - response_description
      - response_status
      type: object
      properties:
        timestamp:
          type: string
          description: timestamp
          example: 2023-01-03T12:10:00
        status:
          type: integer
          description: status
          example: 500
        error:
          type: string
          description: error
          example: Internal Server Error
        path:
          type: string
          description: detail
          example: /partners/open-case-age-histogram
    ApiError:
      required:
      - data
      - status
      type: object
      properties:
        data:
          type: string
          example: request unsuccessfull
        status:
          type: string
          example: failed
    ApiErrorN:
      required:
      - detail
      - status
      type: object
      properties:
        detail:
          type: string
          example: INTERNAL SERVER ERROR
        status:
          type: string
          example: "500"
    ApiErrorForbidden:
      required:
      - code
      - detail
      - id
      - status
      - title
      type: object
      properties:
        detail:
          type: string
          example: User does not have access to company-partner data
        status:
          type: string
          example: "403"
        code:
          type: string
          example: 1.1.5
        id:
          type: string
          example: adf131j123
    OpenCasesSortCriteria:
      type: object
      properties:
        criteria:
          type: array
          items:
            type: object
            properties:
              a:
                type: string
                description: Attribute name
                enum:
                - siteName
                - fullModel
                - repairReference
                - caseId
                - deviceType
                - caseOpenDatetime
                - title
                - serialNum
                - serviceOrderNum
                - age
                - typeCode
                - model
                - serviceRequestNum
              o:
                type: string
                description: Order for attribute values
                enum:
                - asc
                - desc
    OpenCaseFilterCriteria:
      type: object
      properties:
        siteName:
          type: string
        fullModel:
          type: string
        repairReference:
          type: string
        caseId:
          type: string
        deviceType:
          type: string
        caseOpenDatetime:
          $ref: '#/components/schemas/DateTime'
        title:
          type: string
        serialNum:
          type: string
        serviceOrderNum:
          type: string
        age:
          type: integer
        typeCode:
          type: string
        model:
          type: string
        serviceRequestNum:
          type: string
    CasesActivitiesSortCriteria:
      type: object
      properties:
        criteria:
          type: array
          items:
            type: object
            properties:
              a:
                type: string
                description: Attribute name
                enum:
                - siteName
                - fullModel
                - repairReference
                - caseId
                - deviceType
                - caseOpenDatetime
                - title
                - serialNum
                - serviceOrderNum
                - age
                - typeCode
                - model
                - caseCloseDatetime
                - resolutionText
                - serviceRequestNum
              o:
                type: string
                description: Order for attribute values
                enum:
                - asc
                - desc
    CasesActivitiesFilterCriteria:
      type: object
      properties:
        siteName:
          type: string
        fullModel:
          type: string
        repairReference:
          type: string
        caseId:
          type: string
        deviceType:
          type: string
        caseOpenDatetime:
          $ref: '#/components/schemas/DateTime'
        title:
          type: string
        serialNum:
          type: string
        serviceOrderNum:
          type: string
        age:
          type: integer
        typeCode:
          type: string
        model:
          type: string
        caseCloseDatetime:
          $ref: '#/components/schemas/DateTime'
        resolutionText:
          type: string
        serviceRequestNum:
          type: string
    OpenCases:
      type: object
      properties:
        siteName:
          type: string
        fullModel:
          type: string
        repairReference:
          type: string
        caseId:
          type: string
        deviceType:
          type: string
        caseOpenDatetime:
          $ref: '#/components/schemas/DateTime'
        title:
          type: string
        serialNum:
          type: string
        serviceOrderNum:
          type: string
        age:
          type: integer
        typeCode:
          type: string
        model:
          type: string
        serviceRequestNum:
          type: string
      example:
        siteName: Sore 123
        fullModel: XX75AH-XXX11ES-XX
        repairReference: "Y"
        caseId: 12312323
        deviceType: MOBILE COMPUTER
        caseOpenDatetime: 2019-08-07T23:59:59Z
        title: XXX DAMAGE BEEN HIT BY FORKLIFT SCREEN IS SMASH
        serialNum: "12312312312312"
        serviceOrderNum: "12312375"
        age: 362
        typeCode: Hardware
        model: XX75X-DROID-XXX-2DMP
        serviceRequestNum: 12312324
    CaseActivities:
      type: object
      properties:
        siteName:
          type: string
        fullModel:
          type: string
        repairReference:
          type: string
        caseId:
          type: string
        deviceType:
          type: string
        caseOpenDatetime:
          $ref: '#/components/schemas/DateTime'
        title:
          type: string
        serialNum:
          type: string
        serviceOrderNum:
          type: string
        age:
          type: integer
        typeCode:
          type: string
        model:
          type: string
        caseCloseDatetime:
          $ref: '#/components/schemas/DateTime'
        resolutionText:
          type: string
        serviceRequestNum:
          type: string
      example:
        siteName: XXXXX 123
        fullModel: XX75AH-KA11ES-A1
        repairReference: "Y"
        caseId: 12312323
        deviceType: MOBILE COMPUTER
        caseOpenDatetime: 2019-08-07T23:59:59Z
        title: XX75 DAMAGE BEEN HIT BY FORKLIFT SCREEN IS SMASH
        serialNum: "12312312312312"
        serviceOrderNum: "12312375"
        age: 362
        typeCode: XXXXX
        model: XX75X-DROID-NALTE-2DXX
        caseCloseDatetime: 2019-08-08T23:59:59Z
        resolutionText: ""
        serviceRequestNum: 12312324
    OpenCaseAgeHistogramGood:
      type: object
      properties:
        casesCount:
          type: integer
        key:
          type: string
      example:
        casesCount: 10
        key: Good
    OpenCaseAgeHistogramWarning:
      type: object
      properties:
        casesCount:
          type: integer
        key:
          type: string
      example:
        casesCount: 10
        key: Warning
    OpenCaseAgeHistogramCritical:
      type: object
      properties:
        casesCount:
          type: integer
        key:
          type: string
      example:
        casesCount: 10
        key: Critical
    ApiResponseStatus:
      type: integer
      description: The HTTP status code
      format: int32
    ApiResponseMeta:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for this request
        total:
          type: integer
          description: The total number of results
        offset:
          type: integer
          description: The offset used in this request
        limit:
          type: integer
          description: The effective limit used in this request
    ApiResponseLinks:
      type: object
      properties:
        self:
          type: string
          description: URL to this page
        first:
          type: string
          description: URL to the first page
        last:
          type: string
          description: URL to the last page
        prev:
          type: string
          description: URL to the previous page
        next:
          type: string
          description: URL to the next page
      description: Links for navigation. Only the applicable links are required to
        be present.
  responses:
    Response400:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Response401:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Response403:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Response500:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  parameters:
    companyName:
      name: companyName
      in: header
      description: Company name
      required: true
      style: simple
      explode: false
      schema:
        type: string
    partnerName:
      name: partnerName
      in: header
      description: Partner name
      required: true
      style: simple
      explode: false
      schema:
        type: string
    startDatetime:
      name: startDatetime
      in: header
      description: ISO timestamp for the start of the time period in which data is
        retrieved. The startDatetime should be less than endDatetime. Example=2020-04-13T00:00:00Z
      required: true
      style: simple
      explode: false
      schema:
        $ref: '#/components/schemas/DateTime'
    endDatetime:
      name: endDatetime
      in: header
      description: ISO timestamp for the end of the time period in which data is fetched.
        Example=2020-04-13T00:00:00Z
      required: true
      style: simple
      explode: false
      schema:
        $ref: '#/components/schemas/DateTime'
    offset:
      name: offset
      in: query
      description: 'Pagination parameter indicating the starting record position for
        returning the results from the result set.  Any positive value is acceptable.
        An offset bigger than the number of available results will result in an error.
        A negative value will be replaced with 0. Normally, value should be 0 or a
        positive multiple of limit. '
      required: false
      style: form
      explode: true
      schema:
        type: integer
        default: 0
    limit:
      name: limit
      in: query
      description: 'Pagination size indicating the maximum number of results to be
        returned in the response. Valid values are 1 to 20000. Values higher than
        20000 will be replaced with 20000. Values less than 1 will be replaced with
        250. '
      required: false
      style: form
      explode: true
      schema:
        type: integer
        default: 250
  requestBodies: {}
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
    ApiKeyAuth:
      type: apiKey
      name: X-APIKey
      in: header
  links: {}
  callbacks: {}
