# Get dispute attachment GET https://api-sandbox.payabli.com/api/ChargeBacks/getChargebackAttachments/{Id}/{fileName} Retrieves a chargeback attachment file by its file name. Reference: https://docs.payabli.com/developers/api-reference/chargebacks/get-attachments-from-chargeback ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get ChargeBack attachment by fileName version: endpoint_chargeBacks.getChargebackAttachment paths: /ChargeBacks/getChargebackAttachments/{Id}/{fileName}: get: operationId: get-chargeback-attachment summary: Get ChargeBack attachment by fileName description: Retrieves a chargeback attachment file by its file name. tags: - - subpackage_chargeBacks parameters: - name: Id in: path description: The ID of chargeback or return record. required: true schema: type: integer format: int64 - name: fileName in: path description: The chargeback attachment's file name. required: true schema: type: string - name: requestToken in: header required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: {} '400': description: Bad request/ invalid data content: {} '401': description: Unauthorized request. content: {} '500': description: Internal API Error content: {} '503': description: Database connection error content: {} ``` ## SDK Code Examples ```python from payabli import payabli client = payabli( api_key="YOUR_API_KEY", ) client.charge_backs.get_chargeback_attachment( id=1000000, file_name="fileName", ) ``` ```typescript import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.chargeBacks.getChargebackAttachment(1000000, "fileName"); ``` ```go import ( context "context" option "github.com/payabli/sdk-go/option" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.ChargeBacks.GetChargebackAttachment( context.TODO(), 1000000, "fileName", ) ``` ```csharp using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.ChargeBacks.GetChargebackAttachmentAsync(1000000, "fileName"); ``` ```ruby require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/ChargeBacks/getChargebackAttachments/1000000/fileName") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["requestToken"] = '' response = http.request(request) puts response.read_body ``` ```java HttpResponse response = Unirest.get("https://api-sandbox.payabli.com/api/ChargeBacks/getChargebackAttachments/1000000/fileName") .header("requestToken", "") .asString(); ``` ```php request('GET', 'https://api-sandbox.payabli.com/api/ChargeBacks/getChargebackAttachments/1000000/fileName', [ 'headers' => [ 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift import Foundation let headers = ["requestToken": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/ChargeBacks/getChargebackAttachments/1000000/fileName")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```