> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt

# GetAccountDocuments

POST https://api.voximplant.com/platform_api/GetAccountDocuments

Gets the account documents and the verification states.

This method will be deprecated in the next versions. We recommend to use the [GetAccountVerifications](/api-reference/management-api/reference/accounts/get-account-verifications) method to get all the verifications and statuses for the account.

Allowed roles: `Owner`, `Admin`, `Accountant`, `Payer`.

Reference: https://docs.voximplant.ai/api-reference/management-api/reference/accounts/get-account-documents

## Authentication

- `Authorization` header (bearer token, required) — Voximplant Management API uses signed JWT tokens generated from your service-account private key. Pass the token in the `Authorization` header as a Bearer value: ``` Authorization: Bearer $VOXIMPLANT_TOKEN ``` See [Authorization](/api-reference/management-api/authorization) for ready-to-copy snippets in bash, Python, Node.js and Go that turn your `credentials.json` into a token.

## Request

### Query parameters

- `with_details` (boolean, optional, default: false) — Whether to view the uploaded document statuses. (The flag is ignored with the child_account_id=all)
- `verification_name` (string, optional) — The required account verification name to filter
- `verification_status` (list of string, optional) — The account verification status list separated by semicolons (;). The following values are possible: REQUIRED, IN_PROGRESS, VERIFIED
- `from_unverified_hold_until` (string, optional) — Unverified subscriptions hold until the date (from ...) in the following format: YYYY-MM-DD
- `to_unverified_hold_until` (string, optional) — Unverified subscriptions hold until the date (... to) in the following format: YYYY-MM-DD
- `child_account_id` (list of integer, optional) — The child account ID list separated by semicolons (;). Use the 'all' value to select all child accounts
- `children_verifications_only` (boolean, optional, default: false) — Whether to get the children account verifications only

## Response

### 200

Successful response

- `result` (list of AccountDocumentsType, optional) — The account documents with verification states

## Types

### AccountDocumentsType

The account documents with verification states

- `account_id` (integer, optional) — The account ID
- `verifications` (list of AccountVerificationType, optional) — The account verifications

### AccountVerificationType

The account verification info. The [AccountVerificationsType] field.

- `verification_name` (string, optional) — The verification name
- `verification_status` (string, optional) — The account verification status. The following values are possible: REQUIRED, IN_PROGRESS, VERIFIED, NOT_REQUIRED
- `unverified_hold_until` (string, optional) — Date string as returned by the Management API. Unverified subscriptions hold until the date in the following format: YYYY-MM-DD (if the account verification is required). Some subscriptions are detached on that day automatically!
- `documents` (list of AccountVerificationDocument, optional) — The uploaded documents

### AccountVerificationDocument

The account verification document info. The [AccountVerificationType] field.

- `account_document_id` (integer, optional) — The account verification document ID
- `is_individual` (boolean, optional) — Whether the account belongs to an individual
- `comment` (string, optional) — The reviewer's comment
- `uploaded` (string, optional) — Timestamp in YYYY-MM-DD HH:mm:ss format. The UTC date of the document upload in the following format: YYYY-MM-DD HH::mm:ss
- `account_document_status` (string, optional) — The account document status. The following values are possible: ACCEPTED, REJECTED, IN_PROGRESS, INCOMPLETE_SET

## Examples

**Response**

```json
{
  "result": [
    {
      "account_id": 1,
      "verifications": [
        {
          "verification_name": "RU",
          "verification_status": "IN_PROGRESS",
          "unverified_hold_until": "2015-02-15",
          "documents": [
            {
              "account_document_id": 66,
              "is_individual": true,
              "comment": "very low quality",
              "uploaded": "2015-02-01 06:50:07",
              "account_document_status": "REJECTED"
            },
            {
              "account_document_id": 74,
              "is_individual": true,
              "uploaded": "2015-02-01 07:34:01",
              "account_document_status": "IN_PROGRESS"
            }
          ]
        }
      ]
    }
  ]
}
```

**SDK Code**

```python Example 1
import requests

url = "https://api.voximplant.com/platform_api/GetAccountDocuments"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript Example 1
const url = 'https://api.voximplant.com/platform_api/GetAccountDocuments';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

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

```go Example 1
package main

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

func main() {

	url := "https://api.voximplant.com/platform_api/GetAccountDocuments"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby Example 1
require 'uri'
require 'net/http'

url = URI("https://api.voximplant.com/platform_api/GetAccountDocuments")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

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

```java Example 1
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.voximplant.com/platform_api/GetAccountDocuments")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.voximplant.com/platform_api/GetAccountDocuments', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Example 1
using RestSharp;

var client = new RestClient("https://api.voximplant.com/platform_api/GetAccountDocuments");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Example 1
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.voximplant.com/platform_api/GetAccountDocuments")! 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()
```