# Get Refund Saver settings

> Get the Refund Saver preference for this user - whether Adapty should ask to decline or approve their refund request. Get the data sharing preference for this user – whether the user gave their consent to share their data with Apple.

## OpenAPI

```yaml
/api-specs/adapty-api.yaml get /api/v2/server-side-api/purchase/profile/refund-saver/settings/
openapi: 3.1.0
info:
  title: Adapty server-side API
  version: 1.0.0
servers:
  - url: https://api.adapty.io
    description: Production server
paths:
  /api/v2/server-side-api/purchase/profile/refund-saver/settings/:
    get:
      summary: Get Refund Saver settings
      description: Get the Refund Saver preference for this user - whether Adapty should ask to decline or approve their refund request. Get the data sharing preference for this user – whether the user gave their consent to share their data with Apple.
      operationId: getRefundSaverSettings
      tags:
        - Refund Saver
      security:
        - apikeyAuth: []
      parameters:
        - name: adapty-customer-user-id
          in: header
          required: false
          schema:
            type: string
          description: The unique ID of the customer in your system. Either `adapty-customer-user-id` or `adapty-profile-id` is required.
        - name: adapty-profile-id
          in: header
          required: false
          schema:
            type: string
            format: uuid
          description: The unique ID of the profile in your system. Your best option if you are working with anonymous profiles. Either `adapty-customer-user-id` or `adapty-profile-id` is required.
      responses:
        "200":
          description: Settings retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RefundSaverSettingsResponse"
              example:
                profile_id: e5aab402-b1bd-4039-b632-57a91ebc0779
                settings:
                  consent: true
                  custom_preference: no_preference
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              examples:
                profile_does_not_exist:
                  summary: Profile does not exist
                  value:
                    errors:
                      - Profile does not exist
                    error_code: profile_does_not_exist
                    status_code: 400
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
              example:
                errors:
                  - Invalid API key
                error_code: unauthorized
                status_code: 401
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
components:
  schemas:
    RefundSaverSettingsResponse:
      type: object
      properties:
        profile_id:
          type: string
          format: uuid
          description: Customer profile ID
        settings:
          type: object
          properties:
            consent:
              type: boolean
              description: Defines whether the user consented to share their data
            custom_preference:
              type: string
              enum:
                - grant
                - no_preference
                - decline
              description: The refund preference
          description: Refund saver settings for the user
      required:
        - profile_id
        - settings
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              source:
                type: string
                nullable: true
                description: Source of the error
              errors:
                type: array
                items:
                  type: string
                description: Array of error messages
        error_code:
          type: string
          description: Short error name
        status_code:
          type: integer
          description: HTTP status code
      required:
        - errors
        - error_code
        - status_code
  securitySchemes:
    apikeyAuth:
      type: apiKey
      name: Authorization
      in: header
      default: Api-Key {Your secret API key}
      description: |
        API requests must be authenticated by your secret API key as the **Authorization** 
        header with the value `Api-Key {your_secret_api_key}`, for example, 
        `Api-Key secret_live_...`. Find this key in the Adapty Dashboard -> 
        **App Settings** -> **General** tab -> **API keys** section.
```
