Network Finances API endpoints
Endpoint reference for the Network Finances tag (6 endpoints): Network-level financial management — advertiser payments, publisher payouts, and balance tracking
Network-level financial management — advertiser payments, publisher payouts, and balance tracking. 6 endpoints, generated from the OpenAPI spec. Authentication, the response envelope, pagination and error codes are shared by all endpoints — see REST API overview. Parameters marked form go in an application/x-www-form-urlencoded request body.
GET /rest-api/advertiser/{advertiserId}/payments.do
List advertiser payments.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
advertiserId | path | integer | yes | Advertiser ID |
balanceMonth | query | string | no | Month whose balance record ‘balance’ reports, yyyy-MM (2010-01 to 2050-12). The current month when omitted. |
limit | query | integer | no | Page size, 1 to 1000 |
month | query | array<integer> | no | Only payments of these months (1-12) |
start | query | integer | no | 0-based offset of the first payment to return |
year | query | array<integer> | no | Only payments of these years |
Responses: 200 — {success, advertiserId, advertiserName, total, start, limit, totalAmount, payments:[{paymentId, date (yyyy-MM-dd), year, month, amount, comment}], balance:{year, month, startBalance, charges, payments, endOfMonthBalance}|null} · 404 — No such advertiser, or it is not shared with the caller. Errors follow the shared conventions.
POST /rest-api/advertiser/{advertiserId}/payments.do
Add an advertiser payment.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
advertiserId | path | integer | yes | Advertiser ID |
amount | form | number | yes | Amount paid, in the network’s currency; greater than 0 and at most 9999999.999999 |
comment | form | string | no | Optional memo, up to 200 characters |
date | form | string | no | Payment date, yyyy-MM-dd between 2010 and 2050. Today when omitted. |
Responses: 200 — Payment booked: {success, advertiserId, payment:{paymentId, date, year, month, amount, comment}} · 404 — No such advertiser, or it is not shared with the caller. Errors follow the shared conventions.
DELETE /rest-api/advertiser/{advertiserId}/payments/{paymentId}.do
Delete an advertiser payment.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
advertiserId | path | integer | yes | Advertiser ID |
paymentId | path | integer | yes | Payment ID, as returned by the payment list |
Responses: 200 — Payment removed: {success, advertiserId, paymentId} · 404 — No such advertiser or payment, the payment belongs to another advertiser, or the advertiser is not shared with the caller. Errors follow the shared conventions.
GET /rest-api/site/{siteId}/payouts.do
List publisher payouts.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Site ID |
balanceMonth | query | string | no | Month whose balance record ‘balance’ reports, yyyy-MM (2010-01 to 2050-12). The current month when omitted. |
limit | query | integer | no | Page size, 1 to 1000 |
month | query | array<integer> | no | Only payments of these months (1-12) |
start | query | integer | no | 0-based offset of the first payment to return |
year | query | array<integer> | no | Only payments of these years |
Responses: 200 — {success, siteId, siteName, total, start, limit, totalAmount, payouts:[{paymentId, date (yyyy-MM-dd), year, month, amount, comment}], balance:{year, month, balance, paidOut, toBePaid}|null} · 404 — No such site, or it is not shared with the caller. Errors follow the shared conventions.
POST /rest-api/site/{siteId}/payouts.do
Add a publisher payout.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Site ID |
amount | form | number | yes | Amount paid, in the network’s currency; greater than 0 and at most 9999999.999999 |
comment | form | string | no | Optional memo, up to 200 characters |
date | form | string | no | Payment date, yyyy-MM-dd between 2010 and 2050. Today when omitted. |
Responses: 200 — Payout booked: {success, siteId, payout:{paymentId, date, year, month, amount, comment}} · 404 — No such site, or it is not shared with the caller. Errors follow the shared conventions.
DELETE /rest-api/site/{siteId}/payouts/{paymentId}.do
Delete a publisher payout.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | path | integer | yes | Site ID |
paymentId | path | integer | yes | Payout ID, as returned by the payout list |
Responses: 200 — Payout removed: {success, siteId, paymentId} · 404 — No such site or payout, the payout belongs to another site, or the site is not shared with the caller. Errors follow the shared conventions.
Related
- REST API overview — authentication and conventions
- API endpoint reference by tag