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

# Search for invoices

> Search for invoices by matching filter criteria.



## OpenAPI

````yaml invoices.openapi post /invoices/search
openapi: 3.0.1
info:
  contact:
    email: support@fabric.inc
    name: fabric Support Team
  description: >-
    fabric **Invoices** API helps in generating invoices that can be used by any
    third party system for order fulfillment operation.
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
  termsOfService: https://fabric.inc/terms-of-use
  title: Orders - Invoices API
  version: 3.0.0
  x-audience: external-public
servers:
  - description: Production
    url: https://api.fabric.inc/v3
security:
  - authorization: []
tags:
  - description: >-
      fabric **Invoices** API helps in generating invoices that can be used by
      any third party system for order fulfillment operation.
    name: Invoices
externalDocs:
  description: Find out more about fabric Orders (also called OMS)
  url: https://developer.fabric.inc/v3/docs/orders-overview
paths:
  /invoices/search:
    post:
      tags:
        - Invoices
      summary: Search for invoices
      description: Search for invoices by matching filter criteria.
      operationId: searchInvoices
      parameters:
        - in: query
          name: fetchOnlyIds
          required: false
          schema:
            default: false
            type: boolean
        - description: >-
            Number of records to skip before returning all records. Default is
            `0` if no value is specified.
          example: 0
          in: query
          name: offset
          schema:
            default: 0
            example: 0
            format: int32
            type: integer
        - description: >-
            Maximum number of records returned per page. Default is `10` if no
            value is specified.
          example: 10
          in: query
          name: limit
          schema:
            default: 10
            example: 10
            format: int32
            maximum: 100
            minimum: 1
            type: integer
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xFabricRequestId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/invoiceSearchRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/invoiceSearchResponse'
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
        '400':
          content:
            application/json:
              example:
                errors:
                  - message: Invalid request
                    type: CLIENT_ERROR
                message: Bad request
                type: CLIENT_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
        '401':
          content:
            application/json:
              example:
                message: Unauthorized request
                type: CLIENT_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
        '500':
          content:
            application/json:
              example:
                message: Internal server error
                type: SERVER_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
components:
  parameters:
    xFabricTenantId:
      description: >-
        A header used by fabric to identify the tenant making the request. You
        must include tenant id in the authentication header for an API request
        to access any of fabric’s endpoints. You can retrieve the tenant id ,
        which is also called account id, from
        [Copilot](/v3/platform/settings/account-details/getting-the-account-id).
        This header is required.
      example: 5f328bf0b5f328bf0b5f328b
      in: header
      name: x-fabric-tenant-id
      required: true
      schema:
        type: string
    xFabricChannelId:
      description: >-
        x-fabric-channel-id identifies the sales channel where the API request
        is being made; primarily for multichannel use cases. The channel ids are
        12 corresponding to US and 13 corresponding to Canada. The default
        channel id is 12. This field is required.
      example: '12'
      in: header
      name: x-fabric-channel-id
      required: true
      schema:
        type: string
    xFabricRequestId:
      description: Unique request ID
      example: 263e731c-45c8-11ed-b878-0242ac120002
      in: header
      name: x-fabric-request-id
      required: false
      schema:
        type: string
  schemas:
    invoiceSearchRequest:
      description: Sort and filter criteria for invoice search
      example:
        filters:
          - condition: EQ
            field: invoice.orders.orderNumber
            value: '30490384'
          - condition: IN
            field: invoice.invoiceType
            values:
              - RETURN
              - SHIPMENT
        sort: '-invoice.invoicedAt'
      properties:
        filters:
          items:
            oneOf:
              - $ref: '#/components/schemas/valueSearchFilter'
              - $ref: '#/components/schemas/valuesSearchFilter'
          maxItems: 50
          minItems: 0
          type: array
        sort:
          default: '-invoice.invoicedAt'
          description: >-
            Property by which data is sorted. **Note**: `-` refers to descending
            and `+` refers to ascending order
          example: +invoice.invoicedAt
          pattern: (^[+-]invoice\.[a-zA-Z.\-_]*)(,([+-]invoice\.[a-zA-Z.\-_]*)){0,}
          type: string
      required:
        - filters
      type: object
    invoiceSearchResponse:
      description: Invoice search response
      properties:
        data:
          items:
            $ref: '#/components/schemas/invoiceResponse'
          type: array
        pagination:
          $ref: '#/components/schemas/pagination'
      type: object
    errorResponse:
      description: Error response
      properties:
        errors:
          description: Errors
          items:
            $ref: '#/components/schemas/errorResponse'
          type: array
        message:
          description: Error message
          example: Bad request
          type: string
        type:
          description: Error type
          example: CLIENT_ERROR
          type: string
      type: object
    valueSearchFilter:
      allOf:
        - $ref: '#/components/schemas/invoiceSearchFilter'
        - properties:
            value:
              description: A single value for `field` using which data is searched
              example: ORDER_CREATE
              oneOf:
                - description: Target record's non-numeric identifier
                  example: ORDER_CREATE
                  type: string
                - description: Target record's numeric identifier
                  example: 112233
                  format: int64
                  type: number
                - description: Target record's numeric identifier
                  example: 1122.33
                  format: double
                  type: number
          type: object
      description: >-
        Criteria to find invoice by a single value. Condition between `field`
        and `value` is anything except IN and NIN when `valueSearchFilter` is
        used.
      required:
        - condition
        - field
      type: object
    valuesSearchFilter:
      allOf:
        - $ref: '#/components/schemas/invoiceSearchFilter'
        - properties:
            values:
              items:
                description: Multiple values for the field using which data is searched.
                example: ORDER_CREATE
                oneOf:
                  - description: Target record's non-numeric identifier
                    example: ORDER_CREATE
                    type: string
                  - description: Target record's numeric identifier
                    example: 112233
                    format: int64
                    type: number
                  - description: Target record's numeric identifier
                    example: 1122.33
                    format: double
                    type: number
              maxItems: 25
              minItems: 1
              type: array
          type: object
      description: >-
        Criteria to find invoices using multiple values. Condition between
        `field` and `values` is either IN or NIN when `valuesSearchFilter` is
        used.
      required:
        - condition
        - field
      type: object
    invoiceResponse:
      description: The invoice response model.
      type: object
      properties:
        acknowledgedAt:
          type: string
          format: date-time
          description: >-
            This is the timestamp of when the merchant acknowledged the invoice
            in UTC.
          example: '2022-08-01T20:03:28.483Z'
        auditLogs:
          description: This array contains audit logs that track invoice lifecycle events.
          items:
            $ref: '#/components/schemas/auditLog'
          type: array
        channelId:
          type: string
          description: This is the sales channel ID.
          example: '10'
        createdAt:
          type: string
          format: date-time
          description: This is the timestamp of when the invoice was created in UTC.
          example: '2022-08-01T20:03:28.483Z'
        currency:
          type: string
          description: This is the ISO 4217 currency code for invoiced amounts.
          example: USD
        customer:
          $ref: '#/components/schemas/invoiceCustomer'
          description: This object contains customer details.
        invoiceId:
          type: string
          description: This is the system-generated unique invoice ID.
          example: 62ff5c0bec0aed3c86202c32
        invoiceExternalId:
          type: string
          description: >-
            This is an optional identifier assigned to the invoice by the
            merchant.
          example: '191763090'
        invoiceNumber:
          type: string
          description: >-
            This is a merchant-defined unique invoice number. If omitted, fabric
            generates one using the Configuration service’s sequence generator.
          example: '23940791'
        invoiceStatus:
          description: >-
            This field shows the system-generated invoice status. **CAPTURED** —
            The `authorizedAmount` was successfully captured. **SETTLED** — The
            `authorizedAmount` was successfully settled with the customer. This
            may mean the amount was fully paid or refunded in case of returns.
            **SETTLE_FAILED** — The settlement of the `authorizedAmount` failed.
            **PARTIAL_SETTLED** — Only part of the `authorizedAmount` was
            settled.
          enum:
            - CAPTURED
            - SETTLED
            - SETTLE_FAILED
            - PARTIAL_SETTLED
          example: CAPTURED
          type: string
        invoiceTotal:
          description: This is the total invoiced amount captured for the order.
          example: 245.7
          format: double
          type: number
        invoiceTotalInCurrencies:
          type: array
          description: >
            The total invoiced amount represented in one or more currencies.  

            Each entry specifies the total value and its corresponding currency
            code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        invoiceType:
          description: >-
            This field specifies the system-updated invoice type. **RETURN** —
            Created for order returns. **SHIPPING** — Created when items are
            shipped. **APPEASEMENT** — Created for customer appeasements.
            **ORDER_DONATION** — Created when an order is donated.
            **ORDER_CARRY** — Created for Cash & Carry orders. **EXCHANGE** —
            Created for order exchanges.
          enum:
            - RETURN
            - SHIPPING
            - APPEASEMENT
            - ORDER_DONATION
            - ORDER_CARRY
            - EXCHANGE
          example: SHIPPING
          type: string
        invoicedAt:
          type: string
          format: date-time
          description: >-
            This is the system-generated timestamp of when the invoice was
            created in UTC.
          example: '2022-08-01T20:03:28.483Z'
        location:
          $ref: '#/components/schemas/invoiceLocation'
          description: This object contains location details.
        locationNumber:
          description: >-
            This is the unique identifier of the ship-from location. The value
            must match the `locationNumber` stored in the fabric Location
            service.
          example: WH334
          type: string
        orders:
          description: This array contains the invoice order details.
          items:
            $ref: '#/components/schemas/invoiceOrder'
          type: array
        postedAt:
          type: string
          format: date-time
          description: >-
            This is the timestamp of when the invoice was sent to a third-party
            system for financial processing in UTC.
          example: '2022-08-01T20:03:28.483971941Z'
        retail:
          $ref: '#/components/schemas/invoiceRetail'
          description: This object contains optional retail details.
        shipInfo:
          $ref: '#/components/schemas/orderShipInfo'
          description: This object contains shipment information.
        shipmentId:
          type: string
          description: >-
            This is the 24-character system-generated shipment ID. The invoice
            is created against this shipment.
          example: 62ff5c0bec0aed3c86202c32
        shipmentNumber:
          type: string
          description: >-
            This is the merchant-specified shipment number. The invoice is
            created against this shipment.
          example: '217088603'
        shippedAt:
          type: string
          format: date-time
          description: This is the timestamp of when the order was shipped in UTC.
          example: '2022-08-01T20:03:28.483Z'
        statusCode:
          type: string
          description: >-
            This field indicates the current invoice processing status.
            **CREATED** — The invoice was generated by fabric. **POSTED** — The
            Invoice service sent a notification to the webhook service.
            **ACKNOWLEDGED** — The merchant acknowledged the invoice
            successfully.
          enum:
            - CREATED
            - POSTED
            - ACKNOWLEDGED
          example: CREATED
        totalTaxAmount:
          description: This is the total tax amount included in the invoice.
          example: 19.57
          format: double
          type: number
        totalTaxAmountInCurrencies:
          type: array
          description: >
            The total tax amount invoiced represented in one or more
            currencies.  

            Each entry includes the tax value and its corresponding currency
            code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        updatedAt:
          type: string
          format: date-time
          description: This is the timestamp of when the invoice was last updated in UTC.
          example: '2022-08-01T20:03:28.483971941Z'
        version:
          type: integer
          format: int64
          description: >-
            This field indicates the current version of the invoice document.
            The number increases each time the invoice is updated.
          example: 2
      required:
        - channelId
        - currency
        - invoiceId
        - invoiceTotal
        - shipmentId
        - statusCode
        - totalTaxAmount
        - version
    pagination:
      description: Pagination response
      properties:
        count:
          description: Total number of search results
          example: 1000
          format: int32
          type: integer
        limit:
          default: 10
          description: Maximum number of records per page
          example: 10
          format: int32
          maximum: 100
          minimum: 1
          type: integer
        offset:
          default: 0
          description: >-
            Number of records to skip before returning all records. For example,
            `offset=20, limit=10` returns records 21-30.
          example: 1
          format: int32
          minimum: 0
          type: integer
      type: object
    invoiceSearchFilter:
      description: >-
        Criteria to find invoice. To search using a single value,
        `valueSearchFilter` is used. To search using multiple values,
        `valuesSearchFilter` is used.
      discriminator:
        mapping:
          EQ:
            $ref: '#/components/schemas/valueSearchFilter'
          GT:
            $ref: '#/components/schemas/valueSearchFilter'
          GTE:
            $ref: '#/components/schemas/valueSearchFilter'
          IN:
            $ref: '#/components/schemas/valuesSearchFilter'
          LT:
            $ref: '#/components/schemas/valueSearchFilter'
          LTE:
            $ref: '#/components/schemas/valueSearchFilter'
          NEQ:
            $ref: '#/components/schemas/valueSearchFilter'
          NIN:
            $ref: '#/components/schemas/valuesSearchFilter'
        propertyName: condition
      properties:
        condition:
          default: EQ
          description: >-
            Filter conditions. EQ (Equal to): Searches for exact match. NEQ (Not
            equal to): Searches by excluding the specified value. IN: Search for
            multiple values. NIN (Not IN): Excludes the specified values in the
            search. LT (Less than): Searches for values that are less than the
            specified value. GT (Greater than):  Search for values that are
            greater than the specified value. LTE (Less than or equal to):
            Searches for values that are less than or equal to the specified
            value. GTE (Greater than or equal to): Searches for values that are
            greater than or equal to the specified value.
          enum:
            - EQ
            - NEQ
            - IN
            - NIN
            - LT
            - GT
            - LTE
            - GTE
          example: EQ
          type: string
        field:
          description: Field name
          example: invoice.invoiceType
          pattern: ^invoice\.[a-zA-Z.\-_]*
          type: string
        group:
          default: Default
          description: The group name.
          example: GroupA
          type: string
      required:
        - condition
        - field
      type: object
    auditLog:
      description: Audit log to capture change history
      properties:
        amount:
          description: Amount for which audit's done
          example: 2.4
          format: double
          type: number
        auditId:
          description: System-generated audit ID (UUID format)
          example: a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111
          type: string
        auditType:
          description: Audit type such as cancel, return, etc.
          example: CANCEL
          type: string
        auditedAt:
          description: Audit time (UTC)
          example: '2023-03-12T09:24:54.804Z'
          format: date-time
          type: string
        employeeId:
          description: Employee (ID or name) who made the last update
          example: '6227'
          type: string
        isSuccess:
          default: false
          description: >-
            true: Update operation (any update to the service) is successful 
            false: Update operation has failed
          example: true
          type: boolean
        lineItemId:
          description: >-
            Merchant-defined unique identifier for each item in an order. When
            omitted, fabric will generate it during order creation, in UUID
            format.
          example: b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569
          type: string
        lineItemNumber:
          description: Item identifier
          example: 1
          format: int32
          type: integer
        note:
          description: Additional info, if any
          example: Note
          type: string
        paymentToken:
          $ref: '#/components/schemas/orderPaymentToken'
        policyCode:
          description: >-
            Configurable in Copilot as per requirement. If omitted, default
            policy is used.
          example: POS
          type: string
        quantity:
          description: Ordered quantity of given item
          example: 1
          format: int32
          type: integer
        reasonCode:
          description: Merchant-defined reason code, varies from merchant to merchant
          example: Scratched item
          type: string
        sku:
          description: Stock keeping unit (SKU), unique item identifier
          example: SKU0023
          type: string
        source:
          description: >-
            Merchant-defined source from where the update was initiated. There
            are no predefined values; possible values could be Customer Service
            Representative (CSR), Point-of-Sale (POS), etc.
          example: POS
          type: string
        subReasonCode:
          description: >-
            Merchant-defined sub reason code; provides more clarity to audit
            reason
          example: Scratched item
          type: string
        updatedFields:
          description: Audit log for change history
          items:
            $ref: '#/components/schemas/orderAuditLogUpdatedField'
          type: array
      type: object
    invoiceCustomer:
      description: Customer details for the generated invoice
      properties:
        accountId:
          description: >-
            Customer's loyalty account ID or external identifier that's used to
            track their loyalty program activity and rewards earned.
          example: 62272e917b12209e68751d94
          type: string
        address:
          $ref: '#/components/schemas/address'
        company:
          description: Shopper's company name. This may be used for company discounts.
          example: Demo Inc
          type: string
        email:
          description: Contact person's email
          example: test@example.com
          type: string
        employeeId:
          description: Employee (ID or name) who initiated an update request
          example: 62272e917b12209e68751d94
          type: string
        name:
          $ref: '#/components/schemas/orderContactName'
        phone:
          $ref: '#/components/schemas/orderContactPhone'
        userId:
          description: >-
            Identifier of the logged in user who initiated the request. This
            could be from either fabric Identity service or an external Identity
            service.
          example: 62272e917b12209e68751d94
          type: string
      type: object
    amountInCurrencyResource:
      type: object
      description: Amount in currency details
      properties:
        currency:
          type: string
          description: Currency in ISO-4217
          example: USD
        group:
          type: string
          description: Customer-defined function name which uses this currency.
          example: SHOPPER
        amount:
          type: number
          format: double
          description: Amount in currency
          example: 123.45
      required:
        - currency
        - group
    invoiceLocation:
      description: Contains location details regarding shipment if `invoiceType= SHIPPING`
      properties:
        address:
          $ref: '#/components/schemas/addressWithContactsResource'
        locationNumber:
          description: >-
            If `invoiceType= SHIPPING`, location number refers to the inventory
            location from where the order is fulfilled.
          example: WH334
          type: string
      type: object
    invoiceOrder:
      description: Invoice order details
      properties:
        adjustments:
          items:
            $ref: '#/components/schemas/invoiceAdjustmentResource'
          type: array
        appeasements:
          description: Invoice appeasement details
          items:
            $ref: '#/components/schemas/orderAppeasementDetail'
          type: array
        discounts:
          description: Invoicing discount list
          items:
            $ref: '#/components/schemas/discount'
          type: array
        fees:
          description: Invoice fee details
          items:
            $ref: '#/components/schemas/invoiceFeeDetail'
          type: array
        invoiceOrderTotal:
          description: Total amount charged for the order
          example: 245.7
          format: double
          type: number
        items:
          description: Invoicing item list
          items:
            $ref: '#/components/schemas/invoiceItem'
          type: array
        orderId:
          description: >-
            24-character system-generated unique order ID (UUID) for which
            invoice is created
          example: 62ff5c0bec0aed3c86202c32
          type: string
        orderNumber:
          description: >-
            Merchant-specified order number for which invoice is created.
            **Note**: Order number can either be merchant-defined during Order
            creation request or it can be generated by fabric’s sequence
            generator feature in the Configuration service.
          example: '217088603'
          type: string
        orderExternalId:
          type: string
          description: An optional identifier assigned to the order by the merchant.
          example: 217088603
        orderSubtype:
          description: Order subtype for further order classification
          enum:
            - IOS
            - ANDROID
            - INTERNATIONAL
          example: INTERNATIONAL
          type: string
        orderType:
          description: >-
            Order type. Critical in order life cycle as it indicates the
            workflow that varies with the type. For example, Storefront orders
            have a different workflow than a Call Center order. fabric Orders
            service offers default configurations for Storefront, Call Center,
            Point of Sale, iOS, Android, and International
          enum:
            - WEB
            - CSC
            - MOBILE_APP
            - POS
          example: WEB
          type: string
        orderedAt:
          description: System-generated order creation time
          example: '2022-05-12T09:30:31.198Z'
          format: date-time
          type: string
        payments:
          description: Invoicing payment list
          items:
            $ref: '#/components/schemas/invoicePaymentResource'
          type: array
        returns:
          items:
            $ref: '#/components/schemas/orderReturnsInfo'
          type: array
        taxDetails:
          description: Invoicing tax details
          items:
            $ref: '#/components/schemas/invoiceTaxDetail'
          type: array
      required:
        - invoiceOrderTotal
        - orderId
      type: object
    invoiceRetail:
      description: Invoice retail sample
      properties:
        cashierId:
          description: Merchant-specified cashier ID during invoice creation
          example: CE-321
          type: string
        locationNumber:
          description: >-
            Unique value to identify ship-from location. This must be the
            `locationNumber` stored in the fabric Location service.
          example: WH334
          type: string
      type: object
    orderShipInfo:
      type: object
      description: Order shipment details
      properties:
        attributes:
          type: object
          description: >-
            User-defined custom attributes (key–value pairs) for additional
            information.
          example:
            giftMessage: '[]'
        discounts:
          type: array
          description: Shipping discount details
          items:
            $ref: '#/components/schemas/shippingDiscount'
        estimatedDeliveryDate:
          type: string
          format: date-time
          description: Estimated delivery time (UTC) provided by carrier
          example: '2022-05-12T09:30:31.198Z'
        estimatedShipDate:
          type: string
          format: date-time
          description: Estimated shipping time (UTC) provided by merchant
          example: '2022-05-12T09:30:31.198Z'
        fulfillmentZoneName:
          type: string
          description: >-
            The fulfillment zone name used to determine fulfillment location and
            network.
          example: US_LOCATIONS
        isInvoiced:
          type: boolean
          default: false
          description: >
            true: At least one captured invoice is created by the Invoice
            service;  

            false: A captured invoice is not created.
          example: true
        locationNumber:
          type: string
          description: >-
            Unique value to identify ship-from or Buy Online Pickup from Store
            location. This must be the `locationNumber` stored in the fabric
            Location service.
          example: WH334
        pickups:
          type: array
          description: Order pickup details
          items:
            $ref: '#/components/schemas/orderPickup'
        shipMethod:
          type: string
          description: Shipping method
          example: Parcel post delivery
        shipToAddress:
          $ref: '#/components/schemas/address'
        shipToDiscount:
          type: number
          format: double
          description: Merchant-defined shipping discount amount
          example: 12.6
        shipToDiscountInCurrencies:
          type: array
          description: >
            The shipping discount amount represented in one or more currencies.

            Each entry specifies the discount value and its corresponding
            currency code,

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        shipToId:
          type: string
          description: >-
            System-generated UUID associated with `shipInfo`, generated from CnC
            service. An order can have multiple ship-to (delivery) locations and
            items going to the same location share one `shipToId`.
          example: b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569
        shipToPrice:
          type: number
          format: double
          description: Net shipping cost, including discounts
          example: 20
        shipToPriceInCurrencies:
          type: array
          description: >
            The net shipping cost (inclusive of discounts) represented in one or
            more currencies.

            Each entry specifies the value and its corresponding currency code,

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        shipToTaxTotal:
          type: number
          format: double
          description: Total shipping tax
          example: 12.6
        shipToTaxTotalInCurrencies:
          type: array
          description: >
            The total shipping tax represented in one or more currencies.

            Each entry specifies the tax value and its corresponding currency
            code,

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        shipToType:
          type: string
          description: >-
            Type of shipping address. There are no pre-defined values; possible
            values include SDD (Same Day Delivery), Point-of-Sale (POS), etc.
          example: SHIP_TO_ADDRESS
        shipToUnitPrice:
          type: number
          format: double
          description: Merchant-defined shipping cost (unit price before discounts)
          example: 20
        shipToUnitPriceInCurrencies:
          type: array
          description: >
            The merchant-defined shipping unit price (before discounts)
            represented in one or more currencies.

            Each entry specifies the value and its corresponding currency code,

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        shipmentInstructions:
          type: string
          description: Shipment instructions
          example: Handle with care
        taxCode:
          type: string
          description: Applicable tax code; varies by state or region
          example: FR01
        taxDetails:
          type: array
          description: Shipping tax details
          items:
            $ref: '#/components/schemas/taxDetail'
      required:
        - shipToId
    orderPaymentToken:
      description: Order payment token details
      properties:
        paymentType:
          description: >-
            Payment type, for example, credit card payment providers can be
            Visa, Mastercard, American express, etc.
          example: VISA
          type: string
        token:
          description: Payment token provided by payment provider
          example: pi_34tr6787rt
          type: string
      type: object
    orderAuditLogUpdatedField:
      description: Audit log for change history
      properties:
        fieldName:
          description: Field or property name that was updated
          example: UOM
          type: string
        fieldOriginalValue:
          description: Original value of `fieldName` before it was updated
          example: PK
          type: string
      type: object
    address:
      description: Address details
      properties:
        addressLine1:
          description: Address line 1
          example: 123 Main St.
          type: string
        addressLine2:
          description: Address line 2
          example: Suite 100
          type: string
        addressLine3:
          description: Address line 3
          example: Seventh floor
          type: string
        addressLine4:
          description: Address line 4
          example: 'Attention: Pat E. Kake'
          type: string
        city:
          description: City name
          example: Seattle
          type: string
        countryCode:
          description: ISO 3166-1 alpha-2 based country code
          example: US
          type: string
        email:
          description: Contact person's email
          example: test@example.com
          type: string
        latitude:
          description: >-
            Address latitude, used with `longitude` to specify the address
            location. Decimal degrees format; negative is degrees South.
            **Note:**Value must be between -90 and 90, both inclusive.
          example: 47.6205
          format: double
          type: number
        longitude:
          description: >-
            Address longitude, used with `latitude` to specify the address
            location. Decimal degrees format; negative is degrees South.
            **Note:**Value must be between -180 and 180, both inclusive.
          example: -122.3493
          format: double
          type: number
        name:
          $ref: '#/components/schemas/orderContactName'
        phone:
          $ref: '#/components/schemas/orderContactPhone'
        postalCode:
          description: Postal or ZIP code
          example: '98121'
          type: string
        region:
          description: Region or state
          example: WA
          type: string
        type:
          description: Address type
          example: Home
          type: string
      required:
        - addressLine1
        - city
        - countryCode
        - latitude
        - longitude
        - postalCode
        - region
        - type
      type: object
    orderContactName:
      description: Contact person's name
      properties:
        firstName:
          description: Contact person's first name
          example: Alex
          type: string
        lastName:
          description: Contact person's last name
          example: Doe
          type: string
        middleName:
          description: Contact person's middle name or initial
          example: E
          type: string
      type: object
    orderContactPhone:
      description: Contact person's phone details
      properties:
        number:
          description: Contact person's phone number
          example: 123-456-7890
          type: string
        type:
          description: Contact number type
          enum:
            - MOBILE
            - HOME
            - BUSINESS
          example: MOBILE
          type: string
      type: object
    addressWithContactsResource:
      description: Address with contact details
      properties:
        addressLine1:
          description: Address line 1
          example: 123 Main St.
          type: string
        addressLine2:
          description: Address line 2
          example: Suite 100
          type: string
        addressLine3:
          description: Address line 3
          example: Seventh floor
          type: string
        addressLine4:
          description: Address line 4
          example: 'Attention: Pat E. Kake'
          type: string
        city:
          description: City name
          example: Seattle
          type: string
        contacts:
          description: Contacts
          items:
            $ref: '#/components/schemas/invoiceContact'
          type: array
        countryCode:
          description: ISO 3166-1 alpha-2 based country code
          example: US
          type: string
        email:
          description: Contact person's email
          example: test@example.com
          type: string
        latitude:
          description: >-
            Address latitude, used with `longitude` to specify the address
            location. Decimal degrees format; negative is degrees South.
            **Note:**Value must be between -90 and 90, both inclusive.
          example: 47.6205
          format: double
          type: number
        longitude:
          description: >-
            Address longitude, used with `latitude` to specify the address
            location. Decimal degrees format; negative is degrees South.
            **Note:**Value must be between -180 and 180, both inclusive.
          example: -122.3493
          format: double
          type: number
        name:
          $ref: '#/components/schemas/orderContactName'
        phone:
          $ref: '#/components/schemas/orderContactPhone'
        postalCode:
          description: Postal or ZIP code
          example: '98121'
          type: string
        region:
          description: Region or state
          example: WA
          type: string
        type:
          description: Address type
          example: Home
          type: string
      required:
        - addressLine1
        - city
        - countryCode
        - latitude
        - longitude
        - postalCode
        - region
        - type
      type: object
    invoiceAdjustmentResource:
      description: Invoice adjustment details
      properties:
        adjustmentCounter:
          description: Represents number of times adjustment has happened to the order
          example: 1
          format: int32
          type: integer
        amount:
          type: number
          format: double
          description: Amount
          example: 34.56
        amountInCurrencies:
          type: array
          description: >
            The amount represented in one or more currencies.  

            Each item includes the value and its corresponding currency code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        attributes:
          additionalProperties:
            description: Custom attributes specific to tenant
            type: object
          description: Custom attributes specific to tenant
          type: object
        notes:
          description: An optional free text field and is saved as a metadata
          example: Any additional info
          type: string
        quantity:
          description: Adjustment quantity
          example: 1
          format: int32
          type: integer
        reasonCode:
          description: >-
            Merchant-defined reason code for order adjustment, varies from
            merchant to merchant
          example: Incorrect Item
          type: string
        subReasonCode:
          description: Merchant-defined sub reason code
          example: Late shipping
          type: string
        value:
          type: number
          format: double
          description: Amount
          example: 34.56
      type: object
    orderAppeasementDetail:
      description: Appeasement details
      properties:
        amount:
          description: >-
            Merchant-defined appeasement amount, which shouldn't exceed (charged
            amount - already refunded amount)
          example: 34.56
          format: double
          type: number
        amountInCurrencies:
          type: array
          description: >
            The merchant-defined appeasement amount represented in one or more
            currencies.  

            Each entry specifies the appeasement value and its corresponding
            currency code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        appeasementCounter:
          description: >-
            Sequential or incremental counter for appeasement. Used for keeping
            track of duplicates in the request. If omitted in the request, it's
            automatically generated and won't be used to check duplicates.
            Multiple appeasement calls for the same order can cause repetition
            of appeasement counter and may cause the request to be rejected
            completely.
          example: 1
          format: int32
          type: integer
        invoicedAmount:
          description: >-
            System-generated amount from Invoice service based on requested
            `amount`
          example: 34.56
          format: double
          type: number
        invoicedAmountInCurrencies:
          type: array
          description: >
            The system-generated invoiced amount represented in one or more
            currencies.  

            Each entry includes the invoiced value and its corresponding
            currency code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        payments:
          items:
            $ref: '#/components/schemas/orderAppeasementPaymentInfo'
          type: array
        reasonCode:
          description: >-
            Merchant-defined appeasement reason code; varies from merchant to
            merchant
          example: Incorrect Item
          type: string
        subReasonCode:
          description: Sub-reason code for appeasement, for another layer of classification
          example: Late shipping
          type: string
      type: object
    discount:
      description: Invoice discount details
      properties:
        amount:
          description: Discounted amount for the given `quantity`
          example: 2
          format: double
          type: number
        amountInCurrencies:
          type: array
          description: >
            The discounted amount represented in one or more currencies.  

            Each entry specifies the value and its corresponding currency
            code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.  

            This enables multi-currency support for the given `quantity`.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        promotionCode:
          description: >-
            Promotion code used by shoppers to take advantage of an ongoing
            promotion and avail discounts
          example: HNY2022
          type: string
        promotionId:
          description: >-
            Unique promotion ID either from fabric Offers service or external
            Offers service. When fabric Offers service is used, this is the
            24-character system-generated promotion ID returned in the response
            of Create promotion endpoint.
          example: HNY2022
          type: string
        promotionName:
          description: Promotion title or name
          example: Happy New Year
          type: string
        quantity:
          description: Number of discounted items in an order; example- buy 2 get 2 free
          example: 2
          format: int32
          type: integer
        type:
          description: Promotion type
          example: promotion
          type: string
      required:
        - promotionId
      type: object
    invoiceFeeDetail:
      description: Invoice fee details
      properties:
        amount:
          description: Amount charged for an item in the invoice
          example: 34.56
          format: double
          type: number
        amountInCurrencies:
          type: array
          description: >
            The amount charged for the item, represented in one or more
            currencies.  

            Each entry specifies the value and its corresponding currency
            code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        quantity:
          description: Quantity of items to which amount is charged
          example: 1
          format: int32
          type: integer
        refundAmount:
          description: Refund amount for the invoice
          example: 345.56
          format: double
          type: number
        refundAmountInCurrencies:
          type: array
          description: >
            The refund amount represented in one or more currencies.  

            Each entry includes the refunded value and its corresponding
            currency code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        type:
          description: Item fee type
          example: tax
          type: string
      type: object
    invoiceItem:
      type: object
      description: Invoice item sample
      properties:
        adjustmentTotal:
          type: number
          format: double
          description: Total price adjustment amount for all items of the order
          example: 123.45
        adjustmentTotalInCurrencies:
          type: array
          description: >
            The total price adjustment amount for the order represented in one
            or more currencies.  

            Each entry includes the adjustment value and its currency code,  

            using the `amountInCurrencyResource` schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        adjustments:
          type: array
          description: Invoice adjustment details for this item
          items:
            $ref: '#/components/schemas/invoiceAdjustmentResource'
        appeasements:
          type: array
          description: Appeasements information, if `invoiceType= APPEASEMENT`
          items:
            $ref: '#/components/schemas/orderAppeasementDetail'
        attributes:
          type: object
          description: Customized attributes
          example:
            key: value
        cancellations:
          type: array
          description: >-
            If `invoiceType= CANCELLATION`, the details of the cancelled items
            will be included in the invoice.
          items:
            $ref: '#/components/schemas/cancellationItemResource'
        currency:
          type: string
          description: Invoiced amount currency
          example: USD
        discounts:
          type: array
          description: Discount applicable for Item
          items:
            $ref: '#/components/schemas/discount'
        fees:
          type: array
          description: Fees charged for individual items of an invoice
          items:
            $ref: '#/components/schemas/invoiceFeeDetail'
        invoiceLineNumber:
          type: integer
          format: int32
          description: >-
            System-specified sequential number iterated for each item in the
            array of the invoice
          example: 3
        invoiceLineTotal:
          type: number
          format: double
          description: Total invoiced amount per line item
          example: 600
        invoiceLineTotalInCurrencies:
          type: array
          description: >
            The total invoiced amount per line item represented in one or more
            currencies.  

            Each entry includes the value and its corresponding currency code,  

            using the `amountInCurrencyResource` schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        invoiceQuantity:
          type: integer
          format: int32
          description: >-
            Total quantity invoiced. If a customer placed an order for 10
            quantities of an item and only 2 got shipped, then 2 is the
            `invoiceQuantity`.
          example: 10
        itemAppeasementTotal:
          type: number
          format: double
          description: Total invoiced appeasement amount per line item
          example: 344.455
        itemAppeasementTotalInCurrencies:
          type: array
          description: >
            The total appeasement amount for the line item represented in one or
            more currencies.  

            Each entry includes the appeasement value and its currency code,  

            using the `amountInCurrencyResource` schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        itemCancelTotal:
          type: number
          format: double
          description: Total invoiced cancellation amount per line item
          example: 344.455
        itemCancelTotalInCurrencies:
          type: array
          description: >
            The total cancellation amount for the line item represented in one
            or more currencies.  

            Each entry includes the cancellation value and its currency code,  

            using the `amountInCurrencyResource` schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        itemDiscountsTotal:
          type: number
          format: double
          description: Total invoiced discount amount per line item
          example: 3.45
        itemDiscountsTotalInCurrencies:
          type: array
          description: >
            The total discount amount for the line item represented in one or
            more currencies.  

            Each entry includes the discounted value and its currency code,  

            using the `amountInCurrencyResource` schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        itemFeeTotal:
          type: number
          format: double
          description: >-
            Total invoiced fee per line item. For fee, refer to `amount` in
            `invoiceFeeDetail`.
          example: 33.4
        itemFeeTotalInCurrencies:
          type: array
          description: >
            The total fee for the line item represented in one or more
            currencies.  

            Each entry includes the fee value and its currency code,  

            using the `amountInCurrencyResource` schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        itemId:
          type: integer
          format: int32
          description: >-
            Unique identifier of item from fabric Products (previously called
            PIM) service
          example: 1234455322
        itemTaxTotal:
          type: number
          format: double
          description: Total invoiced tax amount per line item
          example: 2.4
        itemTaxTotalInCurrencies:
          type: array
          description: >
            The total tax amount for the line item represented in one or more
            currencies.  

            Each entry includes the tax value and its currency code,  

            using the `amountInCurrencyResource` schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        itemUnitPrice:
          type: number
          format: double
          description: Item's unit price
          example: 33.4
        itemUnitPriceInCurrencies:
          type: array
          description: >
            The item’s unit price represented in one or more currencies.  

            Each entry specifies the value and its corresponding currency
            code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        lineItemCreatedAt:
          type: string
          format: date-time
          description: Time order line item was created
          example: '2022-11-22T10:26:38.000+00:00'
        lineItemId:
          type: string
          description: >-
            Merchant-defined unique identifier for each item. When omitted,
            fabric will generate it during order creation, in UUID format.
          example: 1adfrghhh2346aaaf
        lineItemNumber:
          type: integer
          format: int32
          description: Merchant-defined line item number to identify each item in an order
          example: 1
        locationStoreId:
          type: string
          description: ID of the store from where the item is picked for shipment
          example: 4512345
        orderId:
          type: string
          description: >-
            24-character system-generated unique order ID (UUID) to which the
            item belongs
          example: 33adfrghhh2346aaaffff
        returnExpirationDays:
          type: string
          description: Return expiration in days
          example: 21
        returns:
          type: array
          description: >-
            If `invoiceType= RETURN`, the details of the returned items will be
            included in the invoice.
          items:
            $ref: '#/components/schemas/orderReturns'
        shipToId:
          type: string
          description: >-
            If `invoiceType= SHIPPING`, the Ship-to ID corresponds to the
            shipment for which the invoice was generated.
          example: 5349b4ddd2781d08c09890f4
        shipmentLineItemId:
          type: string
          description: >-
            Unique identifier for shipment of the line item. This attribute is
            inherited from fabric shipment service.
          example: 2adfrghhh2346aaaffff
        sku:
          type: string
          description: Stock Keeping Unit (SKU), unique identifier of item
          example: P1234
        taxDetails:
          type: array
          description: Item tax details
          items:
            $ref: '#/components/schemas/invoiceTaxDetail'
        type:
          type: string
          description: Order item type
          example: WEB_PICKUP
        uom:
          type: string
          description: >-
            Item's unit of measurement. For example, for each quantity (EA), or
            GAL (Gallon), DZ (Dozens), etc.
          example: EA
      required:
        - invoiceLineNumber
    invoicePaymentResource:
      description: Payment resource details for the invoice
      properties:
        attributes:
          additionalProperties:
            description: >-
              Merchant-defined custom attributes. This is a placeholder for
              additional info (in key: value pairs)
            type: object
          description: >-
            Merchant-defined custom attributes. This is a placeholder for
            additional info (in key: value pairs)
          type: object
        authorizedAmount:
          description: Amount authorized to be debited from the given `paymentMethod`
          example: 256.1
          format: double
          type: number
        authorizedAmountInCurrencies:
          type: array
          description: >
            The authorized amount represented in one or more currencies.  

            Each entry specifies the authorized value and its corresponding
            currency code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        billToAddress:
          $ref: '#/components/schemas/address'
        conversion:
          description: Conversion required for currency
          example: 1
          format: double
          type: number
        currency:
          description: Three-letter currency code as defined by ISO-4217
          example: USD
          type: string
        paidAt:
          description: >-
            System-generated time (UTC) when payment was captured. In case of
            payment captured at checkout, this is a merchant-defined value given
            during order creation (UTC).
          example: '2022-01-27T16:15:58.000-05:00'
          type: string
        paymentCounter:
          description: Unique incremented number for this payment object
          example: 1
          format: int32
          type: integer
        paymentIdentifier:
          $ref: '#/components/schemas/invoicePaymentIdentifier'
        paymentMethod:
          description: Payment method such as PayPal or Credit Card
          example: CREDIT_CARD
          type: string
        paymentProvider:
          description: Name of the payment provider
          example: stripe
          type: string
        paymentStatus:
          description: >-
            Payment status. There are no predefined values; possible values are
            Paid, Partially Paid, Authorized, and Error.
          example: PAID
          type: string
        paymentToken:
          $ref: '#/components/schemas/invoicePaymentToken'
        paymentType:
          description: Payment type such as VISA or Mastercard
          example: VISA
          type: string
        settlement:
          $ref: '#/components/schemas/invoiceSettlement'
      type: object
    orderReturnsInfo:
      type: object
      description: Order returns info
      properties:
        attributes:
          type: object
          additionalProperties:
            type: object
            description: Attributes
            example:
              transactionId: 0R12TQ46
          description: Attributes
          example:
            transactionId: 0R12TQ46
        fees:
          type: array
          description: Fee details for the return request
          items:
            $ref: '#/components/schemas/returnFeeDetail'
        invoicedAmount:
          type: number
          format: double
          description: System-generated invoiced amount for the return request
          example: 11.29
        invoicedAmountInCurrencies:
          type: array
          description: >
            The system-generated invoiced amount represented in one or more
            currencies.  

            Each entry includes the invoiced value and its corresponding
            currency code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        paymentCounterRefundDetails:
          type: array
          description: >-
            Refund details associated with payment counters for the return
            request
          items:
            $ref: '#/components/schemas/paymentCounterRefundInfo'
        refunds:
          type: array
          description: Refund details for the return request
          items:
            $ref: '#/components/schemas/returnFeeDetail'
        returnCounter:
          type: integer
          format: int32
          description: Unique, sequential or incremental counter for return request
          example: 1
        totalRefundAmount:
          type: number
          format: double
          description: Merchant-defined total refund amount for the return request
          example: 11.29
        totalRefundAmountInCurrencies:
          type: array
          description: >
            The total refund amount represented in one or more currencies.  

            Each entry specifies the refunded value and its corresponding
            currency code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
    invoiceTaxDetail:
      description: Tax details for the invoice
      properties:
        amount:
          description: Amount for `type`
          example: 34.56
          format: double
          type: number
        amountInCurrencies:
          type: array
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        type:
          description: Item fee type
          example: tax
          type: string
      type: object
    shippingDiscount:
      description: Details of shipping discount
      properties:
        amount:
          description: Discounted amount for the given `quantity`
          example: 2.99
          format: double
          type: number
        amountInCurrencies:
          type: array
          description: >
            The merchant-defined shipping discount amount represented in one or
            more currencies.  

            Each entry specifies the appeasement value and its corresponding
            currency code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        promotionCode:
          description: >-
            Promotion code used by shoppers to take advantage of an ongoing
            promotion.
          example: SHIPFREE
          type: string
        promotionId:
          description: >-
            Unique promotion ID either from fabric Offers service or external
            Offers service. When fabric Offers service is used, this is the
            24-character system-generated promotion ID returned in the response
            of create promotion endpoint.
          example: SHIPFREE
          type: string
        promotionName:
          description: Promotion name
          example: Free Shipping
          type: string
        quantity:
          description: >-
            Number of discounted items in an order such as `buy 2 get 1 free`.
            In this case `1` is the discounted quantity.
          example: 1
          format: int32
          type: integer
        unit:
          description: Indicates whether the discount is in amount or percentage
          example: AMOUNT_OFF
          type: string
        value:
          description: Value corresponding to `unit`
          example: 10
          format: int32
          type: integer
      type: object
    orderPickup:
      description: Order pickup details
      properties:
        email:
          description: Contact person's email
          example: test@example.com
          type: string
        name:
          $ref: '#/components/schemas/orderContactName'
        phone:
          $ref: '#/components/schemas/orderContactPhone'
        pickupType:
          description: Order pickup type
          enum:
            - PRIMARY
            - ALTERNATE
          example: PRIMARY
          type: string
      type: object
    taxDetail:
      description: Tax details
      properties:
        amount:
          description: Tax amount
          example: 34.56
          format: double
          type: number
        amountInCurrencies:
          type: array
          description: >
            The merchant-defined tax amount represented in one or more
            currencies.  

            Each entry specifies the appeasement value and its corresponding
            currency code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        attributes:
          additionalProperties:
            description: >-
              Merchant-defined custom attributes. This is a placeholder for
              additional info (in key: value pairs).
            type: object
          description: >-
            Merchant-defined custom attributes. This is a placeholder for
            additional info (in key: value pairs).
          type: object
        currency:
          default: USD
          description: Three-letter currency code as defined by ISO-4217
          example: USD
          type: string
        name:
          description: Applied tax name
          example: STATE
          type: string
        rate:
          description: Rate
          example: 10
          format: double
          type: number
        rateType:
          description: Rate type
          example: PERCENTAGE
          type: string
        taxCode:
          description: Tax code applied
          example: FR01
          type: string
      type: object
    invoiceContact:
      description: Contact person's details
      properties:
        email:
          description: Contact person's email
          example: test@example.com
          type: string
        name:
          $ref: '#/components/schemas/orderContactName'
        phone:
          $ref: '#/components/schemas/orderContactPhone'
      type: object
    orderAppeasementPaymentInfo:
      description: Order appeasement payment info
      properties:
        paymentCounter:
          description: Payment counter to identify which payment to refund
          example: 1
          format: int32
          type: integer
        refundAmount:
          description: Refund amount for appeasement
          example: 34.56
          format: double
          type: number
        refundAmountInCurrencies:
          type: array
          description: >
            The refund amount represented in one or more currencies.  

            Each entry specifies the refunded value and its corresponding
            currency code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
      type: object
    cancellationItemResource:
      type: object
      description: cancellation Item Resource
      properties:
        cancellationCounter:
          type: string
          description: Cancellation Counter
          example: 1
        source:
          type: string
          description: Determine where the request is initialized
          example: CSR
        reasonCode:
          type: string
          description: Reason code
          example: Order Line Cancel
        subReasonCode:
          type: string
          description: Sub reason code
          example: Late shipping
        status:
          type: string
          description: Cancellation Status
          enum:
            - PROCESSING
            - COMPLETED
            - REJECTED
          example: PROCESSING
        amount:
          type: number
          format: double
          description: Amount
          example: '-20.'
        amountInCurrencies:
          type: array
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        invoicedAmount:
          type: number
          format: double
          description: Invoiced Amount
          example: '-20.'
        invoicedAmountInCurrencies:
          type: array
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        payments:
          type: array
          items:
            $ref: '#/components/schemas/paymentReference'
        refunds:
          type: array
          items:
            $ref: '#/components/schemas/refundDetailResource'
        attributes:
          type: object
          description: Custom attributes
          example:
            number: XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ
        quantity:
          type: integer
          format: int32
          description: Total quantity cancelled
          example: 10
    orderReturns:
      description: Order return details
      properties:
        exchangeLineItemId:
          description: Exchange line item ID
          example: 62f3dfc438bcab1951be0a19
          type: string
        fees:
          items:
            $ref: '#/components/schemas/returnFeeDetail'
          type: array
        invoicedAmount:
          description: >-
            System-generated amount from Invoice service based on requested
            `amount`
          example: 11.29
          format: double
          type: number
        invoicedAmountInCurrencies:
          type: array
          description: >
            The system-generated invoiced amount represented in one or more
            currencies.  

            Each entry includes the invoiced value and its corresponding
            currency code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        isExchangeItemReturned:
          default: false
          description: >-
            true: Item received for exchange is returned false: Item received
            for exchange isn't returned
          example: true
          type: boolean
        reasonCode:
          description: Merchant-defined reason code for return
          example: Incorrect item
          type: string
        refundAmount:
          description: Refund amount
          example: 11.29
          format: double
          type: number
        refundAmountInCurrencies:
          type: array
          description: >
            The refund amount represented in one or more currencies.  

            Each entry specifies the refunded value and its corresponding
            currency code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        refunds:
          items:
            $ref: '#/components/schemas/returnFeeDetail'
          type: array
        returnRequestCounter:
          description: Unique, sequential, or incremental counter for return request
          example: 1
          format: int32
          type: integer
        returnsReceivedAt:
          description: >-
            System-generated time of returned item that has come back to the
            facility (UTC)
          example: '2022-09-14T14:07:36.861Z'
          format: date-time
          type: string
        shipmentId:
          description: 24-character system-generated shipment ID
          example: 62b37697c67b204dd18a7465
          type: string
        shipmentInvoice:
          $ref: '#/components/schemas/shipmentInvoiceResource'
        shipmentLineItemId:
          description: Unique identifier for each item in the shipment
          example: '234'
          type: string
        shipmentQuantity:
          default: 0
          description: Shipped quantity of given item
          example: 1
          format: int32
          type: integer
      type: object
    invoicePaymentIdentifier:
      description: Invoice payment identifier
      properties:
        cardIdentifier:
          description: Card number
          example: '***********3456'
          type: string
      type: object
    invoicePaymentToken:
      description: Invoice payment token
      properties:
        token:
          description: Payment token number
          example: pi_34tr6787rt
          type: string
      type: object
    invoiceSettlement:
      description: Invoice settlement details
      properties:
        settledAt:
          description: System-generated invoice settlement time
          example: '2022-01-27T21:15:58Z'
          format: date-time
          type: string
        settlementAmount:
          description: >-
            Amount that needs to be collected from or refunded to the shopper.
            It's `invoicedAmount - chargedAmount`.
          example: 10.3
          format: double
          type: number
        settlementAmountInCurrencies:
          type: array
          description: >
            The settlement amount represented in one or more currencies.  

            Each entry specifies the settlement value and its corresponding
            currency code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        settlementStatusCode:
          description: >-
            Invoice settlement status code **SETTLED:** Amount is captured
            successfully from the payment service **PARTIAL_SETTLED:** Amount is
            partially captured from the payment service **SETTLEMENT_FAILED:**
            Amount isn't captured from the payment service
          enum:
            - SETTLED
            - PARTIAL_SETTLED
            - SETTLEMENT_FAILED
          example: SETTLED
          type: string
      type: object
    returnFeeDetail:
      description: Return fee details
      properties:
        amount:
          description: Merchant-defined return amount
          example: 34.56
          format: double
          type: number
        amountInCurrencies:
          type: array
          description: >
            The merchant-defined refund amount represented in one or more
            currencies.  

            Each entry specifies the appeasement value and its corresponding
            currency code,  

            following the structure defined in the `amountInCurrencyResource`
            schema.
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
        name:
          description: Fee name
          example: RETURN_FEE
          type: string
        reason:
          description: Merchant-defined return reason
          example: Return fee
          type: string
        type:
          description: Return fee type
          enum:
            - TAX
            - DISCOUNT
            - FEE
            - ITEM
            - ADJUSTMENT
          example: FEE
          type: string
      type: object
    paymentCounterRefundInfo:
      description: Payment counter refund details
      properties:
        amount:
          description: Final refunded amount
          example: 34.56
          format: double
          type: number
        amountInCurrencies:
          type: array
          description: CurrencyList details
          items:
            $ref: '#/components/schemas/amountInCurrency'
          properties:
            empty:
              type: boolean
        paymentCounter:
          description: Unique incremented number for this payment object
          example: 1
          format: int32
          type: integer
      type: object
    paymentReference:
      type: object
      description: Payment Reference
      properties:
        paymentCounter:
          type: string
          description: Cancellation Counter
          example: 1
        amount:
          type: number
          format: double
          description: Amount
          example: '-20.'
        amountInCurrencies:
          type: array
          description: CurrencyList details
          items:
            $ref: '#/components/schemas/amountInCurrency'
          properties:
            empty:
              type: boolean
    refundDetailResource:
      type: object
      description: Refund Detail Resource
      properties:
        type:
          type: string
          description: Type of refund
          example: ITEM
        name:
          type: string
          description: Name
          example: Name
        amount:
          type: number
          format: double
          description: Refund Amount
          example: '-10.'
        amountInCurrencies:
          type: array
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
    shipmentInvoiceResource:
      description: The shipment invoice resource object.
      properties:
        invoiceId:
          description: The unique ID of the shipment invoice.
          example: 62ff5c0bec0aed3c86202c32
          type: string
        invoiceNumber:
          description: The unique number of the shipment invoice.
          example: '23940791'
          type: string
        invoicedAt:
          description: The date when the invoice was processed.
          example: '2022-08-01T20:03:28.483971941Z'
          format: date-time
          type: string
      required:
        - invoiceId
      type: object
    amountInCurrency:
      type: object
      description: Amount in currency  details
      properties:
        currency:
          type: string
          description: Currency in ISO-4217
          example: USD
        group:
          type: string
          description: Customer-defined function name which uses this currency.
          example: SHOPPER
        amount:
          type: number
          format: double
          description: Amount in currency
          example: 123.45
      required:
        - currency
        - group
  headers:
    xFabricRequestIdResponseHeader:
      description: Unique request ID
      example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
      schema:
        type: string
  securitySchemes:
    authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http

````