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

# Open a return

> Opens a return for shipped units of one of the customer's orders. Approving, receiving and refunding it are the merchant's. Accessible via JWT or the order token header for guests.



## OpenAPI

````yaml /api-reference/store.yaml post /api/v3/store/orders/{order_id}/returns
openapi: 3.0.3
info:
  title: Store API
  contact:
    name: Spree Commerce
    url: https://spreecommerce.org
    email: hello@spreecommerce.org
  description: >
    Spree Store API v3 - Customer-facing storefront API for building headless
    commerce experiences.


    ## Authentication


    The Store API uses two authentication methods:


    ### API Key (Required)

    All requests must include a publishable API key in the `x-spree-api-key`
    header.


    ### JWT Bearer Token (For authenticated customers)

    After login, include the JWT token in the `Authorization: Bearer <token>`
    header.


    ### Order Token (For guest checkout)

    When creating an order, a `token` is returned. Include this in the
    `x-spree-token` header

    for guest access to that specific order.


    ## 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": "record_not_found",
        "message": "Product not found"
      }
    }

    ```
  version: v3
servers:
  - url: http://{defaultHost}
    variables:
      defaultHost:
        default: localhost:3000
security: []
tags:
  - name: Authentication
    description: Customer authentication (login, logout, token refresh)
  - name: Product Catalog
    description: Products and categories
  - name: Carts
    description: Shopping cart management
  - name: Orders
    description: Order lookup
  - name: Customers
    description: Customer account, addresses, saved payment methods, and order history
  - name: Markets
    description: Markets, countries, currencies, and locales
  - name: Wishlists
    description: Customer wishlists
  - name: Newsletter Subscribers
    description: Guest and customer newsletter subscriptions (double opt-in)
  - name: Policies
    description: Store policies (return policy, privacy policy, terms of service)
  - name: Digitals
    description: Digital product downloads
paths:
  /api/v3/store/orders/{order_id}/returns:
    parameters:
      - name: order_id
        in: path
        required: true
        description: Order prefixed ID
        schema:
          type: string
    post:
      tags:
        - Orders
      summary: Open a return
      description: >-
        Opens a return for shipped units of one of the customer's orders.
        Approving, receiving and refunding it are the merchant's. Accessible via
        JWT or the order token header for guests.
      parameters:
        - name: x-spree-api-key
          in: header
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          required: false
          description: Bearer token for authenticated customers
          schema:
            type: string
        - name: x-spree-token
          in: header
          required: false
          description: Order token for guest access
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateReturnParams'
        required: true
      responses:
        '201':
          description: return opened
          content:
            application/json:
              example:
                id: ret_gbHJdmfrXB
                number: RET1002
                status: requested
                order_id: or_gbHJdmfrXB
                reason_id: rar_UkLWZg9DAJ
                refund_total: '10.00'
                display_refund_total: $10.00
                refund_tax_total: '0.00'
                display_refund_tax_total: $0.00
                approved_at: null
                received_at: null
                refunded_at: null
                canceled_at: null
              schema:
                $ref: '#/components/schemas/Return'
      security:
        - api_key: []
          bearer_auth: []
components:
  schemas:
    CreateReturnParams:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              fulfillment_item_id:
                type: string
                description: The shipped unit coming back.
              quantity:
                type: integer
            required:
              - fulfillment_item_id
              - quantity
        reason_id:
          type: string
          description: One of the store's return reasons.
        memo:
          type: string
      required:
        - items
    Return:
      type: object
      properties:
        id:
          type: string
        number:
          type: string
        status:
          anyOf:
            - type: string
              enum:
                - requested
                - approved
                - received
                - refunded
                - 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
        refund_total:
          type: string
          nullable: true
        display_refund_total:
          type: string
          nullable: true
          description: >-
            `refund_total` formatted with its currency symbol in the request's
            language.
          deprecated: true
        refund_tax_total:
          type: string
          nullable: true
        display_refund_tax_total:
          type: string
          nullable: true
          description: >-
            `refund_tax_total` formatted with its currency symbol in the
            request's language.
          deprecated: true
        approved_at:
          type: string
          nullable: true
        received_at:
          type: string
          nullable: true
        refunded_at:
          type: string
          nullable: true
        canceled_at:
          type: string
          nullable: true
        reason:
          $ref: '#/components/schemas/ReturnReason'
        return_line_items:
          type: array
          items:
            $ref: '#/components/schemas/ReturnLineItem'
      required:
        - id
        - number
        - status
        - order_id
        - reason_id
        - refund_total
        - display_refund_total
        - refund_tax_total
        - display_refund_tax_total
        - approved_at
        - received_at
        - refunded_at
        - canceled_at
      x-typelizer: true
    ReturnReason:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        active:
          type: boolean
      required:
        - id
        - name
        - active
      x-typelizer: true
    ReturnLineItem:
      type: object
      properties:
        id:
          type: string
        quantity:
          type: number
        received_quantity:
          type: number
        resellable:
          type: boolean
        pre_tax_amount:
          type: string
          nullable: true
        display_pre_tax_amount:
          type: string
          nullable: true
          description: >-
            `pre_tax_amount` formatted with its currency symbol in the request's
            language.
          deprecated: true
        included_tax_total:
          type: string
          nullable: true
        additional_tax_total:
          type: string
          nullable: true
        tax_total:
          type: string
          nullable: true
        display_tax_total:
          type: string
          nullable: true
          description: >-
            `tax_total` formatted with its currency symbol in the request's
            language.
          deprecated: true
        refund_amount:
          type: string
          nullable: true
        display_refund_amount:
          type: string
          nullable: true
          description: >-
            `refund_amount` formatted with its currency symbol in the request's
            language.
          deprecated: true
        variant_id:
          type: string
          nullable: true
        line_item_id:
          type: string
          nullable: true
        fulfillment_item_id:
          type: string
          nullable: true
        variant:
          $ref: '#/components/schemas/Variant'
      required:
        - id
        - quantity
        - received_quantity
        - resellable
        - pre_tax_amount
        - display_pre_tax_amount
        - included_tax_total
        - additional_tax_total
        - tax_total
        - display_tax_total
        - refund_amount
        - display_refund_amount
        - variant_id
        - line_item_id
        - fulfillment_item_id
      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
        order_multiple:
          type: number
        purchase_unit:
          type: string
          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
      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
      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
        amount_in_cents:
          type: number
          nullable: true
          deprecated: true
        compare_at_amount_in_cents:
          type: number
          nullable: true
          deprecated: true
        display_amount:
          type: string
          nullable: true
          description: >-
            `amount` formatted with its currency symbol in the request's
            language.
          deprecated: true
        display_compare_at_amount:
          type: string
          nullable: true
          description: >-
            `compare_at_amount` formatted with its currency symbol in the
            request's language.
          deprecated: true
        price_list_id:
          type: string
          nullable: true
      required:
        - id
        - currency
        - amount
        - compare_at_amount
        - amount_in_cents
        - compare_at_amount_in_cents
        - display_amount
        - display_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
      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
      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
        amount_in_cents:
          type: number
          nullable: true
          deprecated: true
        display_amount:
          type: string
          description: >-
            `amount` formatted with its currency symbol in the request's
            language.
          deprecated: true
        recorded_at:
          type: string
      required:
        - id
        - currency
        - amount
        - amount_in_cents
        - display_amount
        - recorded_at
      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
      required:
        - id
        - name
        - slug
        - body
        - body_html
        - updated_at
      x-typelizer: true
  securitySchemes:
    api_key:
      type: apiKey
      name: x-spree-api-key
      in: header
      description: Publishable API key for store access
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token for authenticated customers

````

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