> ## Documentation Index
> Fetch the complete documentation index at: https://developer.fabric.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Get LocationOutages by query

> Get a list of LocationOutages by specified filter criteria.



## OpenAPI

````yaml locations.openapi post /location-outages/search
openapi: 3.0.1
info:
  contact:
    email: support@fabric.inc
    name: fabric Orders team
  description: >-
    fabric **Locations** API provides location endpoints that support
    multi-tenant services. This location data is used for both inventory
    management and order management. When an order is created, it's allocated to
    the nearest location according to the Order Fulfillment Logic.
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
  termsOfService: https://fabric.inc/terms-of-use
  title: Inventory - Locations API
  version: 3.0.0
  x-audience: external-public
servers:
  - description: Production
    url: https://api.fabric.inc/v3
security:
  - authorization: []
tags:
  - description: These Endpoints help in performing Outage operations
    name: Location Outage Endpoints
  - description: These endpoints let you create and manage locations.
    name: Locations
  - description: These Endpoints help in performing capacity operations
    name: Location Capacity Endpoints
  - name: Location Geography Endpoints
    description: These Endpoints help in performing Geography operations
  - name: Location Zone Endpoints
    description: These Endpoints help in performing Zone operations
paths:
  /location-outages/search:
    post:
      tags:
        - Location Outage Endpoints
      summary: Get LocationOutages by query
      description: Get a list of LocationOutages by specified filter criteria.
      operationId: searchLocationOutages
      parameters:
        - name: offset
          in: query
          description: >-
            Number of records to skip before returning all records. Default is
            `0` when no value is specified.
          schema:
            type: number
            default: 0
            example: 1
          example: 0
        - name: limit
          in: query
          description: Maximum number of records per page
          schema:
            type: number
            default: 10
            example: 10
          example: 10
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricRequestId'
        - $ref: '#/components/parameters/xFabricChannelIdOptional'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/outageSearchRequest'
        required: true
      responses:
        '200':
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/outageSearchResponse'
        '400':
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
              example:
                type: CLIENT_ERROR
                errorCode: SERVICE-4003
                message: 'Mandatory param(s): `requiredField1` is/are missing'
                errors:
                  - type: CLIENT_ERROR
                    errorCode: SERVICE-4002
                    message: Invalid value(s) specified for 'requiredField.field3'
                    errors: []
                context:
                  service: orders
                  endpoint: POST /v3/orders
        '401':
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
              example:
                type: CLIENT_ERROR
                errorCode: SERVICE-4001
                message: Unauthorized request
                errors: []
                context:
                  service: orders
                  endpoint: POST /v3/orders/OrderId_12345
        '500':
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
              example:
                type: SERVER_ERROR
                errorCode: SERVICE-5000
                message: Internal server error
                errors: []
                context:
                  service: inventories
                  endpoint: POST /v3/inventories/actions/find-by-geography
components:
  parameters:
    xFabricTenantId:
      description: >-
        A header used by fabric to identify the tenant making the request. You
        must include tenant id in the authentication header for an API request
        to access any of fabric’s endpoints. You can retrieve the tenant id ,
        which is also called account id, from
        [Copilot](/v3/platform/settings/account-details/getting-the-account-id).
        This header is required.
      example: 5f328bf0b5f328bf0b5f328b
      in: header
      name: x-fabric-tenant-id
      required: true
      schema:
        type: string
    xFabricRequestId:
      description: Unique request ID
      example: 263e731c-45c8-11ed-b878-0242ac120002
      in: header
      name: x-fabric-request-id
      required: false
      schema:
        type: string
    xFabricChannelIdOptional:
      description: >-
        x-fabric-channel-id identifies the sales channel through which the API
        request is being made; primarily for multichannel use cases. It is an
        optional field. The default US channel is 12 while the default Canada
        channel is 13.
      example: '12'
      in: header
      name: x-fabric-channel-id
      required: false
      schema:
        type: string
  schemas:
    outageSearchRequest:
      type: object
      description: outage search request
      example:
        sort: '-outage.createdAt'
        filters:
          - field: outage.status
            value: CREATED
            condition: EQ
      properties:
        sort:
          type: string
          default: '-outage.createdAt'
          description: Resource property on which data needed to be sorted on.
          example: +outage.createdAt
          pattern: (^[+-]outage\.[a-zA-Z.\-_]*)(,([+-]alert\.[a-zA-Z.\-_]*)){0,}
        filters:
          type: array
          items:
            $ref: '#/components/schemas/outageSearchFilter'
            description: List to filters for search
            maxItems: 50
            minItems: 0
          maxItems: 50
          minItems: 0
      required:
        - filters
    outageSearchResponse:
      type: object
      description: Outage search response
      properties:
        pagination:
          $ref: '#/components/schemas/pagination'
        data:
          type: array
          items:
            $ref: '#/components/schemas/outageResponse'
        stats:
          type: array
          items:
            type: string
            description: Stats Details
    errorResponse:
      type: object
      description: Error response
      properties:
        type:
          type: string
          description: Error type
          example: CLIENT_ERROR
        errorCode:
          type: string
          description: Error code
          example: OMS-10001
        message:
          type: string
          description: Error message
          example: Bad request
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errorResponse'
        context:
          type: string
          description: Error message
          example: Bad request
    outageSearchFilter:
      type: object
      description: outage search filter
      discriminator:
        propertyName: condition
        mapping:
          EQ: '#/components/schemas/valueSearchFilter'
          NEQ: '#/components/schemas/valueSearchFilter'
          LT: '#/components/schemas/valueSearchFilter'
          GT: '#/components/schemas/valueSearchFilter'
          LTE: '#/components/schemas/valueSearchFilter'
          GTE: '#/components/schemas/valueSearchFilter'
          IN: '#/components/schemas/valuesSearchFilter'
          NIN: '#/components/schemas/valuesSearchFilter'
      properties:
        group:
          type: string
          default: Default
          description: Group name
          example: GroupA
        field:
          type: string
          description: Field name
          example: outage.status
          pattern: ^outage\.[a-zA-Z.\-_]*
        condition:
          type: string
          default: EQ
          description: SearchCondition to apply filter
          enum:
            - EQ
            - NEQ
            - IN
            - NIN
            - LT
            - GT
            - LTE
            - GTE
          example: EQ
      required:
        - field
    pagination:
      type: object
      description: Pagination response
      properties:
        limit:
          type: integer
          format: int32
          default: '10'
          description: Maximum number of records per page
          example: 10
          maximum: 100
          minimum: 1
        offset:
          type: integer
          format: int32
          default: '0'
          description: >-
            Number of records to skip before returning all records. For example,
            `offset=20, limit=10` returns records 21-30.
          example: 1
          minimum: 0
        count:
          type: integer
          format: int32
          description: Total number of search results
          example: 1000
    outageResponse:
      type: object
      description: >-
        Response object representing a scheduled outage at a specific location,
        including status, duration, fulfillment impact, and auditing
        information.
      properties:
        outageId:
          type: string
          description: A system-generated unique identifier for the outage event.
          example: 9320183a01e214
        outageNumber:
          type: string
          description: A merchant-defined unique identifier used to reference the outage.
          example: OUTAGE1
        locationNumber:
          type: integer
          format: int32
          description: >-
            The unique identifier of the location affected by the outage, as
            defined by the merchant.
          example: 23
        status:
          type: string
          description: The current status of the outage lifecycle.
          enum:
            - CREATED
            - STARTED
            - ENDED
            - CANCELLED
          example: CREATED
        disabledFulfillmentMethods:
          type: array
          description: >-
            A list of fulfillment methods that are disabled during the outage
            period (for example, ShipToHome, Pickup).
          items:
            type: string
            description: A fulfillment method that will be unavailable during the outage.
          uniqueItems: true
        schedule:
          $ref: '#/components/schemas/OutageScheduleResource'
          description: >-
            The date and time range during which the outage is scheduled to
            occur.
        reasonCode:
          type: string
          description: >-
            A merchant-defined reason for initiating the outage (for example,
            maintenance, staffing, system upgrade).
          example: maintenance
        notes:
          type: string
          description: Optional notes or additional context related to the outage.
          example: Any additional info
        createdBy:
          type: string
          description: The user or system that originally created the outage record.
          example: Carl Doe
        createdAt:
          type: string
          format: date-time
          description: The timestamp when the outage was created, in ISO 8601 UTC format.
          example: '2022-05-12T09:30:31Z'
        updatedBy:
          type: string
          description: The user or system that last modified the outage record.
          example: Carl Doe
        updatedAt:
          type: string
          format: date-time
          description: >-
            The timestamp of the most recent update to the outage record, in ISO
            8601 UTC format.
          example: '2022-05-12T09:30:31Z'
        auditLogs:
          type: array
          description: >-
            A list of audit log entries capturing changes and actions performed
            on the outage record.
          items:
            $ref: '#/components/schemas/auditLog'
      required:
        - disabledFulfillmentMethods
        - locationNumber
        - reasonCode
        - schedule
    valueSearchFilter:
      allOf:
        - $ref: '#/components/schemas/locationSearchFilter'
        - type: object
          properties:
            value:
              type: object
              description: A single value for `field` using which data is searched
              example: ORDER_CREATE
              oneOf:
                - type: string
                  description: Target record's non-numeric identifier
                  example: ORDER_CREATE
                - type: number
                  format: int64
                  description: Target record's numeric identifier
                  example: 112233
                - type: number
                  format: double
                  description: Target record's numeric identifier
                  example: 1122.33
      description: >-
        Criteria to find location using a single value. Condition between
        `field` and `value` is anything except IN and NIN when
        `valueSearchFilter` is used.
      required:
        - condition
        - field
    valuesSearchFilter:
      allOf:
        - $ref: '#/components/schemas/locationSearchFilter'
        - type: object
          properties:
            values:
              type: array
              items:
                description: Multiple values for `field` using which locations are searched
                example: ORDER_CREATE
                oneOf:
                  - type: string
                    description: Target record's non-numeric identifier
                    example: ORDER_CREATE
                  - type: number
                    format: int64
                    description: Target record's numeric identifier
                    example: 112233
                  - type: number
                    format: double
                    description: Target record's numeric identifier
                    example: 1122.33
              maxItems: 25
              minItems: 0
      description: >-
        Criteria to find locations using multiple values. Condition between
        `field` and `values` is either IN or NIN when `valuesSearchFilter` is
        used.
      required:
        - condition
        - field
    OutageScheduleResource:
      type: object
      description: Schedule of outage
      properties:
        startDate:
          type: string
          format: date-time
          description: outage created date
          example: '2022-05-12T09:30:31Z'
        endDate:
          type: string
          format: date-time
          description: outage created date
          example: '2022-05-12T09:30:31Z'
        indefinite:
          type: boolean
      required:
        - startDate
    auditLog:
      type: object
      description: Audit log to capture change history
      properties:
        lineItemId:
          type: string
          description: >-
            Merchant-defined unique identifier for each item in an order. When
            omitted, fabric will generate it during order creation, in UUID
            format.
          example: b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569
        auditId:
          type: string
          description: System-generated audit ID (UUID format)
          example: a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111
        auditType:
          type: string
          description: Audit type such as cancel, return, etc.
          example: CANCEL
        employeeId:
          type: string
          description: Employee (ID or name) who made the last update
          example: 6227
        auditedAt:
          type: string
          format: date-time
          description: Audit time (UTC)
          example: '2023-03-12T09:24:54.804Z'
        source:
          type: string
          description: >-
            Merchant-defined source from where the update was initiated. There
            are no predefined values; possible values could be Customer Service
            Representative (CSR), Point-of-Sale (POS), etc.
          example: POS
        reasonCode:
          type: string
          description: Merchant-defined reason code, varies from merchant to merchant
          example: Scratched item
        subReasonCode:
          type: string
          description: >-
            Merchant-defined sub reason code; provides more clarity to audit
            reason
          example: Scratched item
        policyCode:
          type: string
          description: >-
            Configurable in Copilot as per requirement. If omitted, default
            policy is used.
          example: POS
        note:
          type: string
          description: Additional info, if any
          example: Note
        lineItemNumber:
          type: integer
          format: int32
          description: Item identifier
          example: 1
        sku:
          type: string
          description: Stock keeping unit (SKU), unique item identifier
          example: SKU0023
        quantity:
          type: integer
          format: int32
          description: Ordered quantity of given item
          example: 1
        amount:
          type: number
          format: double
          description: Amount for which audit is done
          example: 2.4
        paymentToken:
          $ref: '#/components/schemas/orderPaymentToken'
          description: >-
            Payment token provided by payment provider. Must be provided during
            order creation if the payment life cycle orchestration is through
            fabric Orders (OMS).
        updatedFields:
          type: array
          items:
            $ref: '#/components/schemas/orderAuditLogUpdatedField'
        attributes:
          type: object
          description: Custom attributes
          example:
            key: value
        isSuccess:
          type: boolean
          default: 'false'
          description: >-
            true: Update operation (any update to the service) is successful
            <br> false: Update operation has failed
          example: true
    locationSearchFilter:
      type: object
      description: >-
        Criteria to search locations. To search using a single value,
        `valueSearchFilter` is used. To search using multiple values,
        `valuesSearchFilter` is used.
      discriminator:
        propertyName: condition
        mapping:
          EQ: '#/components/schemas/valueSearchFilter'
          NEQ: '#/components/schemas/valueSearchFilter'
          LT: '#/components/schemas/valueSearchFilter'
          GT: '#/components/schemas/valueSearchFilter'
          LTE: '#/components/schemas/valueSearchFilter'
          GTE: '#/components/schemas/valueSearchFilter'
          IN: '#/components/schemas/valuesSearchFilter'
          NIN: '#/components/schemas/valuesSearchFilter'
      properties:
        group:
          type: string
          default: Default
          description: Group name
          example: GroupA
        field:
          type: string
          description: Field name
          example: location.locationNum
          pattern: ^location\.[a-zA-Z.\-_]*
        condition:
          type: string
          default: EQ
          description: >-
            Filter conditions. <br> EQ (Equal to): Searches for exact match.
            <br> NEQ (Not equal to): Searches by excluding the specified value.
            <br> IN: Search for multiple values. <br> NIN (Not IN): Excludes the
            specified values in the search. LT (Less than): Searches for values
            that are less than the specified value. GT (Greater than):  Search
            for values that are greater than the specified value. LTE (Less than
            or equal to): Searches for values that are less than or equal to the
            specified value. GTE (Greater than or equal to): Searches for values
            that are greater than or equal to the specified value.
          enum:
            - EQ
            - NEQ
            - IN
            - NIN
            - LT
            - GT
            - LTE
            - GTE
          example: EQ
      required:
        - condition
        - field
    orderPaymentToken:
      type: object
      description: Order payment token details
      properties:
        token:
          type: string
          description: Payment token provided by payment provider
          example: pi_34tr6787rt
        paymentType:
          type: string
          description: >-
            Payment type, for example, credit card payment providers can be
            Visa, Mastercard, American express, etc.
          example: VISA
    orderAuditLogUpdatedField:
      type: object
      description: Audit log for change history
      properties:
        fieldName:
          type: string
          description: Field or property name that was updated
          example: UOM
        fieldOriginalValue:
          type: string
          description: Original value of `fieldName` before it was updated
          example: PK
  headers:
    xFabricRequestIdResponseHeader:
      description: Unique request ID
      example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
      schema:
        type: string
  securitySchemes:
    authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http

````