Network Finances API endpoints
Endpoint reference for the Network Finances tag (25 endpoints): Network-level financial management — advertiser payments, publisher payouts, and balance tracking
Network-level financial management — advertiser payments, publisher payouts, and balance tracking. 25 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. |
dir | query | string | no | ASC or DESC (default) Values: ASC, DESC. |
from | query | string | no | First payment day included, yyyy-MM-dd |
limit | query | integer | no | Page size, 1 to 1000 |
month | query | array<integer> | no | Only payments of these months (1-12) |
query | query | string | no | Part of the comment, case-insensitive |
sort | query | string | no | Order: DATE (default), AMOUNT, COMMENT, CREATED or UPDATED Values: DATE, AMOUNT, ENTITY, COMMENT, CREATED, UPDATED. |
start | query | integer | no | 0-based offset of the first payment to return |
to | query | string | no | Last payment day included, yyyy-MM-dd |
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, createdAt, createdBy, updatedAt, updatedBy}], balance:{year, month, startBalance, charges, payments, endOfMonthBalance}|null, balancesStart: yyyy-MM|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.
POST /rest-api/advertiser/{advertiserId}/payments/{paymentId}.do
Change 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 |
amount | form | number | no | New amount, in the network’s currency; greater than 0 and at most 9999999.999999 |
comment | form | string | no | New memo, up to 200 characters; an empty value clears it |
date | form | string | no | New payment date, yyyy-MM-dd between 2010 and 2050 |
Responses: 200 — Payment changed: {success, advertiserId, payment:{paymentId, date, year, month, amount, comment, createdAt, createdBy, updatedAt, updatedBy}} · 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.
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/network/management/balances-start.do
Get the month the balances start from.
No parameters beyond authentication.
Responses: 200 — {success, startMonth: yyyy-MM|null, editable}. Errors follow the shared conventions.
POST /rest-api/network/management/balances-start.do
Set the month the balances start from.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
startMonth | form | string | no | First month of the balances, yyyy-MM between 2010-01 and 2050-12; empty to start from the beginning |
Responses: 200 — {success, startMonth, editable}; {success:false, errors:{startMonth}} on a malformed month. Errors follow the shared conventions.
GET /rest-api/network/management/finances-summary.do
Finances Summary.
No parameters beyond authentication.
Responses: 200 — Successful operation. Errors follow the shared conventions.
GET /rest-api/network/management/get-advertiser-balance-history.do
Get advertiser balance history.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | query | integer | yes | Advertiser ID |
Responses: 200 — {success, data:[{year, month, startBalance, accrued, paid, endBalance}], current, startMonth: yyyy-MM|null — the month the balances start from; earlier months are left out}. Errors follow the shared conventions.
GET /rest-api/network/management/get-advertiser-payments.do
List advertiser payments.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | no | Maximum number of results to return, up to 1000; 1000 when omitted |
start | query | integer | no | Result offset for pagination |
id | query | array<integer> | no | Filter by advertiser IDs |
year | query | array<integer> | no | Filter by year |
month | query | array<integer> | no | Filter by month (1-12) |
from | query | string | no | First payment day included, yyyy-MM-dd |
to | query | string | no | Last payment day included, yyyy-MM-dd |
query | query | string | no | Part of the comment or of the advertiser’s name, case-insensitive |
sort | query | string | no | Order by: DATE (default), AMOUNT, ENTITY (advertiser name), COMMENT, CREATED or UPDATED |
dir | query | string | no | ASC or DESC (default) |
Responses: 200 — {data:[{id, advertiserId, advertiserName, advertiserDeleted, date, year, month, amount, comment, createdAt, createdByName, updatedAt, updatedByName}], total, totalAmount}. Errors follow the shared conventions.
GET /rest-api/network/management/get-advertisers-balance.do
Get advertiser balances.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
year | query | integer | yes | Year to get balances for |
month | query | integer | yes | Month to get balances for (1-12) |
categoryId | query | integer | no | Filter by advertising category ID (-1 for uncategorized) |
onlyWithActivity | query | boolean | no | If true, only return advertisers with charges or payments |
Responses: 200 — Advertiser balances returned successfully. Errors follow the shared conventions.
GET /rest-api/network/management/get-publisher-balance-history.do
Get publisher balance history.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | query | integer | yes | Publisher (site) ID |
Responses: 200 — {success, data:[{year, month, startBalance, accrued, paid, endBalance}], current, startMonth: yyyy-MM|null — the month the balances start from; earlier months are left out}. Errors follow the shared conventions.
GET /rest-api/network/management/get-publisher-payments.do
List publisher payouts.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | no | Maximum number of results to return, up to 1000; 1000 when omitted |
start | query | integer | no | Result offset for pagination |
id | query | array<integer> | no | Filter by publisher IDs |
year | query | array<integer> | no | Filter by year |
month | query | array<integer> | no | Filter by month (1-12) |
from | query | string | no | First payout day included, yyyy-MM-dd |
to | query | string | no | Last payout day included, yyyy-MM-dd |
query | query | string | no | Part of the comment or of the publisher’s name, case-insensitive |
sort | query | string | no | Order by: DATE (default), AMOUNT, ENTITY (publisher name), COMMENT, CREATED or UPDATED |
dir | query | string | no | ASC or DESC (default) |
Responses: 200 — {data:[{id, publisherId, publisherName, publisherDeleted, date, year, month, amount, comment, createdAt, createdByName, updatedAt, updatedByName}], total, totalAmount}. Errors follow the shared conventions.
GET /rest-api/network/management/get-publishers-balance.do
Get publisher balances.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
year | query | integer | yes | Year to get balances for |
month | query | integer | yes | Month to get balances for (1-12) |
categoryId | query | integer | no | Filter by publishing category ID (-1 for uncategorized) |
onlyWithActivity | query | boolean | no | If true, only return publishers with payouts or amounts due |
Responses: 200 — Publisher balances returned successfully. Errors follow the shared conventions.
GET /rest-api/network/management/network-finances-chart-data.do
Get network finances chart data.
No parameters beyond authentication.
Responses: 200 — Monthly aggregate data returned successfully. Errors follow the shared conventions.
POST /rest-api/network/management/recalculate-balances.do
Recalculate balances.
No parameters beyond authentication.
Responses: 200 — Balances recalculated successfully. Errors follow the shared conventions.
POST /rest-api/network/management/remove-advertiser-payment.do
Remove advertiser payment.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | form | integer | yes | Payment ID to remove |
Responses: 200 — Payment removed successfully. Errors follow the shared conventions.
POST /rest-api/network/management/remove-publisher-payment.do
Remove publisher payout.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | form | integer | yes | Payout ID to remove |
Responses: 200 — Payout removed successfully. Errors follow the shared conventions.
POST /rest-api/network/management/save-advertiser-payment.do
Save advertiser payment.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
amount | form | number | no | Payment amount |
comment | form | string | no | Payment comment or memo |
date | form | string | no | Payment date |
Responses: 200 — Payment saved successfully. Errors follow the shared conventions.
POST /rest-api/network/management/save-publisher-payment.do
Save publisher payout.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
amount | form | number | no | Payment amount |
comment | form | string | no | Payment comment or memo |
date | form | string | no | Payment date |
Responses: 200 — Payout saved successfully. Errors follow the shared conventions.
POST /rest-api/network/management/update-advertiser-payment.do
Update advertiser payment.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
amount | form | number | yes | New amount, in the network’s currency; greater than 0 |
date | form | string | yes | New payment date, dd/MM/yyyy, between 2010 and 2050 |
id | form | integer | yes | Id of the payment to change, as the payment list returns it |
comment | form | string | no | New comment, up to 200 characters; empty clears it |
Responses: 200 — {success:true} when changed; {success:false, errors:{field: message}} on a validation error; {success:false, msg} when there is no such payment. Errors follow the shared conventions.
POST /rest-api/network/management/update-publisher-payment.do
Update publisher payout.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
amount | form | number | yes | New amount, in the network’s currency; greater than 0 |
date | form | string | yes | New payment date, dd/MM/yyyy, between 2010 and 2050 |
id | form | integer | yes | Id of the payment to change, as the payment list returns it |
comment | form | string | no | New comment, up to 200 characters; empty clears it |
Responses: 200 — {success:true} when changed; {success:false, errors:{field: message}} on a validation error; {success:false, msg} when there is no such payout. 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. |
dir | query | string | no | ASC or DESC (default) Values: ASC, DESC. |
from | query | string | no | First payment day included, yyyy-MM-dd |
limit | query | integer | no | Page size, 1 to 1000 |
month | query | array<integer> | no | Only payments of these months (1-12) |
query | query | string | no | Part of the comment, case-insensitive |
sort | query | string | no | Order: DATE (default), AMOUNT, COMMENT, CREATED or UPDATED Values: DATE, AMOUNT, ENTITY, COMMENT, CREATED, UPDATED. |
start | query | integer | no | 0-based offset of the first payment to return |
to | query | string | no | Last payment day included, yyyy-MM-dd |
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, createdAt, createdBy, updatedAt, updatedBy}], balance:{year, month, balance, paidOut, toBePaid}|null, balancesStart: yyyy-MM|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.
POST /rest-api/site/{siteId}/payouts/{paymentId}.do
Change 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 |
amount | form | number | no | New amount, in the network’s currency; greater than 0 and at most 9999999.999999 |
comment | form | string | no | New memo, up to 200 characters; an empty value clears it |
date | form | string | no | New payment date, yyyy-MM-dd between 2010 and 2050 |
Responses: 200 — Payout changed: {success, siteId, payout:{paymentId, date, year, month, amount, comment, createdAt, createdBy, updatedAt, updatedBy}} · 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.
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