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

# Download attachment

> Download a settlement attachment

*scopes*:
  - admin:billing
  - read:billing
  - admin:reports
  - read:reports
  - admin:settlements
  - read:settlements




## OpenAPI

````yaml /mintlify-docs/openapi/spec-billing.yaml get /accounts/{aid}/settlements/{settlementid}/attachments/{attachmentid}
openapi: 3.0.0
info:
  title: Billing API
  contact:
    name: API Integration Support
    email: integration@dintero.com
  description: >
    # Changelog

    All notable changes to the API.


    ## 2025-12-15


    > **new** Add new endpoint to trigger generating settlement report in test.

    > - [POST
    /v1/accounts/{aid}/settlements/reports/generate-test-report](/api-reference/settlements/aid_settlement_generate_test_report)


    ## 2025-10-01


    > Extend billing subscription price definition with optional `price_model`

    > field. The field can be used to define how the price is applied

    > - [GET
    /v1/accounts/{aid}/billing/subscriptions](/billing-api/subscriptions/aid_billing_subscriptions_get)


    > Add support for filtering subscriptions by dimensions

    > - [GET
    /v1/accounts/{aid}/billing/subscriptions](/billing-api/subscriptions/aid_billing_subscriptions_get)


    ## 2024-12-20


    > Add support for filtering settlements by `item_created_at.gte`

    > and `item_created_at.lte`. The new filter enables getting list of
    settlement

    > by when they was created, the existing support for
    `created_at.gte`/`created_at.lte`

    > filters by when they was settled (`settled_at`)

    > - [GET
    /v1/accounts/{aid}/settlements](/api-reference/settlements/aid_settlements_list)


    ## 2024-06-01

    > Add pagination to report configuration listing

    > - [GET
    /v1/accounts/{aid}/settlements/reports/configuration](/api-reference/settlementsconfiguration/aid_settlement_report_config_list)


    ## 2023-04-01

    > **new** Add filter on `namespace` and `currency`

    > - [GET
    /v1/accounts/{aid}/billing/subscriptions](/billing-api/subscriptions/aid_billing_subscriptions_get)


    ## 2022-06-01


    > **new** Add filter on `payout_destination_id`

    > - [GET
    /v1/accounts/{aid}/settlements](/api-reference/settlements/aid_settlements_list)


    ## 2022-04-01


    > **new** Add possibility to delete report configurations

    > - [DELETE
    /v1/accounts/{aid}/settlements/reports/configuration/{configuration_id}](/api-reference/settlementsconfiguration/aid_settlement_report_config_delete)


    > **new** Add `destination_type: email` and support filter on
    `payout_destination_id` on settlement report configs

    > - [POST
    /v1/accounts/{aid}/settlements/reports/configuration](/api-reference/settlementsconfiguration/aid_settlement_report_config_create)

    > - [GET
    /v1/accounts/{aid}/settlements/reports/configuration](/api-reference/settlementsconfiguration/aid_settlement_report_config_list)

    > - [PUT
    /v1/accounts/{aid}/settlements/reports/configuration/{configuration_id}](/api-reference/settlementsconfiguration/aid_settlement_report_config_list)


    ## 2020-12-01


    > **new** Support filter user payout rules with `include_deleted` query
    parameter.

    > - [GET
    /v1/accounts/{aid}/billing/payout-rules?include_deleted=false](/billing-api/payoutrules/aid_billing_payout_rules_get)


    ## 2020-05-01


    > **[Payout Rules](#tag/payout.rules)**

    > Add new endpoint for managing Payout rules.
  version: LATEST
  license:
    name: UNLICENSED
    url: https://dintero.com
  x-logo:
    url: https://docs.dintero.com/img/dintero-dark-padded.svg
    altText: Dintero Logo
servers:
  - url: https://api.dintero.com/v1
security:
  - JWT: []
tags:
  - name: payout.rules
    x-displayName: Rules
    description: Manage payout rules
  - name: reports
    x-displayName: Reports
    description: Get billing reports
  - name: subscriptions
    x-displayName: Plans
    description: Get subscription plans
  - name: settlements
    x-displayName: Reports
    description: Get settlement reports
  - name: settlements.configuration
    x-displayName: Configuration
    description: Configure settlement reports
paths:
  /accounts/{aid}/settlements/{settlementid}/attachments/{attachmentid}:
    get:
      tags:
        - settlements
      summary: settlement_attachment_download
      description: |
        Download a settlement attachment

        *scopes*:
          - admin:billing
          - read:billing
          - admin:reports
          - read:reports
          - admin:settlements
          - read:settlements
      operationId: settlement_attachment_download
      parameters:
        - $ref: '#/components/parameters/accountId'
        - name: settlementid
          description: |
            An id that uniquely identifies the settlement.
          in: path
          required: true
          schema:
            type: string
        - name: attachmentid
          description: |
            An id that uniquely identifies the attachment.
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com/v1
components:
  parameters:
    accountId:
      name: aid
      description: |
        An id that uniquely identifies the account.
      in: path
      required: true
      schema:
        type: string
        format: ^[PT]{1}\d{8}$
        minLength: 9
        maxLength: 9
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Unexpected Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
          properties:
            code:
              type: string
              description: The code used to identify the error/warning
            errors:
              type: array
              description: The nested error(s) encountered during validation
              items:
                type: object
            message:
              type: string
              description: The human readable description of the error/warning
  securitySchemes:
    JWT:
      type: http
      description: >
        Bearer authentication (token authentication) should be used for
        accessing the API.


        Use [Get Token](/api-reference/authenticate/aid_auths_oauth_token_post)
        to get an access token for client credentials.

        Pass the token in the request header:

            Authorization: Bearer {access_token}

        where the **access_token** is JSON Web Tokens (JWT).
      scheme: bearer
      bearerFormat: JWT

````