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

> Cancels order



## OpenAPI

````yaml oms_v2_combined post /order/cancel
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:
  /order/cancel:
    post:
      tags:
        - Order Cancellation
      summary: Cancel order
      description: Cancels order
      operationId: cancelOrder
      parameters:
        - $ref: '#/components/parameters/xSiteContent'
      requestBody:
        content:
          application/json:
            schema:
              required:
                - orderId
                - reasonCode
              type: object
              description: Order cancellation request object
              properties:
                orderId:
                  type: string
                  example: 62f3982438bcab1951be0a19
                reasonCode:
                  type: string
                  description: Set to all line items and header audits logs
                  example: wrong item
                subReasonCode:
                  type: string
                  description: Set to all line items and header audits logs
                  example: Ordered item doesn't match
                source:
                  type: string
                  description: Determine where the request is initialize
                employeeId:
                  type: number
                  description: Determine who initiate the request
                  example: AD5069
                note:
                  type: string
                  description: Use to add notes
                  example: Wrong item is sent to customer
                policyCode:
                  type: string
                  description: Set policy code
                  example: Cancel
                attributes:
                  type: object
                  description: Set attributes to header level audit log's attribute object
                  additionalProperties:
                    type: object
                    example:
                      cancelEligibility: true
                  example:
                    IsCancellationEligibile: true
                items:
                  type: array
                  description: >-
                    Set when doing line item level cancellation other set to
                    null or empty
                  items:
                    required:
                      - lineItemId
                      - quantity
                    type: object
                    description: Order cancel line-item level object
                    properties:
                      lineItemId:
                        type: string
                        example: 12345
                      quantity:
                        type: number
                        example: 1
                      reasonCode:
                        type: string
                        description: >-
                          Override header level reason code and set to specified
                          line item audit log
                        example: wrong item
                      subReasonCode:
                        type: string
                        description: >-
                          Override header level sub reason code and set to
                          specified line item audit log
                        example: Mismatched item
        required: true
      responses:
        '200':
          description: Order cancelled
          content:
            application/json:
              schema:
                required:
                  - channelId
                  - items
                  - orderNumber
                  - shipInfo
                  - statusCode
                type: object
                description: Order response body
                properties:
                  version:
                    type: integer
                    description: >-
                      Number of updates happened to the order. Order-update
                      refers to replacement, appeasement added, address change
                      or any other order related update to the particular order.
                    format: int64
                  orderId:
                    type: string
                    description: Auto generated ID once the order created successfully
                    example: 5349b4ddd2781d08c09890f4
                  orderNumber:
                    type: string
                    description: Unique order number
                    example: '309019176'
                  orderDate:
                    type: string
                    description: Actual order creation date
                    format: date-time
                    example: '2022-05-12T09:30:31.198Z'
                  cancellationDate:
                    type: string
                    description: Order cancellation date if any
                    format: date-time
                    example: '2022-05-12T09:30:31.198Z'
                  allocationDate:
                    type: string
                    description: Order allocation date after order is created
                    format: date-time
                    example: '2022-05-12T09:30:31.198Z'
                  channelId:
                    type: string
                    description: Sales channel ID
                    example: '12'
                  cartId:
                    type: string
                    description: ID of the cart where order is placed
                    example: b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569
                  type:
                    type: string
                    description: Platfrom using which order is created
                    example: WEB
                    enum:
                      - WEB
                      - CSC
                      - MOBILE_APP
                      - POS
                  subType:
                    type: string
                    description: >-
                      Operating system of the platfom as mentioned in the `type`
                      field. If you want to configure any custom valuefor this
                      field, contact fabric.
                    example: International
                    enum:
                      - IOS
                      - Android
                      - International
                  processName:
                    type: string
                    description: Order process name
                    example: CANCEL
                  employeeId:
                    type: string
                    description: >-
                      Employee ID used when an employee places an order on
                      behave of the customer.
                    example: '43278'
                  retail:
                    type: object
                    description: >-
                      Order retail object for reatil transactions. For
                      non-retail transactions, only location number is provided.
                    properties:
                      locationNum:
                        type: integer
                        description: Store number of line item's fulfillment origin.
                        format: int32
                        example: 123
                      cashierId:
                        type: string
                        description: Cashier ID in case of retail transaction.
                        example: C-123
                      registerId:
                        type: string
                        description: >-
                          Registered user ID of the cashier who helps in
                          creating the order. It is applicable for retail
                          transactions.
                        example: '113'
                      transactionId:
                        type: string
                        description: Transaction ID incase of retail transaction.
                        example: R123-431-1133-2129
                  orderSubTotal:
                    type: number
                    description: >-
                      Order value after calculating discounts and any applicable
                      fees
                    example: 123.45
                  originalSubTotal:
                    type: number
                    description: Original order total value
                    example: 113.45
                  orderDiscount:
                    type: number
                    description: Final discount value on order amount
                    example: 1.23
                  originalDiscounts:
                    type: number
                    description: Original discount on order value
                    example: 1.45
                  feeTotal:
                    type: number
                    description: Total fees, if any, applicable on order amount
                    example: 12.34
                  originalFeeTotal:
                    type: number
                    description: Original fees appliable on shipping of items
                    example: 12.34
                  taxTotal:
                    type: number
                    description: Total tax amount appliable on shipping of items
                    example: 12.34
                  appeasementTotal:
                    description: Appeasement amount, if any, processed on the order
                    type: number
                    example: 12.34
                  originalTaxTotal:
                    type: number
                    description: >-
                      Original tax amount on order during fist time order
                      creation
                    example: 12.34
                  returnTotal:
                    type: number
                    description: Return amount incase of order return
                    example: 12.34
                  cancelTotal:
                    type: number
                    description: Cancel amount incase of order cancellation
                    example: 12.34
                  invoiceTotal:
                    type: number
                    description: Invoice value on order
                    example: 12.34
                  orderTotal:
                    type: number
                    description: >-
                      Total order amount after calculating fees, discounts,
                      retrurn and cancellation if any
                    example: 146.9
                  originalOrderTotal:
                    type: number
                    description: >-
                      Order amount during first time order creation after
                      calculating all fees, taxes, and discounts
                    example: 146.9
                  currency:
                    type: string
                    example: USD
                  statusCode:
                    type: string
                    example: ORDER_CREATED
                  statusDescription:
                    type: string
                    example: Order Created
                  attributes:
                    type: object
                    additionalProperties:
                      type: object
                      example:
                        type: String/Number/JSON
                        purchaseOrder: String
                        salesRepId: String
                        approve: String
                        fraudCheckSessionId: aee6d1face0e4d55948d1e30b6240048
                        fraudCheckStatus: UPDATED
                        fraudCheckTransId: 0R12TQ46
                        fraudScore: '31'
                    example:
                      type: String/Number/JSON
                      purchaseOrder: String
                      salesRepId: String
                      approve: String
                      fraudCheckSessionId: aee6d1face0e4d55948d1e30b6240048
                      fraudCheckStatus: UPDATED
                      fraudCheckTransId: 0R12TQ46
                      fraudScore: '31'
                  fees:
                    type: array
                    items:
                      type: object
                      description: Order fee detail model
                      properties:
                        type:
                          type: string
                          example: shipping
                        value:
                          type: number
                          example: 34.56
                        invoiceValue:
                          type: number
                          example: 34.56
                  appeasements:
                    type: array
                    description: Array of appeasements, if any
                    items:
                      type: object
                      description: Order appeasement detail object
                      properties:
                        appeasementCounter:
                          type: integer
                          description: >-
                            Counter number where appeasement is processed. It is
                            used for retail transactions
                          format: int32
                          example: 1
                        reasonCode:
                          type: string
                          example: Incorrect item
                        subReasonCode:
                          type: string
                          example: Late shipping
                        value:
                          type: number
                          description: Appeasement amount
                          example: 34.56
                        invoiceValue:
                          type: number
                          description: >-
                            Appeasement invoice value; should be equal to
                            appeasement value
                          example: 34.56
                        payments:
                          type: array
                          description: Array of appeasement payments
                          items:
                            type: object
                            description: Order appeasement payment information object
                            properties:
                              paymentCounter:
                                type: integer
                                description: >-
                                  Counter number where appeasement payment is
                                  processed
                                format: int32
                                example: 1
                              refundAmount:
                                type: number
                                example: 40
                  discounts:
                    type: array
                    items:
                      type: object
                      description: Order discount object
                      properties:
                        quantity:
                          type: integer
                          format: int32
                          example: 2
                        amount:
                          type: number
                          example: 2.4
                        unit:
                          type: string
                          example: AMOUNT_OFF
                        value:
                          type: integer
                          format: int32
                          example: 2
                        promoId:
                          type: string
                          example: HNY2022
                        promoCode:
                          type: string
                          example: HNY2022
                        promoTitle:
                          type: string
                          example: Happy New Year
                        type:
                          type: string
                          example: promotion
                        invoiceQuantity:
                          type: integer
                          format: int32
                          example: 2
                        returnQuantity:
                          type: integer
                          format: int32
                          example: 2
                        cancelQuantity:
                          type: integer
                          format: int32
                          example: 2
                  customer:
                    type: object
                    description: Order customer model
                    properties:
                      name:
                        type: object
                        description: Name for order details
                        properties:
                          first:
                            type: string
                            example: John
                          middle:
                            type: string
                            example: Middle
                          last:
                            type: string
                            example: Doe
                      email:
                        type: string
                        example: john@fabric.inc
                      phone:
                        type: object
                        description: Contact details of customer for the order
                        properties:
                          number:
                            type: string
                            example: '55555555555'
                          type:
                            type: string
                            example: MOBILE
                            enum:
                              - MOBILE
                              - HOME
                              - BUSINESS
                      userId:
                        type: string
                        description: >-
                          It is shopper's ID who visits company website to
                          purchase products.
                        example: 62272e917b12209e68751d94
                      accountId:
                        type: string
                        description: >-
                          Account ID such as loyalty account ID or memebr
                          account ID. Refers to any external system or fabric's
                          loyalty service that the user has account with.
                        example: 62272e917b12209e68751d94
                      employeeId:
                        type: string
                        description: >-
                          ID of the employee (sales person) who creates an order
                          for shopper.
                        example: 62272e917b12209e68751d94
                      company:
                        type: string
                        example: fabric
                  payments:
                    type: array
                    items:
                      type: object
                      properties:
                        paymentCounter:
                          type: integer
                          format: int32
                          example: 1
                        paymentDate:
                          type: string
                          format: date-time
                          example: '2022-01-27T16:15:58-05:00'
                        billToId:
                          type: string
                          example: 62272e917b12209e68751d94
                        paymentIdentifier:
                          type: object
                          properties:
                            cardIdentifier:
                              type: string
                              description: Last 4 digits from cart number
                              example: '3456'
                            expirationYear:
                              type: string
                              description: Card expiration year
                              example: '2029'
                            expirationMonth:
                              type: string
                              description: Card expiration month
                              example: '2029'
                            paymentId:
                              type: string
                              example: 62272e917b12209e68751d94
                            fabricPaymentReference:
                              type: string
                              example: test
                          description: OrderPaymentIdentifier Model
                        paymentProvider:
                          type: string
                          example: stripe
                        paymentToken:
                          type: object
                          description: Payment token details
                          properties:
                            token:
                              type: string
                              description: Payment token generated by checkout service
                              example: pi_34tr6787rt
                            paymentType:
                              type: string
                              description: >-
                                Used to identify payment type in case of credit
                                cards
                              example: VISA
                        paymentMethod:
                          type: string
                          example: CREDIT_CARD
                        authAmount:
                          type: number
                          example: 123.2
                        chargedAmount:
                          type: number
                          example: 60
                        refundAmount:
                          type: number
                          example: 40
                        currency:
                          type: string
                          example: USD
                        conversion:
                          type: number
                          example: 1
                        paymentStatus:
                          type: string
                          example: OK
                        partialCapture:
                          type: string
                          example: 'false'
                        finalCapture:
                          type: string
                          example: 'false'
                        paymentLog:
                          type: array
                          example: payment response list
                          items:
                            type: object
                            properties:
                              paymentId:
                                type: string
                              status:
                                type: string
                              data:
                                type: object
                                properties:
                                  status:
                                    type: string
                                  body:
                                    type: object
                                    properties:
                                      transactionId:
                                        type: string
                                      transactionTimestamp:
                                        type: string
                                      responseCode:
                                        type: string
                                      status:
                                        type: string
                                      attributes:
                                        type: object
                                        additionalProperties:
                                          type: object
                                      errors:
                                        type: array
                                        items:
                                          type: object
                                          additionalProperties:
                                            type: object
                                    description: PaymentDetailsResponseBody Model
                                description: PaymentDetails Model
                            description: PaymentResponse Model
                            example: payment response list
                        billToAddress:
                          required:
                            - address1
                          type: object
                          description: Order billing or shipping address
                          properties:
                            name:
                              type: object
                              description: Name for order details
                              properties:
                                first:
                                  type: string
                                  example: John
                                middle:
                                  type: string
                                  example: Middle
                                last:
                                  type: string
                                  example: Doe
                            email:
                              type: string
                              example: john123@gmail.com
                            phone:
                              type: object
                              description: Contact details of customer for the order
                              properties:
                                number:
                                  type: string
                                  example: '55555555555'
                                type:
                                  type: string
                                  example: MOBILE
                                  enum:
                                    - MOBILE
                                    - HOME
                                    - BUSINESS
                            address1:
                              type: string
                              example: First line of address
                            address2:
                              type: string
                              example: 123 Parking Lot
                            address3:
                              type: string
                              example: Third line of address
                            address4:
                              type: string
                              example: Fourth line of address
                            city:
                              type: string
                              example: Beaumont
                            state:
                              type: string
                              example: TX
                            country:
                              type: string
                              example: USA
                            postalCode:
                              type: string
                              example: '77705'
                            type:
                              type: string
                              example: residence
                            latitude:
                              type: number
                              description: Latitude of the address
                              example: 35.294952
                            longitude:
                              type: number
                              description: Longitude of the address
                              example: 32.294952
                        attributes:
                          type: object
                          additionalProperties:
                            type: object
                            example:
                              expirationMonth: 12
                          example:
                            expirationMonth: 12
                      description: OrderPayment Model
                  items:
                    maxItems: 2147483647
                    minItems: 1
                    type: array
                    items:
                      required:
                        - itemId
                        - lineItemId
                        - lineItemNumber
                        - shipToId
                        - sku
                      type: object
                      properties:
                        lineItemId:
                          type: string
                          example: b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569
                        lineItemNumber:
                          type: integer
                          format: int32
                          example: 1
                        itemId:
                          type: string
                          example: '1234'
                        sku:
                          type: string
                          example: P1234
                        channelId:
                          type: string
                          example: WHBM
                        segment:
                          type: string
                          example: P1234
                        vendorId:
                          type: string
                          example: P1234
                        title:
                          type: string
                          example: Item
                        type:
                          type: string
                          description: >-
                            Identify order type whether it's pickup item, or web
                            ship, or international order
                          example: WEB_SHIP
                        subType:
                          type: string
                          example: Borderfree
                        backorder:
                          type: boolean
                          description: >-
                            Identify whether this item has been ordered as
                            backorder
                          example: true
                        orderedQuantity:
                          type: integer
                          format: int32
                          example: 60
                        backOrderedQuantity:
                          type: integer
                          format: int32
                          example: 10
                        pendingShippedQuantity:
                          type: integer
                          format: int32
                          example: 10
                        pendingShippedBackOrderQuantity:
                          type: integer
                          format: int32
                          example: 10
                        shippedQuantity:
                          type: integer
                          format: int32
                          example: 10
                        deliveredQuantity:
                          type: integer
                          format: int32
                          example: 10
                        invoiceQuantity:
                          type: integer
                          format: int32
                          example: 10
                        cancelledQuantity:
                          type: integer
                          format: int32
                          example: 10
                        pendingReturnQuantity:
                          type: integer
                          format: int32
                          example: 10
                        processingReturnQuantity:
                          type: integer
                          format: int32
                          example: 10
                        rejectedReturnQuantity:
                          type: integer
                          format: int32
                          example: 10
                        returnedQuantity:
                          type: integer
                          format: int32
                          example: 10
                        reshippedQuantity:
                          type: integer
                          format: int32
                          example: 10
                        uom:
                          type: string
                          example: EA
                        shipToId:
                          type: string
                          description: >-
                            Unique ID to link item with its shipping address. If
                            all items of an order are shipped to single address,
                            then all items will have same shipTo id. If multiple
                            items of an order are shipped to multiple shipping
                            address, then corresponding shipTo id is linked to
                            each item.
                          example: b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569
                        itemUnitPrice:
                          type: number
                          example: 10
                        itemSubTotal:
                          type: number
                          example: 600
                        originalItemSubTotal:
                          type: number
                          example: 600
                        itemFeeTotal:
                          type: number
                          example: 5
                        originalFeeTotal:
                          type: number
                          example: 5
                        itemShippingTotal:
                          type: number
                          example: 5
                        originalShippingTotal:
                          type: number
                          example: 5
                        appeasementTotal:
                          type: number
                          example: 5.5
                        itemDiscountsTotal:
                          type: number
                          example: 55
                        originalDiscounts:
                          type: number
                          example: 55
                        itemTaxTotal:
                          type: number
                          example: 5
                        originalTaxTotal:
                          type: number
                          example: 555
                        itemTotal:
                          type: number
                          example: 555
                        originalItemTotal:
                          type: number
                          example: 555
                        outstandingItemTotal:
                          type: number
                          example: 555
                        originalOutstandingItemTotal:
                          type: number
                          example: 555
                        invoiceTotal:
                          type: number
                          example: 555
                        currency:
                          type: string
                          example: USD
                        employeeId:
                          type: string
                          example: 5345HJH
                        associateId:
                          type: string
                          example: 5345HJH
                        fees:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                example: tax
                              value:
                                type: number
                                example: 34.56
                              invoiceQuantity:
                                type: integer
                                format: int32
                                example: 34
                              refundAmount:
                                type: number
                                example: 10.4
                              quantity:
                                type: integer
                                format: int32
                                example: 12
                            description: OrderInvoiceDetail Model
                        appeasements:
                          type: array
                          items:
                            type: object
                            description: Order appeasement detail object
                            properties:
                              appeasementCounter:
                                type: integer
                                description: >-
                                  Counter number where appeasement is processed.
                                  It is used for retail transactions
                                format: int32
                                example: 1
                              reasonCode:
                                type: string
                                example: Incorrect item
                              subReasonCode:
                                type: string
                                example: Late shipping
                              value:
                                type: number
                                description: Appeasement amount
                                example: 34.56
                              invoiceValue:
                                type: number
                                description: >-
                                  Appeasement invoice value; should be equal to
                                  appeasement value
                                example: 34.56
                              payments:
                                type: array
                                description: Array of appeasement payments
                                items:
                                  type: object
                                  description: Order appeasement payment information object
                                  properties:
                                    paymentCounter:
                                      type: integer
                                      description: >-
                                        Counter number where appeasement payment
                                        is processed
                                      format: int32
                                      example: 1
                                    refundAmount:
                                      type: number
                                      example: 40
                        returns:
                          type: array
                          items:
                            type: object
                            properties:
                              shipmentId:
                                type: string
                                example: '12353543'
                              shipmentLineItemId:
                                type: string
                                example: '2412341'
                              shipmentQuantity:
                                type: integer
                                format: int32
                                example: 1
                              refundAmount:
                                type: number
                                example: 11.29
                              invoicedAmount:
                                type: number
                                example: 11.29
                              returnsCreatedAt:
                                type: string
                                format: date-time
                                example: '2022-09-14T14:07:36.861Z'
                            description: OrderReturns Model
                        taxCode:
                          type: string
                          example: FR01
                        taxDetail:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                example: tax
                              value:
                                type: number
                                example: 34.56
                        discounts:
                          type: array
                          items:
                            type: object
                            description: Order discount object
                            properties:
                              quantity:
                                type: integer
                                format: int32
                                example: 2
                              amount:
                                type: number
                                example: 2.4
                              unit:
                                type: string
                                example: AMOUNT_OFF
                              value:
                                type: integer
                                format: int32
                                example: 2
                              promoId:
                                type: string
                                example: HNY2022
                              promoCode:
                                type: string
                                example: HNY2022
                              promoTitle:
                                type: string
                                example: Happy New Year
                              type:
                                type: string
                                example: promotion
                              invoiceQuantity:
                                type: integer
                                format: int32
                                example: 2
                              returnQuantity:
                                type: integer
                                format: int32
                                example: 2
                              cancelQuantity:
                                type: integer
                                format: int32
                                example: 2
                        attributes:
                          type: object
                          additionalProperties:
                            type: object
                            example:
                              isDonation: true
                              isGiftCard: false
                              isFinalSale: false
                              returnsLink: true
                          example:
                            isDonation: true
                            isGiftCard: false
                            isFinalSale: false
                            returnsLink: true
                        exchangeItem:
                          type: boolean
                          example: true
                        parentLineItemNumber:
                          type: integer
                          format: int32
                          example: 12
                        pendingExchangeQuantity:
                          type: integer
                          format: int32
                          example: 12
                        exchangeQuantity:
                          type: integer
                          format: int32
                          example: 13
                        refundAmount:
                          type: number
                          example: 12.4
                        lineOrderStatus:
                          type: string
                          example: VALID
                        infiniteConsent:
                          type: boolean
                          example: true
                        notes:
                          type: array
                          description: Notes section to be used for CSR only
                          items:
                            type: object
                            properties:
                              timestamp:
                                type: string
                                example: '2022-05-12T09:30:31.198Z'
                              user:
                                type: string
                                example: 62272e917b12209e68751d94
                              notes:
                                type: string
                                example: Extra information to be provided
                        gifting:
                          type: boolean
                          example: true
                      description: OrderItem Model
                  shipInfo:
                    maxItems: 2147483647
                    minItems: 1
                    type: array
                    items:
                      required:
                        - shipToId
                      type: object
                      description: Order shipping info
                      properties:
                        shipToId:
                          type: string
                          description: >-
                            Unique ID to link item with its shipping address. If
                            all items of an order are shipped to single address,
                            then all items will have same shipTo id. If multiple
                            items of an order are shipped to multiple shipping
                            address, then corresponding shipTo id is linked to
                            each item.
                          example: 5349b4ddd2781d08c09890f4
                        taxCode:
                          type: string
                          description: >-
                            Code for the tax applied for shiping of items to the
                            adress
                          example: FR01
                        locationNum:
                          type: string
                          description: >-
                            Location number to be used for BOPIS (Buy Online
                            Purchase In Store) to identify the pickup store
                          example: '123'
                        pickup:
                          type: array
                          items:
                            type: object
                            description: Details of the person who picks up the order
                            properties:
                              name:
                                type: object
                                description: Name for order details
                                properties:
                                  first:
                                    type: string
                                    example: John
                                  middle:
                                    type: string
                                    example: Middle
                                  last:
                                    type: string
                                    example: Doe
                              email:
                                type: string
                                example: john123@gmail.com
                              phone:
                                type: object
                                description: Contact details of customer for the order
                                properties:
                                  number:
                                    type: string
                                    example: '55555555555'
                                  type:
                                    type: string
                                    example: MOBILE
                                    enum:
                                      - MOBILE
                                      - HOME
                                      - BUSINESS
                              pickupType:
                                type: string
                                example: Primary
                                enum:
                                  - Primary
                                  - Alternate
                        shipToAddress:
                          required:
                            - address1
                          type: object
                          description: Order billing or shipping address
                          properties:
                            name:
                              type: object
                              description: Name for order details
                              properties:
                                first:
                                  type: string
                                  example: John
                                middle:
                                  type: string
                                  example: Middle
                                last:
                                  type: string
                                  example: Doe
                            email:
                              type: string
                              example: john123@gmail.com
                            phone:
                              type: object
                              description: Contact details of customer for the order
                              properties:
                                number:
                                  type: string
                                  example: '55555555555'
                                type:
                                  type: string
                                  example: MOBILE
                                  enum:
                                    - MOBILE
                                    - HOME
                                    - BUSINESS
                            address1:
                              type: string
                              example: First line of address
                            address2:
                              type: string
                              example: 123 Parking Lot
                            address3:
                              type: string
                              example: Third line of address
                            address4:
                              type: string
                              example: Fourth line of address
                            city:
                              type: string
                              example: Beaumont
                            state:
                              type: string
                              example: TX
                            country:
                              type: string
                              example: USA
                            postalCode:
                              type: string
                              example: '77705'
                            type:
                              type: string
                              example: residence
                            latitude:
                              type: number
                              description: Latitude of the address
                              example: 35.294952
                            longitude:
                              type: number
                              description: Longitude of the address
                              example: 32.294952
                        taxDetail:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                example: tax
                              value:
                                type: number
                                example: 34.56
                        shipMethod:
                          type: string
                          example: Express Delivery
                        shipToType:
                          type: string
                          example: SHIP_TO_ADDRESS
                        estimatedShipDate:
                          type: string
                          format: date-time
                          example: '2022-05-12T09:30:31.198Z'
                        estimatedDeliveryDate:
                          type: string
                          format: date-time
                          example: '2022-05-12T09:30:31.198Z'
                        shipToPrice:
                          type: number
                          description: >-
                            Amount applicable for shipping the item to the
                            address
                          example: 20
                        shipToDiscount:
                          type: number
                          description: >-
                            Discount amount applied for shipping the item to the
                            address
                          example: 12.6
                        shipToTaxTotal:
                          type: number
                          description: Total tax applicable to ship the item to the address
                          example: 12.6
                        shipmentInstructions:
                          type: string
                          description: Additional user instructions
                          example: User instructions
                        attributes:
                          type: object
                          additionalProperties:
                            type: object
                            example:
                              isOpenBox: false
                              isOTPDElivery: true
                          example:
                            isOpenBox: false
                            isOTPDElivery: true
                  auditLogs:
                    type: array
                    items:
                      type: object
                      properties:
                        auditId:
                          type: string
                          example: 62272e917b12209e68751d94
                        auditType:
                          type: string
                        employeeId:
                          type: string
                          example: 62272e917b12209e68751d94
                        auditTimestamp:
                          type: string
                          format: date-time
                          example: '2022-05-12T09:24:54.804Z'
                        source:
                          type: string
                          example: POS
                        reasonCode:
                          type: string
                          example: POS
                        subReasonCode:
                          type: string
                          example: POS
                        policyCode:
                          type: string
                          example: POS
                        note:
                          type: string
                          example: Note
                        lineItemId:
                          type: string
                          example: b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569
                        lineItemNumber:
                          type: integer
                          format: int32
                          example: 1
                        sku:
                          type: string
                          example: F5F
                        quantity:
                          type: integer
                          format: int32
                          example: 1
                        amount:
                          type: number
                          example: 2.4
                        paymentToken:
                          type: object
                          description: Payment token details
                          properties:
                            token:
                              type: string
                              description: Payment token generated by checkout service
                              example: pi_34tr6787rt
                            paymentType:
                              type: string
                              description: >-
                                Used to identify payment type in case of credit
                                cards
                              example: VISA
                        success:
                          type: boolean
                          example: true
                        paymentResponse:
                          type: object
                        updatedFields:
                          type: array
                          items:
                            type: object
                            properties:
                              fieldName:
                                type: string
                                example: UOM
                              fieldOriginalValue:
                                type: string
                                example: PK
                            description: OrderAuditLogUpdatedField Model
                        attributes:
                          type: object
                          additionalProperties:
                            type: object
                      description: OrderAuditLog Model
                  notes:
                    type: array
                    items:
                      type: object
                      properties:
                        timestamp:
                          type: string
                          example: '2022-05-12T09:30:31.198Z'
                        user:
                          type: string
                          example: 62272e917b12209e68751d94
                        notes:
                          type: string
                          example: Extra information to be provided
                  orderReleaseTimestamp:
                    type: string
                    description: Order dispatched date and time
                    format: date-time
                  createdAt:
                    type: string
                    description: >-
                      Date and time when the original order is modified for the
                      first time, for example for return, cancellation or
                      replacement
                    format: date-time
                  updatedAt:
                    description: Date and time when the exisiting order is updated
                    type: string
                    format: date-time
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                description: Error response
              example:
                message: Bad request
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                description: Error response
              example:
                message: Order not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                description: Error response
              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

````