> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.staple.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.staple.ai/_mcp/server.

# Download Multiple Documents Data

POST https://api.staple.io/v2/documents/download/data
Content-Type: application/json

Select the download format and specify the doc IDs in an array to get the downloaded information.

Reference: https://docs.staple.ai/api-reference/v2/documents/download-multiple-documents-data

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: v2
  version: 1.0.0
paths:
  /v2/documents/download/data:
    post:
      operationId: downloadMultipleDocumentsData
      summary: Download Multiple Documents Data
      description: >-
        Select the download format and specify the doc IDs in an array to get
        the downloaded information.
      tags:
        - documents
      parameters:
        - name: x-api-key
          in: header
          description: API key issued by Staple.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Documents_downloadMultipleDocumentsData_Response_200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                docIds:
                  type: array
                  items:
                    type: integer
                docType:
                  type: string
                language:
                  type: string
servers:
  - url: https://api.staple.io
    description: https://api.staple.io
components:
  schemas:
    Documents_downloadMultipleDocumentsData_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Documents_downloadMultipleDocumentsData_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key issued by Staple.
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT obtained from the login endpoint.

```

## Examples

### Download Multiple Documents Data



**Request**

```json
undefined
```

**Response**

```json
{
  "downloadDataByDocIds": {
    "data": [
      {
        "Account Name": "",
        "Account Number": "",
        "Additional PO Numbers": "PO 3330",
        "Advance Tax": "",
        "BIR Number": "",
        "Bank Name": "",
        "Billing Address": "PAYMENT ADVICE     T / A Vistalite Central 19 Manuka Street  TAUPO 3330",
        "Comments": [],
        "Currency": "NZD",
        "Customer GST Number": "",
        "Customer Name": "Great Lake Aluminium & Glass Limited",
        "Delivery Order Number": "",
        "Description Text": "",
        "Discount": "",
        "Discount Percent": "",
        "Email": "admin@vistalitetaupo.co.nz - admin@vistalitetaupo.co",
        "Exchange Currency From": "NZD",
        "Exchange Currency To": "",
        "FX Rate": "",
        "File Name": "i4.pdf",
        "Form Number": "",
        "Freight": "",
        "Govt. Verification": "",
        "HSN SAC": "",
        "IBAN": "",
        "ISOCountryCode": "NZ",
        "Invoice Date": "2019-02-21",
        "Invoice Number": "INV-1441",
        "Invoice Type": "Tax Invoice",
        "Items": [
          {
            "Description": "Manufacture and install of 1 x bi fold",
            "Quantity": "1.00",
            "TableTitle": "Default Table",
            "UnitAmount": "2,000.00",
            "unmapped-text: Amount NZD0": "2,000.00"
          }
        ],
        "Less Amount Paid": "450.0",
        "Line Rows Check": "",
        "NTN": "",
        "Other Date": "",
        "PO Number": "",
        "Payment Date": "2019-03-08",
        "Payment Term": "07",
        "Project Name": "",
        "Public Lighting Tax": "",
        "Public Lighting Tax Percent": "",
        "Registered Vendor Name": "",
        "Registered Vendor Status": "",
        "RubberStamp": "",
        "Sales Order Number": "",
        "Sales Tax": "",
        "Sales Tax Percent": "",
        "Serial Number": "",
        "Shipping Address": "",
        "Signature": "",
        "Specific Tax": "",
        "Specific Tax Percent": "",
        "Subtotal": "2000.0",
        "Subtotal Check": "",
        "Swift Code": "",
        "Tax Percent": "15%",
        "Tax Total": "300.0",
        "Total": "2300.0",
        "Total Check": "",
        "Total Rounding": "",
        "URL": "",
        "Unique Stamp": "",
        "Vendor Address": "Great Lake Aluminium & Glass Limited T / A Vistalite Central 19 Manuka Street  TAUPO 3330 admin@vistalitetaupo.co.n",
        "Vendor Fax Number": "",
        "Vendor GST Number": "112-572-457",
        "Vendor Name": "Glass Limited T/A",
        "Vendor Name Check": "",
        "Vendor Phone Number": "",
        "Withholding Tax Total": ""
      },
      {
        "Account Name": "",
        "Account Number": "",
        "Additional PO Numbers": "PO 3330",
        "Advance Tax": "",
        "BIR Number": "",
        "Bank Name": "",
        "Billing Address": "PAYMENT ADVICE     T / A Vistalite Central 19 Manuka Street  TAUPO 3330",
        "Comments": [
          {
            "createdAt": "2022-11-30T04:13:06.765Z",
            "message": "Message 1",
            "receivers": [
              {
                "receiver": "staple@staple.io"
              }
            ],
            "sender": "staple@staple.io"
          },
          {
            "createdAt": "2022-11-30T04:15:43.958Z",
            "message": "Message 2",
            "receivers": [
              {
                "receiver": "staple@staple.io"
              }
            ],
            "sender": "staple@staple.io"
          },
          {
            "createdAt": "2022-11-30T04:17:51.142Z",
            "message": "Message 3",
            "receivers": [
              {
                "receiver": "staple@staple.io"
              }
            ],
            "sender": "staple@staple.io"
          }
        ],
        "Currency": "NZD",
        "Customer GST Number": "",
        "Customer Name": "Great Lake Aluminium & Glass Limited",
        "Delivery Order Number": "",
        "Description Text": "",
        "Discount": "",
        "Discount Percent": "",
        "Email": "admin@vistalitetaupo.co.nz - admin@vistalitetaupo.co",
        "Exchange Currency From": "NZD",
        "Exchange Currency To": "",
        "FX Rate": "",
        "File Name": "i4.pdf",
        "Form Number": "",
        "Freight": "",
        "Govt. Verification": "",
        "HSN SAC": "",
        "IBAN": "",
        "ISOCountryCode": "NZ",
        "Invoice Date": "2019-02-21",
        "Invoice Number": "INV-1441",
        "Invoice Type": "Tax Invoice",
        "Items": [
          {
            "Description": "Manufacture and install of 1 x bi fold",
            "Quantity": "1.00",
            "TableTitle": "Default Table",
            "UnitAmount": "2,000.00",
            "unmapped-text: Amount NZD0": "2,000.00"
          }
        ],
        "Less Amount Paid": "450.0",
        "Line Rows Check": "",
        "NTN": "",
        "Other Date": "",
        "PO Number": "",
        "Payment Date": "2019-03-08",
        "Payment Term": "07",
        "Project Name": "",
        "Public Lighting Tax": "",
        "Public Lighting Tax Percent": "",
        "Registered Vendor Name": "",
        "Registered Vendor Status": "",
        "RubberStamp": "",
        "Sales Order Number": "",
        "Sales Tax": "",
        "Sales Tax Percent": "",
        "Serial Number": "",
        "Shipping Address": "",
        "Signature": "",
        "Specific Tax": "",
        "Specific Tax Percent": "",
        "Subtotal": "2000.0",
        "Subtotal Check": "",
        "Swift Code": "",
        "Tax Percent": "15%",
        "Tax Total": "300.0",
        "Total": "2300.0",
        "Total Check": "",
        "Total Rounding": "",
        "URL": "",
        "Unique Stamp": "",
        "Vendor Address": "Great Lake Aluminium & Glass Limited T / A Vistalite Central 19 Manuka Street  TAUPO 3330 admin@vistalitetaupo.co.n",
        "Vendor Fax Number": "",
        "Vendor GST Number": "112-572-457",
        "Vendor Name": "Glass Limited T/A",
        "Vendor Name Check": "",
        "Vendor Phone Number": "",
        "Withholding Tax Total": ""
      },
      {
        "Account Name": "",
        "Account Number": "",
        "Additional PO Numbers": "",
        "Advance Tax": "",
        "BIR Number": "",
        "Bank Name": "",
        "Billing Address": "",
        "Comments": [],
        "Currency": "USD",
        "Customer GST Number": "",
        "Customer Name": "",
        "Delivery Order Number": "",
        "Description Text": "",
        "Discount": "",
        "Discount Percent": "",
        "Email": "herve@quod.ai",
        "Exchange Currency From": "USD",
        "Exchange Currency To": "",
        "FX Rate": "",
        "File Name": "re-in.pdf",
        "Form Number": "",
        "Freight": "",
        "Govt. Verification": "",
        "HSN SAC": "",
        "IBAN": "",
        "ISOCountryCode": "US",
        "Invoice Date": "2019-08-22",
        "Invoice Number": "21640",
        "Invoice Type": "Invoice",
        "Items": [
          {
            "TableTitle": "Default Table",
            "TaxRate": "USD 35",
            "UnitAmount": "USD 160.30",
            "unmapped-text: Hours1": "4.58 h",
            "unmapped-text: Projects0": "37972-Improve Existing Presentation Date: 22/Aug/2019-02/Sep/2019 Customer: herve@quod.ai"
          },
          {
            "LineAmount": "USD 160.30",
            "Other": "CREDITCARD Date: 03/09/2019",
            "TableTitle": "Default Table"
          }
        ],
        "Less Amount Paid": "",
        "Line Rows Check": "",
        "NTN": "",
        "Other Date": "2019-08-22",
        "PO Number": "",
        "Payment Date": "2019-09-17",
        "Payment Term": "",
        "Project Name": "",
        "Public Lighting Tax": "",
        "Public Lighting Tax Percent": "",
        "Registered Vendor Name": "",
        "Registered Vendor Status": "",
        "RubberStamp": "",
        "Sales Order Number": "",
        "Sales Tax": "",
        "Sales Tax Percent": "",
        "Serial Number": "",
        "Shipping Address": "",
        "Signature": "",
        "Specific Tax": "",
        "Specific Tax Percent": "",
        "Subtotal": "",
        "Subtotal Check": "",
        "Swift Code": "",
        "Tax Percent": "",
        "Tax Total": "",
        "Total": "160.3",
        "Total Check": "",
        "Total Rounding": "",
        "URL": "",
        "Unique Stamp": "",
        "Vendor Address": "Konsus Inc  EIN : 61-1776321 470 Ramona Street Palo Alto CA 94301 United States",
        "Vendor Fax Number": "",
        "Vendor GST Number": "",
        "Vendor Name": "",
        "Vendor Name Check": "",
        "Vendor Phone Number": "",
        "Withholding Tax Total": ""
      }
    ],
    "message": "Downloaded document successfully."
  }
}
```

**SDK Code**

```python Download Multiple Documents Data
import requests

url = "https://api.staple.io/v2/documents/download/data"

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Download Multiple Documents Data
const url = 'https://api.staple.io/v2/documents/download/data';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Download Multiple Documents Data
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.staple.io/v2/documents/download/data"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Download Multiple Documents Data
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v2/documents/download/data")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java Download Multiple Documents Data
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.staple.io/v2/documents/download/data")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

```php Download Multiple Documents Data
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.staple.io/v2/documents/download/data', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Download Multiple Documents Data
using RestSharp;

var client = new RestClient("https://api.staple.io/v2/documents/download/data");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Download Multiple Documents Data
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v2/documents/download/data")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```

### Documents_downloadMultipleDocumentsData_example



**Request**

```json
{
  "docIds": [
    1,
    2,
    3
  ],
  "docType": "JSON",
  "language": "EN"
}
```

**Response**

```json
{
  "downloadDataByDocIds": {
    "data": [
      {
        "Account Name": "",
        "Account Number": "",
        "Additional PO Numbers": "PO 3330",
        "Advance Tax": "",
        "BIR Number": "",
        "Bank Name": "",
        "Billing Address": "PAYMENT ADVICE     T / A Vistalite Central 19 Manuka Street  TAUPO 3330",
        "Comments": [],
        "Currency": "NZD",
        "Customer GST Number": "",
        "Customer Name": "Great Lake Aluminium & Glass Limited",
        "Delivery Order Number": "",
        "Description Text": "",
        "Discount": "",
        "Discount Percent": "",
        "Email": "admin@vistalitetaupo.co.nz - admin@vistalitetaupo.co",
        "Exchange Currency From": "NZD",
        "Exchange Currency To": "",
        "FX Rate": "",
        "File Name": "i4.pdf",
        "Form Number": "",
        "Freight": "",
        "Govt. Verification": "",
        "HSN SAC": "",
        "IBAN": "",
        "ISOCountryCode": "NZ",
        "Invoice Date": "2019-02-21",
        "Invoice Number": "INV-1441",
        "Invoice Type": "Tax Invoice",
        "Items": [
          {
            "Description": "Manufacture and install of 1 x bi fold",
            "Quantity": "1.00",
            "TableTitle": "Default Table",
            "UnitAmount": "2,000.00",
            "unmapped-text: Amount NZD0": "2,000.00"
          }
        ],
        "Less Amount Paid": "450.0",
        "Line Rows Check": "",
        "NTN": "",
        "Other Date": "",
        "PO Number": "",
        "Payment Date": "2019-03-08",
        "Payment Term": "07",
        "Project Name": "",
        "Public Lighting Tax": "",
        "Public Lighting Tax Percent": "",
        "Registered Vendor Name": "",
        "Registered Vendor Status": "",
        "RubberStamp": "",
        "Sales Order Number": "",
        "Sales Tax": "",
        "Sales Tax Percent": "",
        "Serial Number": "",
        "Shipping Address": "",
        "Signature": "",
        "Specific Tax": "",
        "Specific Tax Percent": "",
        "Subtotal": "2000.0",
        "Subtotal Check": "",
        "Swift Code": "",
        "Tax Percent": "15%",
        "Tax Total": "300.0",
        "Total": "2300.0",
        "Total Check": "",
        "Total Rounding": "",
        "URL": "",
        "Unique Stamp": "",
        "Vendor Address": "Great Lake Aluminium & Glass Limited T / A Vistalite Central 19 Manuka Street  TAUPO 3330 admin@vistalitetaupo.co.n",
        "Vendor Fax Number": "",
        "Vendor GST Number": "112-572-457",
        "Vendor Name": "Glass Limited T/A",
        "Vendor Name Check": "",
        "Vendor Phone Number": "",
        "Withholding Tax Total": ""
      },
      {
        "Account Name": "",
        "Account Number": "",
        "Additional PO Numbers": "PO 3330",
        "Advance Tax": "",
        "BIR Number": "",
        "Bank Name": "",
        "Billing Address": "PAYMENT ADVICE     T / A Vistalite Central 19 Manuka Street  TAUPO 3330",
        "Comments": [
          {
            "createdAt": "2022-11-30T04:13:06.765Z",
            "message": "Message 1",
            "receivers": [
              {
                "receiver": "staple@staple.io"
              }
            ],
            "sender": "staple@staple.io"
          },
          {
            "createdAt": "2022-11-30T04:15:43.958Z",
            "message": "Message 2",
            "receivers": [
              {
                "receiver": "staple@staple.io"
              }
            ],
            "sender": "staple@staple.io"
          },
          {
            "createdAt": "2022-11-30T04:17:51.142Z",
            "message": "Message 3",
            "receivers": [
              {
                "receiver": "staple@staple.io"
              }
            ],
            "sender": "staple@staple.io"
          }
        ],
        "Currency": "NZD",
        "Customer GST Number": "",
        "Customer Name": "Great Lake Aluminium & Glass Limited",
        "Delivery Order Number": "",
        "Description Text": "",
        "Discount": "",
        "Discount Percent": "",
        "Email": "admin@vistalitetaupo.co.nz - admin@vistalitetaupo.co",
        "Exchange Currency From": "NZD",
        "Exchange Currency To": "",
        "FX Rate": "",
        "File Name": "i4.pdf",
        "Form Number": "",
        "Freight": "",
        "Govt. Verification": "",
        "HSN SAC": "",
        "IBAN": "",
        "ISOCountryCode": "NZ",
        "Invoice Date": "2019-02-21",
        "Invoice Number": "INV-1441",
        "Invoice Type": "Tax Invoice",
        "Items": [
          {
            "Description": "Manufacture and install of 1 x bi fold",
            "Quantity": "1.00",
            "TableTitle": "Default Table",
            "UnitAmount": "2,000.00",
            "unmapped-text: Amount NZD0": "2,000.00"
          }
        ],
        "Less Amount Paid": "450.0",
        "Line Rows Check": "",
        "NTN": "",
        "Other Date": "",
        "PO Number": "",
        "Payment Date": "2019-03-08",
        "Payment Term": "07",
        "Project Name": "",
        "Public Lighting Tax": "",
        "Public Lighting Tax Percent": "",
        "Registered Vendor Name": "",
        "Registered Vendor Status": "",
        "RubberStamp": "",
        "Sales Order Number": "",
        "Sales Tax": "",
        "Sales Tax Percent": "",
        "Serial Number": "",
        "Shipping Address": "",
        "Signature": "",
        "Specific Tax": "",
        "Specific Tax Percent": "",
        "Subtotal": "2000.0",
        "Subtotal Check": "",
        "Swift Code": "",
        "Tax Percent": "15%",
        "Tax Total": "300.0",
        "Total": "2300.0",
        "Total Check": "",
        "Total Rounding": "",
        "URL": "",
        "Unique Stamp": "",
        "Vendor Address": "Great Lake Aluminium & Glass Limited T / A Vistalite Central 19 Manuka Street  TAUPO 3330 admin@vistalitetaupo.co.n",
        "Vendor Fax Number": "",
        "Vendor GST Number": "112-572-457",
        "Vendor Name": "Glass Limited T/A",
        "Vendor Name Check": "",
        "Vendor Phone Number": "",
        "Withholding Tax Total": ""
      },
      {
        "Account Name": "",
        "Account Number": "",
        "Additional PO Numbers": "",
        "Advance Tax": "",
        "BIR Number": "",
        "Bank Name": "",
        "Billing Address": "",
        "Comments": [],
        "Currency": "USD",
        "Customer GST Number": "",
        "Customer Name": "",
        "Delivery Order Number": "",
        "Description Text": "",
        "Discount": "",
        "Discount Percent": "",
        "Email": "herve@quod.ai",
        "Exchange Currency From": "USD",
        "Exchange Currency To": "",
        "FX Rate": "",
        "File Name": "re-in.pdf",
        "Form Number": "",
        "Freight": "",
        "Govt. Verification": "",
        "HSN SAC": "",
        "IBAN": "",
        "ISOCountryCode": "US",
        "Invoice Date": "2019-08-22",
        "Invoice Number": "21640",
        "Invoice Type": "Invoice",
        "Items": [
          {
            "TableTitle": "Default Table",
            "TaxRate": "USD 35",
            "UnitAmount": "USD 160.30",
            "unmapped-text: Hours1": "4.58 h",
            "unmapped-text: Projects0": "37972-Improve Existing Presentation Date: 22/Aug/2019-02/Sep/2019 Customer: herve@quod.ai"
          },
          {
            "LineAmount": "USD 160.30",
            "Other": "CREDITCARD Date: 03/09/2019",
            "TableTitle": "Default Table"
          }
        ],
        "Less Amount Paid": "",
        "Line Rows Check": "",
        "NTN": "",
        "Other Date": "2019-08-22",
        "PO Number": "",
        "Payment Date": "2019-09-17",
        "Payment Term": "",
        "Project Name": "",
        "Public Lighting Tax": "",
        "Public Lighting Tax Percent": "",
        "Registered Vendor Name": "",
        "Registered Vendor Status": "",
        "RubberStamp": "",
        "Sales Order Number": "",
        "Sales Tax": "",
        "Sales Tax Percent": "",
        "Serial Number": "",
        "Shipping Address": "",
        "Signature": "",
        "Specific Tax": "",
        "Specific Tax Percent": "",
        "Subtotal": "",
        "Subtotal Check": "",
        "Swift Code": "",
        "Tax Percent": "",
        "Tax Total": "",
        "Total": "160.3",
        "Total Check": "",
        "Total Rounding": "",
        "URL": "",
        "Unique Stamp": "",
        "Vendor Address": "Konsus Inc  EIN : 61-1776321 470 Ramona Street Palo Alto CA 94301 United States",
        "Vendor Fax Number": "",
        "Vendor GST Number": "",
        "Vendor Name": "",
        "Vendor Name Check": "",
        "Vendor Phone Number": "",
        "Withholding Tax Total": ""
      }
    ],
    "message": "Downloaded document successfully."
  }
}
```

**SDK Code**

```python Documents_downloadMultipleDocumentsData_example
import requests

url = "https://api.staple.io/v2/documents/download/data"

payload = {
    "docIds": [1, 2, 3],
    "docType": "JSON",
    "language": "EN"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Documents_downloadMultipleDocumentsData_example
const url = 'https://api.staple.io/v2/documents/download/data';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"docIds":[1,2,3],"docType":"JSON","language":"EN"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Documents_downloadMultipleDocumentsData_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.staple.io/v2/documents/download/data"

	payload := strings.NewReader("{\n  \"docIds\": [\n    1,\n    2,\n    3\n  ],\n  \"docType\": \"JSON\",\n  \"language\": \"EN\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Documents_downloadMultipleDocumentsData_example
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v2/documents/download/data")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"docIds\": [\n    1,\n    2,\n    3\n  ],\n  \"docType\": \"JSON\",\n  \"language\": \"EN\"\n}"

response = http.request(request)
puts response.read_body
```

```java Documents_downloadMultipleDocumentsData_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.staple.io/v2/documents/download/data")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"docIds\": [\n    1,\n    2,\n    3\n  ],\n  \"docType\": \"JSON\",\n  \"language\": \"EN\"\n}")
  .asString();
```

```php Documents_downloadMultipleDocumentsData_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.staple.io/v2/documents/download/data', [
  'body' => '{
  "docIds": [
    1,
    2,
    3
  ],
  "docType": "JSON",
  "language": "EN"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Documents_downloadMultipleDocumentsData_example
using RestSharp;

var client = new RestClient("https://api.staple.io/v2/documents/download/data");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"docIds\": [\n    1,\n    2,\n    3\n  ],\n  \"docType\": \"JSON\",\n  \"language\": \"EN\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Documents_downloadMultipleDocumentsData_example
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "docIds": [1, 2, 3],
  "docType": "JSON",
  "language": "EN"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v2/documents/download/data")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```