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

# Cancel an exchange

> Withdraws an exchange before the goods come back.



## OpenAPI

````yaml /api-reference/seller.yaml patch /api/v3/seller/orders/{order_id}/exchanges/{id}/cancel
openapi: 3.0.3
info:
  title: Seller API
  contact:
    name: Spree Commerce
    url: https://spreecommerce.org
    email: hello@spreecommerce.org
  description: |
    Spree Seller API v3 - the marketplace seller panel, where a seller runs
    their own shop inside someone else's marketplace.

    This is a branch of its own, not a narrowing of the Admin API. Every
    endpoint is scoped server-side to the seller the request acts as, which
    is what makes cross-seller access impossible by construction rather
    than by rule. Sellers never call the Admin API.

    ## Authentication

    Sign in at `POST /api/v3/seller/auth/login` and send the returned JWT as
    `Authorization: Bearer <token>`. The token carries a `seller_api`
    audience — a token minted for the storefront or the back office is not
    accepted here, and vice versa.

    There is deliberately **no secret API key** for this branch: a
    credential that could act as a seller without a seller signing in is
    exactly what the separate audience exists to prevent.

    ### Choosing a seller

    A user may run more than one seller. Login returns the list; send the
    chosen seller's ID in the `X-Spree-Seller-Id` header on every
    authenticated request. The store is derived from the seller — never
    sent — so no header can widen what a seller reaches. A request that
    names no seller the caller belongs to is rejected with `403`.

    ## Response Format

    All responses are JSON. List endpoints return paginated responses with
    `data` and `meta` keys.

    ## Error Handling

    Errors return a consistent format:
    ```json
    {
      "error": {
        "code": "validation_error",
        "message": "Validation failed",
        "details": { "name": ["can't be blank"] }
      }
    }
    ```
  version: v3
servers:
  - url: http://{defaultHost}
    variables:
      defaultHost:
        default: localhost:3000
security: []
tags:
  - name: Authentication
    description: Seller sign-in, token refresh, logout, and invitation acceptance
  - name: Account
    description: The signed-in user, the sellers they may act for, and what they may do
  - name: Countries
    description: Country and state reference data for the panel's address forms
  - name: Delivery Methods
    description: >-
      The seller's own ways to ship, and the marketplace methods shared with
      them
  - name: Delivery Profiles
    description: >-
      The marketplace's delivery vocabulary — what kind of goods a product is,
      which decides how it ships
  - name: Delivery Zones
    description: >-
      The marketplace's destinations, for narrowing where a seller's own method
      ships
  - name: Onboarding
    description: >-
      The marketplace checklist a seller completes before admission, and what
      they submit against it
  - name: Policies
    description: The seller's own legal documents, as the marketplace asks them to publish
  - name: Product Types
    description: The types a seller may list a product against, and what each adds
  - name: Products
    description: The seller's own catalog
  - name: Profile
    description: >-
      The seller's own record — presentation, contact details, addresses, and
      tax registration
  - name: Stock Locations
    description: Where the seller keeps stock, and so where their returns are sent
  - name: Team
    description: Who runs this seller, and the invitations nobody has accepted yet
  - name: Files
    description: Uploading the files a profile, a submission or an import uses
paths:
  /api/v3/seller/orders/{order_id}/exchanges/{id}/cancel:
    parameters:
      - name: order_id
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: string
    patch:
      tags:
        - Exchanges
      summary: Cancel an exchange
      description: Withdraws an exchange before the goods come back.
      parameters:
        - name: X-Spree-Seller-Id
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExchangeCancelParams'
      responses:
        '200':
          description: exchange canceled
          content:
            application/json:
              example:
                id: exch_UkLWZg9DAJ
                number: EX1001
                status: canceled
                order_id: or_UkLWZg9DAJ
                reason_id: null
                price_difference: '9.99'
                approved_at: null
                received_at: null
                fulfilled_at: null
                canceled_at: '2026-01-15T12:00:00Z'
                memo: Customer kept the original
                stock_location_id: sloc_UkLWZg9DAJ
              schema:
                $ref: '#/components/schemas/Exchange'
      security:
        - bearer_auth: []
      x-codeSamples:
        - lang: javascript
          label: Spree Seller SDK
          source: >-
            import { createSellerClient } from '@spree/seller-sdk'


            const client = createSellerClient({
              baseUrl: 'https://your-store.com',
              jwtToken: 'eyJhbGciOi...',
              sellerId: 'sel_UkLWZg9DAJ',
            })


            const exchange = await
            client.orders.exchanges.cancel('or_UkLWZg9DAJ', 'exch_UkLWZg9DAJ', {
              reason: 'Customer kept the original',
            })
components:
  schemas:
    ExchangeCancelParams:
      type: object
      properties:
        reason:
          type: string
          description: A note on why the exchange was canceled.
    Exchange:
      type: object
      properties:
        id:
          type: string
        number:
          type: string
        status:
          anyOf:
            - type: string
              enum:
                - requested
                - approved
                - received
                - fulfilled
                - canceled
            - type: string
          description: The values listed are the built-in ones; extensions may add more.
        order_id:
          type: string
          nullable: true
        reason_id:
          type: string
          nullable: true
        price_difference:
          type: string
        approved_at:
          type: string
          nullable: true
        received_at:
          type: string
          nullable: true
        fulfilled_at:
          type: string
          nullable: true
        canceled_at:
          type: string
          nullable: true
        reason:
          $ref: '#/components/schemas/Reason'
        exchange_line_items:
          type: array
          items:
            $ref: '#/components/schemas/ExchangeLineItem'
        memo:
          type: string
          nullable: true
        stock_location_id:
          type: string
          nullable: true
      required:
        - id
        - number
        - status
        - order_id
        - reason_id
        - price_difference
        - approved_at
        - received_at
        - fulfilled_at
        - canceled_at
        - memo
        - stock_location_id
      x-typelizer: true
    Reason:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        active:
          type: boolean
      required:
        - id
        - name
        - active
      x-typelizer: true
    ExchangeLineItem:
      type: object
      properties:
        id:
          type: string
        quantity:
          type: number
        received_quantity:
          type: number
        resellable:
          type: boolean
        original_price:
          type: string
        new_variant_price:
          type: string
        price_difference:
          type: string
        original_tax_total:
          type: string
        new_tax_total:
          type: string
        original_variant_id:
          type: string
          nullable: true
        new_variant_id:
          type: string
          nullable: true
        line_item_id:
          type: string
          nullable: true
        fulfillment_item_id:
          type: string
          nullable: true
        original_variant:
          $ref: '#/components/schemas/Variant'
        new_variant:
          $ref: '#/components/schemas/Variant'
        name:
          type: string
          nullable: true
        new_variant_name:
          type: string
          nullable: true
      required:
        - id
        - quantity
        - received_quantity
        - resellable
        - original_price
        - new_variant_price
        - price_difference
        - original_tax_total
        - new_tax_total
        - original_variant_id
        - new_variant_id
        - line_item_id
        - fulfillment_item_id
        - name
        - new_variant_name
      x-typelizer: true
    Variant:
      type: object
      properties:
        id:
          type: string
        product_id:
          type: string
        sku:
          type: string
          nullable: true
        options_text:
          type: string
        track_inventory:
          type: boolean
        media_count:
          type: number
        preorder_ships_at:
          type: string
          nullable: true
        thumbnail_url:
          type: string
          nullable: true
        purchasable:
          type: boolean
        in_stock:
          type: boolean
        backorderable:
          type: boolean
        preorder:
          type: boolean
        weight:
          type: number
          nullable: true
        height:
          type: number
          nullable: true
        width:
          type: number
          nullable: true
        depth:
          type: number
          nullable: true
        weight_unit:
          type: string
          enum:
            - g
            - kg
            - lb
            - oz
        dimensions_unit:
          type: string
          enum:
            - mm
            - cm
            - in
            - ft
        minimum_order_quantity:
          type: number
          nullable: true
        order_multiple:
          type: number
          nullable: true
        purchase_unit:
          type: string
          nullable: true
          enum:
            - unit
            - carton
        units_per_carton:
          type: number
          nullable: true
        price:
          $ref: '#/components/schemas/Price'
        original_price:
          allOf:
            - $ref: '#/components/schemas/Price'
          nullable: true
        seller_id:
          type: string
          nullable: true
        seller:
          $ref: '#/components/schemas/Seller'
        primary_media:
          $ref: '#/components/schemas/Media'
        media:
          type: array
          items:
            $ref: '#/components/schemas/Media'
        option_values:
          type: array
          items:
            $ref: '#/components/schemas/OptionValue'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomField'
        prior_price:
          allOf:
            - $ref: '#/components/schemas/PriceHistory'
          nullable: true
        metadata:
          type: object
        position:
          type: number
        cost_currency:
          type: string
          nullable: true
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYN
            - BYR
            - BZD
            - CAD
            - CDF
            - CHF
            - CLF
            - CLP
            - CNY
            - COP
            - CRC
            - CUC
            - CUP
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EEK
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LTL
            - LVL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRO
            - MRU
            - MTL
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZN
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SKK
            - SLE
            - SLL
            - SOS
            - SRD
            - SSP
            - STD
            - STN
            - SVC
            - SYP
            - SZL
            - THB
            - TJS
            - TMM
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - UYI
            - UYU
            - UYW
            - UZS
            - VED
            - VEF
            - VES
            - VND
            - VUV
            - WST
            - XAF
            - XCD
            - XCG
            - XOF
            - XPF
            - YER
            - ZAR
            - ZMK
            - ZMW
            - ZWD
            - ZWG
            - ZWL
            - ZWN
            - ZWR
        barcode:
          type: string
          nullable: true
        backorder_limit:
          type: number
          nullable: true
        hs_code:
          type: string
          nullable: true
        country_of_origin:
          type: string
          nullable: true
          enum:
            - AD
            - AE
            - AF
            - AG
            - AI
            - AL
            - AM
            - AO
            - AR
            - AS
            - AT
            - AU
            - AW
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BF
            - BG
            - BH
            - BI
            - BJ
            - BL
            - BM
            - BN
            - BO
            - BQ
            - BR
            - BS
            - BT
            - BW
            - BY
            - BZ
            - CA
            - CC
            - CD
            - CF
            - CG
            - CH
            - CI
            - CK
            - CL
            - CM
            - CN
            - CO
            - CR
            - CU
            - CV
            - CW
            - CX
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - ER
            - ES
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FO
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GT
            - GU
            - GW
            - GY
            - HK
            - HN
            - HR
            - HT
            - HU
            - ID
            - IE
            - IL
            - IM
            - IN
            - IQ
            - IR
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KP
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MF
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NC
            - NE
            - NF
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PF
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PS
            - PT
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RU
            - RW
            - SA
            - SB
            - SC
            - SD
            - SE
            - SG
            - SH
            - SI
            - SJ
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - SS
            - ST
            - SV
            - SX
            - SY
            - SZ
            - TC
            - TD
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - YE
            - YT
            - ZA
            - ZM
            - ZW
        customs_description:
          type: string
          nullable: true
        created_at:
          type: string
        updated_at:
          type: string
        cost_price:
          type: string
          nullable: true
        preorderable:
          type: boolean
        available_stock:
          type: number
          nullable: true
        total_on_hand:
          type: number
          nullable: true
        prices:
          type: array
          items:
            $ref: '#/components/schemas/Price'
        stock_levels:
          type: array
          items:
            $ref: '#/components/schemas/StockLevel'
      required:
        - id
        - product_id
        - sku
        - options_text
        - track_inventory
        - media_count
        - preorder_ships_at
        - thumbnail_url
        - purchasable
        - in_stock
        - backorderable
        - preorder
        - weight
        - height
        - width
        - depth
        - weight_unit
        - dimensions_unit
        - minimum_order_quantity
        - order_multiple
        - purchase_unit
        - units_per_carton
        - price
        - original_price
        - seller_id
        - option_values
        - metadata
        - position
        - cost_currency
        - barcode
        - backorder_limit
        - hs_code
        - country_of_origin
        - customs_description
        - created_at
        - updated_at
        - cost_price
        - preorderable
        - available_stock
        - total_on_hand
      x-typelizer: true
    Price:
      type: object
      properties:
        id:
          type: string
        currency:
          type: string
          nullable: true
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYN
            - BYR
            - BZD
            - CAD
            - CDF
            - CHF
            - CLF
            - CLP
            - CNY
            - COP
            - CRC
            - CUC
            - CUP
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EEK
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LTL
            - LVL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRO
            - MRU
            - MTL
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZN
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SKK
            - SLE
            - SLL
            - SOS
            - SRD
            - SSP
            - STD
            - STN
            - SVC
            - SYP
            - SZL
            - THB
            - TJS
            - TMM
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - UYI
            - UYU
            - UYW
            - UZS
            - VED
            - VEF
            - VES
            - VND
            - VUV
            - WST
            - XAF
            - XCD
            - XCG
            - XOF
            - XPF
            - YER
            - ZAR
            - ZMK
            - ZMW
            - ZWD
            - ZWG
            - ZWL
            - ZWN
            - ZWR
        amount:
          type: string
          nullable: true
        compare_at_amount:
          type: string
          nullable: true
        price_list_id:
          type: string
          nullable: true
      required:
        - id
        - currency
        - amount
        - compare_at_amount
        - price_list_id
      x-typelizer: true
    Seller:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        slug:
          type: string
        about:
          type: string
        about_html:
          type: string
        logo_url:
          type: string
          nullable: true
        square_logo_url:
          type: string
          nullable: true
        cover_photo_url:
          type: string
          nullable: true
        policies:
          type: array
          items:
            $ref: '#/components/schemas/Policy'
      required:
        - id
        - name
        - slug
        - about
        - about_html
        - logo_url
        - square_logo_url
        - cover_photo_url
      x-typelizer: true
    Media:
      type: object
      properties:
        id:
          type: string
        product_id:
          type: string
          nullable: true
        variant_ids:
          type: array
          items:
            type: string
        position:
          type: number
        alt:
          type: string
          nullable: true
        media_type:
          type: string
          enum:
            - image
            - video
            - external_video
        external_video_url:
          type: string
          nullable: true
        focal_point_x:
          type: number
          nullable: true
        focal_point_y:
          type: number
          nullable: true
        video_provider:
          type: string
          nullable: true
        video_embed_url:
          type: string
          nullable: true
        video_url:
          type: string
          nullable: true
        poster_url:
          type: string
          nullable: true
        original_url:
          type: string
          nullable: true
        mini_url:
          type: string
          nullable: true
        small_url:
          type: string
          nullable: true
        medium_url:
          type: string
          nullable: true
        large_url:
          type: string
          nullable: true
        xlarge_url:
          type: string
          nullable: true
        og_image_url:
          type: string
          nullable: true
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - product_id
        - variant_ids
        - position
        - alt
        - media_type
        - external_video_url
        - focal_point_x
        - focal_point_y
        - video_provider
        - video_embed_url
        - video_url
        - poster_url
        - original_url
        - mini_url
        - small_url
        - medium_url
        - large_url
        - xlarge_url
        - og_image_url
        - created_at
        - updated_at
      x-typelizer: true
    OptionValue:
      type: object
      properties:
        id:
          type: string
        option_type_id:
          type: string
        name:
          type: string
        label:
          type: string
        position:
          type: number
        color_code:
          type: string
          nullable: true
        option_type_name:
          type: string
        option_type_label:
          type: string
        image_url:
          type: string
          nullable: true
      required:
        - id
        - option_type_id
        - name
        - label
        - position
        - color_code
        - option_type_name
        - option_type_label
        - image_url
      x-typelizer: true
    CustomField:
      type: object
      properties:
        id:
          type: string
        label:
          type: string
        field_type:
          type: string
          enum:
            - short_text
            - long_text
            - rich_text
            - number
            - boolean
            - json
        key:
          type: string
        value: {}
      required:
        - id
        - label
        - field_type
        - key
        - value
      x-typelizer: true
    PriceHistory:
      type: object
      properties:
        id:
          type: string
        currency:
          type: string
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYN
            - BYR
            - BZD
            - CAD
            - CDF
            - CHF
            - CLF
            - CLP
            - CNY
            - COP
            - CRC
            - CUC
            - CUP
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EEK
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LTL
            - LVL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRO
            - MRU
            - MTL
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZN
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SKK
            - SLE
            - SLL
            - SOS
            - SRD
            - SSP
            - STD
            - STN
            - SVC
            - SYP
            - SZL
            - THB
            - TJS
            - TMM
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - UYI
            - UYU
            - UYW
            - UZS
            - VED
            - VEF
            - VES
            - VND
            - VUV
            - WST
            - XAF
            - XCD
            - XCG
            - XOF
            - XPF
            - YER
            - ZAR
            - ZMK
            - ZMW
            - ZWD
            - ZWG
            - ZWL
            - ZWN
            - ZWR
        amount:
          type: string
          nullable: true
        recorded_at:
          type: string
      required:
        - id
        - currency
        - amount
        - recorded_at
      x-typelizer: true
    StockLevel:
      type: object
      properties:
        id:
          type: string
        count_on_hand:
          type: number
        backorderable:
          type: boolean
        stock_location_id:
          type: string
          nullable: true
        variant_id:
          type: string
          nullable: true
        created_at:
          type: string
        updated_at:
          type: string
        allocated_count:
          type: number
        available_count:
          type: number
        stock_location:
          $ref: '#/components/schemas/StockLocation'
      required:
        - id
        - count_on_hand
        - backorderable
        - stock_location_id
        - variant_id
        - created_at
        - updated_at
        - allocated_count
        - available_count
      x-typelizer: true
    Policy:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        slug:
          type: string
        body:
          type: string
          nullable: true
        body_html:
          type: string
          nullable: true
        updated_at:
          type: string
        created_at:
          type: string
      required:
        - id
        - name
        - slug
        - body
        - body_html
        - updated_at
        - created_at
      x-typelizer: true
    StockLocation:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        address1:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        zipcode:
          type: string
          nullable: true
        country_code:
          type: string
          nullable: true
          enum:
            - AD
            - AE
            - AF
            - AG
            - AI
            - AL
            - AM
            - AO
            - AR
            - AS
            - AT
            - AU
            - AW
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BF
            - BG
            - BH
            - BI
            - BJ
            - BL
            - BM
            - BN
            - BO
            - BQ
            - BR
            - BS
            - BT
            - BW
            - BY
            - BZ
            - CA
            - CC
            - CD
            - CF
            - CG
            - CH
            - CI
            - CK
            - CL
            - CM
            - CN
            - CO
            - CR
            - CU
            - CV
            - CW
            - CX
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - ER
            - ES
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FO
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GT
            - GU
            - GW
            - GY
            - HK
            - HN
            - HR
            - HT
            - HU
            - ID
            - IE
            - IL
            - IM
            - IN
            - IQ
            - IR
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KP
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MF
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NC
            - NE
            - NF
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PF
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PS
            - PT
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RU
            - RW
            - SA
            - SB
            - SC
            - SD
            - SE
            - SG
            - SH
            - SI
            - SJ
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - SS
            - ST
            - SV
            - SX
            - SY
            - SZ
            - TC
            - TD
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - YE
            - YT
            - ZA
            - ZM
            - ZW
        country_name:
          type: string
          nullable: true
        state_code:
          type: string
          nullable: true
        state_text:
          type: string
          nullable: true
        pickup_ready_in_minutes:
          type: number
          nullable: true
        pickup_instructions:
          type: string
          nullable: true
        address2:
          type: string
          nullable: true
        state_name:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        company:
          type: string
          nullable: true
        active:
          type: boolean
        default:
          type: boolean
        kind:
          anyOf:
            - type: string
              enum:
                - warehouse
                - store
                - fulfillment_center
            - type: string
          description: The values listed are the built-in ones; extensions may add more.
        returns_enabled:
          type: boolean
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - name
        - address1
        - city
        - zipcode
        - country_code
        - country_name
        - state_code
        - state_text
        - pickup_ready_in_minutes
        - pickup_instructions
        - address2
        - state_name
        - phone
        - company
        - active
        - default
        - kind
        - returns_enabled
        - created_at
        - updated_at
      x-typelizer: true
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token for an authenticated seller session (`seller_api` audience)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.