> ## 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.

# Cancel Override

> Cancels an existing capacity override identified by `capacityOverrideId`.



## OpenAPI

````yaml locations.openapi post /location-capacity/{capacityOverrideId}/actions/cancel
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-capacity/{capacityOverrideId}/actions/cancel:
    post:
      tags:
        - Location Capacity Endpoints
      summary: Cancel Override
      description: >-
        Cancels an existing capacity override identified by
        `capacityOverrideId`.
      operationId: cancelCapacityOverride
      parameters:
        - name: capacityOverrideId
          in: path
          description: System-specified unique number to identify the `CapacityOverride`.
          required: true
          schema:
            type: string
          example: 23
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricRequestId'
        - $ref: '#/components/parameters/xFabricChannelIdOptional'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CapacityOverrideCancellationRequest'
        required: true
      responses:
        '200':
          description: Cancelled
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/capacityOverrideResponse'
              example:
                CapacityOverrideNumber: CapacityOverride1
                locationNumber: 23
                status: CANCELLED
                type: SHIP
                startDate: '2022-05-12T09:30:31.198Z'
                endDate: '2022-05-12T09:30:31.198Z'
                createdBy: Carl Doe
                createdAt: '2022-05-12T09:30:31.198Z'
                updatedBy: Carl Doe
                updatedAt: '2022-05-12T09:30:31.198Z'
        '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:
    CapacityOverrideCancellationRequest:
      type: object
      description: >-
        Request payload used to cancel an existing Capacity Override. Includes a
        reason for the cancellation, typically used for audit or reporting
        purposes.
      properties:
        reasonCode:
          type: string
          description: >-
            A merchant-defined code indicating the reason for canceling the
            capacity override.
          example: NOT_REQUIRED
      required:
        - reasonCode
    capacityOverrideResponse:
      type: object
      description: >-
        Response object representing a capacity override at a specific location,
        including status, allocation limit, time window, and audit information.
      properties:
        capacityOverrideId:
          type: string
          description: A system-generated unique identifier for the capacity override.
          example: 9320183a01e214
        capacityOverrideNumber:
          type: string
          description: >-
            A merchant-defined unique reference number for the capacity
            override.
          example: capacityOverride1
        locationNumber:
          type: string
          description: >-
            A unique identifier for the location where the capacity override
            applies, as defined by the merchant.
          example: '23'
        status:
          type: string
          description: The current status of the capacity override.
          enum:
            - CREATED
            - STARTED
            - ENDED
            - CANCELLED
          example: CREATED
        capacity:
          type: integer
          format: int32
          description: >-
            The maximum number of allocations the location can accept at any
            point during the override period. When `currentAllocations` equals
            this value, the location is considered "AtCapacity" and cannot
            receive further orders.
          example: 30
        schedule:
          $ref: '#/components/schemas/CapacityOverrideScheduleResource'
          description: >-
            The date and time window during which the capacity override is in
            effect.
        reasonCode:
          type: string
          description: >-
            A merchant-defined reason for the override, used for traceability or
            reporting (for example, holiday, peak demand).
          example: holiday
        notes:
          $ref: '#/components/schemas/orderNote'
          description: >-
            Optional notes or comments providing additional context for the
            override.
          example: Any additional info
        createdBy:
          type: string
          description: Identifier or name of the user or system that created the override.
          example: Carl Doe
        createdAt:
          type: string
          format: date-time
          description: >-
            The timestamp when the capacity override was created, in ISO 8601
            UTC format.
          example: '2022-05-12T09:30:31Z'
        updatedBy:
          type: string
          description: >-
            Identifier or name of the user or system that last updated the
            override.
          example: Carl Doe
        updatedAt:
          type: string
          format: date-time
          description: >-
            The timestamp of the most recent update to the override record, in
            ISO 8601 UTC format.
          example: '2022-05-12T09:30:31Z'
        auditLogs:
          type: array
          description: A list of audit log entries tracking changes made to the override.
          items:
            $ref: '#/components/schemas/auditLog'
      required:
        - capacity
        - reasonCode
        - schedule
    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
    CapacityOverrideScheduleResource:
      type: object
      description: >-
        Defines the schedule during which the Capacity Override is active,
        including the start and end timestamps.
      properties:
        startDate:
          type: string
          format: date-time
          description: >-
            ISO 8601 formatted timestamp representing when the override becomes
            active.
          example: '2022-05-12T09:30:31Z'
        endDate:
          type: string
          format: date-time
          description: ISO 8601 formatted timestamp representing when the override ends.
          example: '2022-05-12T09:30:31Z'
      required:
        - startDate
        - endDate
    orderNote:
      type: object
      description: Note for attention
      properties:
        createdAt:
          type: string
          description: Time note was created (UTC)
          example: '2022-05-12T09:30:31.198Z'
        user:
          type: string
          description: >-
            Customer Service Representative or Employee (ID or name) who created
            the note
          example: 62272e917b12209e68751d94
        notes:
          type: string
          description: Additional info about the order, if any
          example: Fragile - handle with care
    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
    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

````