Payouts
Calculate payout details
Runs the payout engine for a specific creator and billing window, returning the finalized calculation payload, the default server-generated line items, the remainder still to pay after earlier partial payments, and an integrityToken. Use the returned calculation plus integrityToken as the basis for POST /payouts/initiate (purpose: "settle", the default) or POST /payouts/partial (purpose: "partial"). A calculation of a window that is still in progress is a to-date number and expires after 24 hours.
post/payouts/calculate
Request
- Base URL: https://viral.app/api/v1
- URL: https://viral.app/api/v1/payouts/calculate
- Auth: API key in header x-api-key
Request body
Example request
{
"campaignId": "orgcamp_RwmraAffhMt9",
"excludedVideos": [
{
"platform": "facebook"
}
],
"includedVideos": [
{
"platform": "facebook"
}
]
}Response
OK
Example response
{
"metrics": {
"perVideo": {
"items": [
{
"platform": "facebook"
}
]
},
"perCategory": [
{
"items": [
{
"platform": "facebook"
}
]
}
],
"manuallyExcludedVideos": [
{
"platform": "facebook"
}
],
"conditionMisses": [
{
"items": [
{
"platform": "facebook",
"creative": {
"by": {
"platform": "facebook"
}
}
}
]
}
],
"carriedVideos": [
{
"items": [
{
"platform": "facebook"
}
]
}
],
"mergedCopies": [
{
"items": [
{
"platform": "facebook",
"into": {
"platform": "facebook"
}
}
]
}
]
},
"settlement": {
"separatelyPaidVideos": [
{
"platform": "facebook"
}
],
"placedVideos": [
{
"platform": "facebook"
}
],
"includedVideos": [
{
"platform": "facebook"
}
],
"carriedVideos": [
{
"platform": "facebook"
}
],
"priorCarriedVideos": [
{
"platform": "facebook"
}
],
"timeZone": "UTC"
},
"engine": {
"factTraces": [
{
"requirement": {
"platformFilter": {
"include": [
"facebook"
],
"exclude": [
"facebook"
]
}
},
"billingWindow": {
"timeZone": "UTC"
}
}
],
"engineEvents": [
{
"factTrace": {
"requirement": {
"platformFilter": {
"include": [
"facebook"
],
"exclude": [
"facebook"
]
}
},
"billingWindow": {
"timeZone": "UTC"
}
}
}
],
"accountSnapshot": {
"accounts": [
{
"platform": "facebook",
"platformAccountId": "7123456789012345678"
}
]
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.