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

> Cancels allocation by allocation ID



## OpenAPI

````yaml oms_v2_combined put /allocation/cancel/{allocationIds}
openapi: 3.0.1
info:
  title: Orders v2 (OMS v2)
  description: >-
    fabric's OMS v2 APIs are high performance endpoints are built on highly
    scalable architecture, and include a configurable data model to orchestrate
    the order fulfillment process. These APIs let merchants create order
    records, initiate post-order process workflows and manage order related data
    such as, invoicing, tracking, returns, exchange, cancellation, appeasements,
    backorders, shipment and other use cases.
  termsOfService: https://fabric.inc/terms-of-use
  contact:
    email: support@fabric.inc
  license:
    name: fabric API license
    url: https://fabric.inc/api-license
  version: 2.0.0
servers:
  - url: https://prod01.oms.fabric.inc/api/v2
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Allocation
    description: Endpoints to perform allocation operations
  - name: Appeasement
    description: >-
      Appeasement refers to a goodwill credit applied to a fulfilled order when
      customer faces difficulties for an order, for example late delivery,
      received damaged product, and like wise.  This endpoint help in creating
      appeasement for customer orders.
  - name: Package Tracking
    description: Package Tracking endpoint helps in performing package tracking operations
  - name: Payment Status
    description: This endpoint helps in retrieving payment status for an order
  - name: Order Cancellation
    description: These endpoints help in performing order cancellation operations
  - name: Order
    description: >-
      An order is a customer's request to purchase one or more products from a
      shop or from a website. Order endponts let merchants get order details,
      create, update, and delete orders.
  - name: Order Attribute
    description: These endpoints help in performing attribute operations for an order
  - name: Order Return
    description: These endpoints help in performing order Return operations
  - name: Cross Border
    description: >-
      Cross Border service provides capabilities related to orders that have
      international shipping. These endpoints help in performing cross border
      operations.
  - name: BackOrder PreOrder Reservation
    description: >-
      These Endpoints help in performing BackOrder PreOrder Reservation
      operations
  - name: Configuration
    description: >-
      These endpoints help in performing CRUD operations on tenant
      configurations
  - name: Target Configuration
    description: >-
      These endpoints help in performing CRUD operations on Target
      configurations
  - name: Fraud Configuration
    description: These endpoints help in performing CRUD operations on Fraud configurations
  - name: Fraud
    description: These endpoints help in managing fraud release and cancel operation
  - name: Export
    description: These endpoints help in performing export operations
  - name: Inventory Network
    description: >-
      Network refers to a group of locations having a group of SKUs in each
      location. Network endpoints let you read, create, and manage an
      inventory-network by location, brand, or any other custom attributes.
  - name: Inventory
    description: >-
      These endpoints let you read, create and bulk update inventory across all
      locations.
  - name: Inventory Upload Log
    description: These endpoints let you view the record of the inventory uploads.
  - name: Inventory Bulk Operation
    description: >-
      Bulk Operation endpoints let you upload and download inventory details, in
      bulk, using a  CSV file to and from AWS (Amazon Web Service) server
      presigned S3 URL that is generated from the Order service.
  - name: Inventory Attribute
    description: >-
      Attribute refers to a set of characteristics that define inventory.
      Attribute endpoints let you create, read, update, and delete inventory
      attributes at any hierarchy level (location, SKU, item, channel) or at
      counter level.
  - name: Inventory Counter
    description: >-
      Counter refers to inventory positions such as, available, in-transit,
      on-hand, or other custom positions. These endpoints let you read, update,
      and create custom counters that suit your business use case.
  - name: Invoice
    description: These endpoints help in generating the invoices
  - name: List
    description: To create and manage lists
  - name: Location
    description: Location endpoints let you create, read, update, and delete location.
  - name: Location Attribute
    description: >-
      Location attribute endpoints let you create, read, update, and delete
      location attributes. These location attributes are used while creating or
      updating locations. When the attribute is configured  as required, it is
      mandatory to add the attribute while creating location.
  - name: Shipment
    description: To provides real time update of shipments
  - name: Shipping Method
    description: Endpoints to perform operations related to shipping methods
  - name: Webhook
    description: >-
      These endpoints help in performing CRUD operations on webhook
      subscriptions
paths:
  /allocation/cancel/{allocationIds}:
    put:
      tags:
        - Allocation
      summary: 'Cancel allocation '
      description: Cancels allocation by allocation ID
      operationId: cancelAllocation
      parameters:
        - name: allocationIds
          in: path
          required: true
          schema:
            type: array
            items:
              type: string
        - $ref: '#/components/parameters/xSiteContent'
      responses:
        '200':
          description: Cancel Allocation
          content:
            application/json:
              schema:
                type: array
                items:
                  required:
                    - allocationId
                    - items
                    - locationNum
                    - parentAllocationId
                  type: object
                  properties:
                    allocationId:
                      type: string
                      description: Unique ID for an allocation document
                      example: 62ff5c0bec0aed3c86202c32
                    version:
                      type: integer
                      description: Current version of allocation document
                      format: int64
                      example: 2
                    allocationRequestId:
                      type: string
                      description: >-
                        Allocation request ID used for tracking internal
                        communication. Required to update allocation details.
                      example: 62ff5c0bec0aed3c86202c32
                    allocationNum:
                      type: string
                      description: Allocation number for client tracking
                      example: xxyyzz12345
                    parentAllocationId:
                      type: string
                      description: >-
                        Same as previous allocation document while creating new
                        allocation
                      example: 62ff5c0bec0aed3c86202c32
                    sentToPPSDate:
                      type: string
                      description: Time of sending allocation event to PPS
                      format: date-time
                      example: '2022-08-01T18:03:28.483971941Z'
                    allocationDate:
                      type: string
                      description: >-
                        Time of allocation creation and when it was stored in
                        database
                      format: date-time
                      example: '2022-08-01T18:03:28.483971941Z'
                    updatedAt:
                      type: string
                      description: Time of allocation update
                      format: date-time
                      example: '2022-08-01T20:03:28.483971941Z'
                    type:
                      type: string
                      description: Allocation type
                      example: ALLOCATED
                      enum:
                        - ALLOCATED
                        - SCRATCHED
                        - RETURNED
                    previousAllocationLocationNum:
                      type: number
                      description: >-
                        In reallocation scenarios, keeps track of the previously
                        allocation location numbers
                      example: 410
                    poNumber:
                      type: string
                      description: Purchase order number (generally, vendor-generated)
                      example: '1125'
                      nullable: true
                    itemsType:
                      type: string
                      description: Items type
                      example: WEB_SHIP
                      enum:
                        - WEB_SHIP
                        - POS
                        - WEB
                    orderSubType:
                      type: string
                      description: Sub-type of order
                      example: BORDERFREE
                      enum:
                        - IOS
                        - Android
                        - International
                        - Borderfree
                    vendorId:
                      type: string
                      description: Vendor ID
                      example: '56'
                      nullable: true
                    shipDate:
                      type: string
                      description: Estimated ship date
                      format: date-time
                      example: null
                    shipType:
                      type: string
                      description: Optional field for shipment type
                      format: date-time
                      example: SHIP_TO_ADDRESS
                    shipMethod:
                      type: string
                      description: Optional field for shipment method
                      format: date-time
                      example: Overnight Delivery
                    shipToId:
                      type: string
                      description: Unique Id for delivery address
                      example: 98ff5c0bec0aed3c86202c32
                    statusCode:
                      type: string
                      description: Allocation status code
                      example: PENDING_PICK
                      enum:
                        - ALLOCATED
                        - PENDING_DROP
                        - PENDING_PICK
                        - SHIPPED
                        - PARTIALLY_SHIPPED
                        - REALLOCATED
                        - CANCELLED
                        - PARTIALLY_CANCELLED
                    locationNum:
                      type: string
                      description: Tenant's ship-from location ID
                      example: 1234B
                    locationType:
                      type: string
                      description: Tenant's ship-from location type
                      example: 1234B
                    shipToAddress:
                      type: object
                      properties: {}
                    recipient:
                      type: array
                      description: Recipient details such as phone number, email, and name
                      items:
                        type: object
                        properties:
                          name:
                            type: object
                            properties:
                              first:
                                type: string
                                description: First name of contact
                                example: John
                              middle:
                                type: string
                                description: Middle name of contact
                                example: Middle
                              last:
                                type: string
                                description: Last name of contact
                                example: Doe
                            description: Contact name
                          email:
                            type: string
                            description: Email address of contact
                            example: demo@xyz.inc
                          phone:
                            type: object
                            properties:
                              number:
                                type: string
                                description: Phone number of contact person
                                example: '55555555555'
                              type:
                                type: string
                                description: Phone type
                                example: MOBILE
                                enum:
                                  - MOBILE
                                  - HOME
                                  - BUSINESS
                            description: Details of contact phone number
                          pickupType:
                            type: string
                            description: Pickup type
                            example: Primary
                            enum:
                              - Primary
                              - Alternate
                        description: Order pickup details
                    items:
                      type: array
                      description: List of items to be shipped
                      items:
                        required:
                          - allocationLineNumber
                          - itemId
                          - quantity
                          - sku
                        type: object
                        properties:
                          orderLineId:
                            type: string
                            description: Reference order line ID for  tracking purpose
                            example: 134fqfaa532qrf
                          itemId:
                            type: string
                            description: Item ID
                            example: '100064'
                          sku:
                            type: string
                            description: Item SKU
                            example: 123k4h123k
                          orderId:
                            type: string
                            description: Order ID
                            example: 123k4h123k
                          orderDate:
                            type: string
                            description: Time of order creation
                            format: date-time
                            example: '2022-08-01T18:03:28.483971941Z'
                          estimatedDeliveryDate:
                            type: string
                            description: Estimated delivery time
                            format: date-time
                            example: '2022-08-01T18:03:28.483971941Z'
                          quantity:
                            type: number
                            description: Item quantity
                            example: 3
                          allocationLineNumber:
                            type: number
                            description: Unique number allocated at each item in an order
                            example: 3
                          parentAllocationLineNumber:
                            type: number
                            description: >-
                              Unique number allocated to each item in parent
                              allocation
                            example: 3
                          reallocationRequestId:
                            type: string
                            description: Request ID for re-allocation
                            example: 123k4h123k
                          shippedQuantity:
                            type: number
                            description: Quantity shipped for the specified line item
                            example: 1
                          scratchQuantity:
                            type: number
                            description: >-
                              Total quantity cancelled for the specified line
                              item
                            example: 1
                          scratchedReasonCode:
                            type: string
                            description: Reason code for cancellation
                            example: Scratched during shipment
                          reshipReasonCode:
                            type: string
                            description: Reason code for reshipment
                            example: Reshipping during shipment
                          reallocationReasonCode:
                            type: string
                            description: Reason code for re-allocation
                            example: >-
                              Reallocating due to unavailability of location
                              number
                          channelId:
                            type: string
                            description: Sales channel ID for tenant
                            example: '12'
                          segment:
                            type: string
                            description: Segment associated with item
                            example: null
                          vendorId:
                            type: string
                            description: Vendor ID
                            example: '56'
                          title:
                            type: string
                            description: Item name
                            example: Demo
                          weight:
                            type: number
                            description: Item weight
                            example: 5.5
                          cost:
                            type: number
                            description: Total cost of item
                            example: 500.2
                          price:
                            type: number
                            description: Total price
                            example: 50.2
                          itemStatus:
                            type: string
                            description: Current status of line item
                            example: ALLOCATED
                            enum:
                              - CANCELLED
                              - REFUNDED
                              - ALLOCATED
                              - PARTIALLY_ALLOCATED
                          attributes:
                            type: object
                            additionalProperties:
                              type: object
                              description: Custom attributes, if any
                              properties: {}
                          uom:
                            type: string
                            description: Unit of measure
                            example: KG
                        description: Details of allocation items
                    auditLogs:
                      type: array
                      description: Logs with updated fields
                      items:
                        type: object
                        properties:
                          lineItemId:
                            type: string
                            description: Line item ID
                            example: '4'
                          auditId:
                            type: string
                            description: Audit ID
                            example: 62272e917b12209e68751d94
                          auditType:
                            type: string
                            description: Audit Type
                            example: UPDATE
                            enum:
                              - CREATE
                              - CANCEL
                              - RETURN
                              - RESHIP
                              - SHIP
                              - UPDATE
                              - ORDER
                              - APPEASEMENT
                              - ORDER_ADJUSTMENT
                              - ITEM_ADJUSTMENT
                          employeeId:
                            type: string
                            description: Employee ID (Store context)
                            example: 62272e917b12209e68751d94
                          auditTimestamp:
                            type: string
                            description: Time of audit
                            format: date-time
                            example: '2022-05-12T09:24:54.804Z'
                          source:
                            type: string
                            description: Source of audit
                            example: POS
                          reasonCode:
                            type: string
                            description: Reason code
                            example: POS
                          subReasonCode:
                            type: string
                            description: Sub-reason code
                            example: POS
                          policyCode:
                            type: string
                            description: Policy code
                            example: POS
                          note:
                            type: string
                            description: Additional information, if any
                            example: Note
                          lineItemNumber:
                            type: integer
                            format: int32
                            description: Line item number for reference
                            example: 1
                          sku:
                            type: string
                            description: Item SKU
                            example: F5F
                          quantity:
                            type: integer
                            format: int32
                            description: Item quantity
                            example: 1
                          amount:
                            type: number
                            description: Total order amount
                            example: 2.4
                          paymentToken:
                            type: object
                            properties:
                              token:
                                type: string
                                description: Payment token for reference
                                example: pi_34tr6787rt
                              paymentType:
                                type: string
                                description: Payment type for identification
                                example: VISA
                            description: Details of order payment token
                          success:
                            type: boolean
                            description: 'true: success <br /> false: failure'
                            example: true
                          paymentResponse:
                            type: object
                            properties: {}
                          updatedFields:
                            type: array
                            items:
                              type: object
                              properties:
                                fieldName:
                                  type: string
                                  description: Updated field name for audit trail
                                  example: UOM
                                fieldOriginalValue:
                                  type: string
                                  description: Original field name for audit trail
                                  example: PK
                              description: Details of audit log
                          attributes:
                            type: object
                            additionalProperties:
                              type: object
                        description: Details of order audit log
                  description: Allocation details
        '404':
          description: AllocationRequestId Not Found/Valid
          content:
            application/json:
              schema:
                type: string
              example:
                message: Allocation with AllocationRequestId is not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error details
                description: Error details
              example:
                message: Internal Server Error
components:
  parameters:
    xSiteContent:
      name: x-site-context
      in: header
      description: >-
        The `x-site-context` header is a JSON object that contains information
        about the source you wish to pull from. The mandatory `account` is the
        24 character identifier found in Copilot. The `channel` (Sales channel
        ID), `stage` (environment name), and `date` attributes can be used to
        further narrow the scope of your data source.
      required: true
      schema:
        type: string
        example: >-
          {"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account":
          "1234abcd5678efgh9ijklmno","stage":"production"}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````