---
title: "Import legacy affiliate payouts"
method: POST
path: "/admin/affiliate-legacy-payouts"
tags: ["Admin"]
---

# Import legacy affiliate payouts

`POST /admin/affiliate-legacy-payouts`

## Request

- Base URL: `https://api.testnet.rise.trade`
- URL: `https://api.testnet.rise.trade/admin/affiliate-legacy-payouts`
- Auth: none required
- TypeScript: <https://skmtc.dev/rise/apis/risex-rest-api/docs/admin/affiliate-legacy-payouts/post.ts> (a function with typed inputs; its response is checked against the schema)

Import pre-cutover affiliate payments from the accounting system as rangeless legacy entries (amount + paid date + tx only). Idempotent: entries are deduplicated by acct_settlement_id, so re-sending the same batch inserts nothing twice (internal).

## Request body

- ApiImportAffiliateLegacyPayoutsRequest
  - `entries` ImportAffiliateLegacyPayoutsRequestEntry[]
    - `affiliate_address` string
    - `amount` string
    - `paid_at` string
    - `tx_hash` string
    - `acct_settlement_id` string, int64: accounting.settlement.id in the acct database — dedup key; an entry whose id already exists is skipped, not overwritten.

## Response `200`

A successful response.

- ApiImportAffiliateLegacyPayoutsResponse
  - `inserted` string, int64
  - `skipped` string, int64

## Other responses

- `default`: An unexpected error response.

## Changes

- **2026-11-03** `98eabcd6a6ad`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/rise/apis/risex-rest-api/changes/admin/affiliate-legacy-payouts/post.md)

---

[API](https://skmtc.dev/rise/apis/risex-rest-api.md) - [All operations](https://skmtc.dev/rise/apis/risex-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rise/apis/risex-rest-api/revisions/98eabcd6a6ad?raw)
