## Quickstart: Distribution Manager (V3)

This page assumes you have a valid access token. See [API Basics](/docs/get-started/api-basics) for authentication.

### 1. List your distributions

```
GET /v3/distribution-manager/distributions
```

curl
```bash
curl --request GET \
  --url '[Your API Base URL]/v3/distribution-manager/distributions?pageNumber=1&pageSize=20' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
```

Python
```python
import requests

url = "[Your API Base URL]/v3/distribution-manager/distributions"
params = {"pageNumber": 1, "pageSize": 20}
headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}

response = requests.get(url, params=params, headers=headers)
print(response.json())
```

Node
```javascript
const response = await fetch(
  '[Your API Base URL]/v3/distribution-manager/distributions?pageNumber=1&pageSize=20',
  {
    method: 'GET',
    headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN' }
  }
);
const data = await response.json();
console.log(data);
```

**Succesful response example:**

```json
{
  "pageNumber": 1,
  "pageSize": 20,
  "totalPages": 5,
  "totalItems": 98,
  "data": [
    {
      "distribution": {
        "id": "1a2b3c4d-e5f6-7890-1234-567890abcdef",
        "name": "Q3 Settlement",
        "externalId": "settlement-q3-2024",
        "welcomeHeadline": "Your payment is ready",
        "distributionDescription": "Q3 settlement for eligible beneficiaries",
        "distributionManager": null,
        "welcomeText": "Please select a payout method to receive your funds.",
        "iconUrl": "https://cdn.talli.ai/distributions/q3-settlement/icon.png",
        "payoutMethods": [
          {
            "payoutMethodId": "3c4d5e6f-a7b8-9012-3456-789012cdef01",
            "isDisabled": false,
            "disableReason": null
          }
        ],
        "expiryDate": "2028-12-31",
        "displayEndDate": "2028-06-30",
        "creationDate": "2024-01-15",
        "emailTemplates": {
          "InitiateEmail": "5e6f7a8b-c9d0-1234-5678-901234ef0123"
        },
        "automaticReminders": "None",
        "otpThresholdAmount": null,
        "fromEmail": null,
        "bankAccountId": "9z8y7x6w-v5u4-t3s2-r1q0-p9o8n7m6l5k4"
      },
      "details": null
    }
  ]
}
```

Returns a paginated list of your dsitributions.
Copy the `distribution.id` of the distribution you want to inspect.

### 2. Get a single distribution

Replace `YOUR_DISTRIBUTION_ID` in the URL with the `id` you copied in step 1.

```
GET /v3/distribution-manager/distributions/{id}
```

curl
```bash
curl --request GET \
  --url '[Your API Base URL]/v3/distribution-manager/distributions/YOUR_DISTRIBUTION_ID' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
```

Python
```python
import requests

url = "[Your API Base URL]/v3/distribution-manager/distributions/YOUR_DISTRIBUTION_ID"
headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}

response = requests.get(url, headers=headers)
print(response.json())
```

Node
```javascript
const response = await fetch(
  '[Your API Base URL]/v3/distribution-manager/distributions/YOUR_DISTRIBUTION_ID',
  {
    method: 'GET',
    headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN' }
  }
);
const data = await response.json();
console.log(data);
```

**Succesful response example:**

```json
{
  "id": "1a2b3c4d-e5f6-7890-1234-567890abcdef",
  "name": "Q3 Settlement",
  "externalId": "settlement-q3-2024",
  "welcomeHeadline": "Your payment is ready",
  "distributionDescription": "Q3 settlement for eligible beneficiaries",
  "distributionManager": null,
  "welcomeText": "Please select a payout method to receive your funds.",
  "iconUrl": "https://cdn.talli.ai/distributions/q3-settlement/icon.png",
  "payoutMethods": [
    {
      "payoutMethodId": "3c4d5e6f-a7b8-9012-3456-789012cdef01",
      "isDisabled": false,
      "disableReason": null
    }
  ],
  "expiryDate": "2028-12-31",
  "displayEndDate": "2028-06-30",
  "creationDate": "2024-01-15",
  "emailTemplates": {
    "InitiateEmail": "5e6f7a8b-c9d0-1234-5678-901234ef0123"
  },
  "automaticReminders": "None",
  "otpThresholdAmount": null,
  "fromEmail": null,
  "bankAccountId": "9z8y7x6w-v5u4-t3s2-r1q0-p9o8n7m6l5k4"
}
```

Returns the full distribution object, payout methods, expiry date, bank account, and configuration.

### 3. Download a distribution report

```
GET /v3/distribution-manager/reports/distributions/{id}/basic
```

curl
```bash
curl --request GET \
  --url '[Your API Base URL]/v3/distribution-manager/reports/distributions/YOUR_DISTRIBUTION_ID/basic?pageNumber=1&pageSize=1000' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Accept: text/csv' \
  --output distribution_report.csv
```

Python
```python
import requests

url = "[Your API Base URL]/v3/distribution-manager/reports/distributions/YOUR_DISTRIBUTION_ID/basic"
params = {"pageNumber": 1, "pageSize": 1000}
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "text/csv"
}

response = requests.get(url, params=params, headers=headers)
with open("distribution_report.csv", "w") as f:
    f.write(response.text)
```

Node
```javascript
import { writeFileSync } from 'fs';

const response = await fetch(
  '[Your API Base URL]/v3/distribution-manager/reports/distributions/YOUR_DISTRIBUTION_ID/basic?pageNumber=1&pageSize=1000',
  {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
      'Accept': 'text/csv'
    }
  }
);
const csv = await response.text();
writeFileSync('distribution_report.csv', csv);
```

> Note the `Accept: text/csv` header and the `--output` flag to save the file. The response streams directly to `distribution_report.csv` in your current directory.


## Next steps

- For the full set of V3 endpoints - payout instructions, bank accounts, transfers, templates, reports, and more - see the **API reference** in the sidebar