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

# Get All Refunds

> Retrieve all refunds from the database.

[The Refunds Data Model](https://docs.rootfi.dev/api-reference/v3/ecommerce/refunds/overview) is designed to streamline the management and retrieval of refunds information across various ecommerce platforms.


## OpenAPI

````yaml GET /ecommerce/refunds
openapi: 3.0.1
info:
  title: rootfi
  version: v3
servers:
  - url: https://api.rootfi.dev/v3
    description: global
  - url: https://api.sa.rootfi.dev/v3
    description: saudi
security: []
paths:
  /ecommerce/refunds:
    get:
      tags:
        - EcommerceRefunds
      summary: Get All Refunds
      description: Retrieve all refunds from the database.
      operationId: ecommerce_refunds_list
      parameters:
        - name: limit
          in: query
          description: The number of refunds you want to retrieve
          required: false
          schema:
            type: integer
            nullable: true
          examples:
            Example1:
              value: 1
        - name: next
          in: query
          description: The next page of objects to retrieve
          required: false
          schema:
            type: string
            nullable: true
          examples:
            Example1:
              value: nhgdfghjgyffcvjhgc==
        - name: prev
          in: query
          description: The previous page of objects to retrieve
          required: false
          schema:
            type: string
            nullable: true
        - name: select
          in: query
          description: >-
            Comma separated fields to select. Supported values are raw_data,
            data_hash
          required: false
          schema:
            type: string
            nullable: true
          examples:
            Example1:
              value: raw_data
        - name: rootfi_updated_at[gte]
          in: query
          description: Filter by rootfi_updated_at Greater than or Equal To.
          required: false
          schema:
            type: string
            nullable: true
        - name: rootfi_company_id[eq]
          in: query
          description: >-
            Filter by rootfi_company_id. You can filter by any field using this
            syntax field_name[operator]
          required: false
          schema:
            type: integer
            nullable: true
        - name: include_deleted_records
          in: query
          description: >-
            Include deleted records. By default, deleted records are not
            included. Supported values are true and false
          required: false
          schema:
            type: string
            nullable: true
          examples:
            Example1:
              value: 'false'
        - name: return_count
          in: query
          description: Return the count of the objects. Supported values are true and false
          required: false
          schema:
            type: string
            nullable: true
          examples:
            Example1:
              value: 'false'
        - name: sort[rootfi_created_at]
          in: query
          description: Sort by rootfi_created_at
          required: false
          schema:
            $ref: '#/components/schemas/SortOrder'
            nullable: true
        - name: sort[rootfi_updated_at]
          in: query
          description: Sort by rootfi_updated_at
          required: false
          schema:
            $ref: '#/components/schemas/SortOrder'
            nullable: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ecommerceGetRefundsResponse'
              examples:
                Example1:
                  value:
                    data:
                      - rootfi_id: 157
                        rootfi_deleted_at: null
                        rootfi_created_at: '2024-01-22T05:07:31.465Z'
                        rootfi_updated_at: '2024-01-22T05:07:31.000Z'
                        rootfi_company_id: 1089
                        platform_id: ref_123456
                        platform_unique_id: REF-2024-001
                        parent_data_model: ECOMMERCE_ORDERS
                        parent_data_model_id: ord_123456
                        currency_id: USD
                        created_at: '2024-01-22T05:07:31.465Z'
                        updated_at: '2024-01-22T05:07:31.000Z'
                        description: 'Refund for Order #ORD-2024-001'
                        sub_total: 89.99
                        sub_total_tax_amount: 7.2
                        shipping_sub_total: 5.99
                        shipping_tax_amount: 0.48
                        total_amount: 103.66
                    prev: eyJyb290ZmlfaWQiOjQ0MDA2MX0=
                    next: eyJyb291ZmlfaWQiOjQ0MDA2MX0=
                    total_count: 123
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SortOrder:
      title: SortOrder
      type: string
      enum:
        - ASC
        - DESC
    ecommerceGetRefundsResponse:
      title: ecommerceGetRefundsResponse
      type: object
      description: The data of the refunds endpoint.
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ecommerceRefundObject'
      required:
        - data
      allOf:
        - $ref: '#/components/schemas/CommonReadResponse'
    RootFiAPIResponseType:
      title: RootFiAPIResponseType
      type: object
      properties:
        error:
          $ref: '#/components/schemas/RootFiAPIResponseErrorType'
          description: The error message
      required:
        - error
    ecommerceRefundObject:
      title: ecommerceRefundObject
      type: object
      properties: {}
      allOf:
        - $ref: '#/components/schemas/AccountingRootFiBaseFields'
        - $ref: '#/components/schemas/ecommerceRefundsFields'
    CommonReadResponse:
      title: CommonReadResponse
      type: object
      properties:
        prev:
          type: string
          nullable: true
          description: The previous page of objects to retrieve
        next:
          type: string
          nullable: true
          description: The next page of objects to retrieve
        total_count:
          type: integer
          nullable: true
          description: The total count of the objects
    RootFiAPIResponseErrorType:
      title: RootFiAPIResponseErrorType
      type: object
      properties:
        message:
          type: string
          description: The error message
        code:
          type: string
          description: The error code
        field:
          type: string
          description: The status of the error
      required:
        - message
        - code
        - field
    AccountingRootFiBaseFields:
      title: AccountingRootFiBaseFields
      type: object
      properties:
        rootfi_id:
          type: number
          format: double
          description: The unique ID we assign for that data's information
          example: 157
        rootfi_deleted_at:
          type: string
          format: date-time
          nullable: true
          description: The date at which the data was deleted in the accounting platform
        rootfi_created_at:
          type: string
          format: date-time
          description: The date at which RootFi first synced this data
          example: '2024-01-22T05:07:31.465Z'
        rootfi_updated_at:
          type: string
          format: date-time
          description: The latest date at which RootFi updated this data
          example: '2024-01-22T05:07:31.000Z'
        rootfi_company_id:
          type: number
          format: double
          description: The ID of the company in the accounting platform
          example: 1089
        platform_id:
          type: string
          description: An unique custom RootFi ID made from platform's unique_id.
          example: '123456'
        platform_unique_id:
          type: string
          nullable: true
          description: The ID of the data in the accounting platform.
        raw_data:
          type: object
          additionalProperties: true
          nullable: true
          description: >-
            A JSON containing fields that you can directly get from the
            accounting platform.
        data_hash:
          type: string
          nullable: true
          description: The hash of the data
      required:
        - rootfi_id
        - rootfi_created_at
        - rootfi_updated_at
        - rootfi_company_id
        - platform_id
    ecommerceRefundsFields:
      title: ecommerceRefundsFields
      type: object
      properties:
        parent_data_model:
          type: string
          nullable: true
          description: The parent data model type (e.g., ECOMMERCE_ORDERS)
        parent_data_model_id:
          type: string
          nullable: true
          description: The ID of the parent data model in the ecommerce platform
        currency_id:
          type: string
          nullable: true
          description: The currency ID of the refund
        created_at:
          type: string
          nullable: true
          description: The date and time the refund was created
        updated_at:
          type: string
          nullable: true
          description: The date and time the refund was last updated
        description:
          type: string
          nullable: true
          description: The description of the refund
        sub_total:
          type: number
          format: double
          nullable: true
          description: The subtotal of items, fees etc.
        sub_total_tax_amount:
          type: number
          format: double
          nullable: true
          description: The tax on subtotal of items, fees etc.
        shipping_sub_total:
          type: number
          format: double
          nullable: true
          description: The shipping subtotal
        shipping_tax_amount:
          type: number
          format: double
          nullable: true
          description: The tax on shipping subtotal
        total_amount:
          type: number
          format: double
          nullable: true
          description: The total amount including everything like shipping, taxes etc.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````