Skip to content

Bulk adjust payouts

POST
/api/v1/reporting/calls/payout/bulk-adjust
curl --request POST \
--url https://external-api.moja-ai.com/api/v1/reporting/calls/payout/bulk-adjust \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "call_log_ids": [ "example" ], "revenue_paid_out": 1, "publisher_paid_out": 1 }'

Sets revenue_paid_out and/or publisher_paid_out to the same value(s) on each listed call log id for your organization. Provide at least one of revenue_paid_out or publisher_paid_out. Use ids returned by POST /api/v1/reporting/calls/query. failed_call_log_ids lists request ids that do not exist for your organization (no matching call log row). Repeating the same request is safe when amounts are unchanged (adjustment flags only update when a value differs).

X-API-Key
Any of:
string
Media typeapplication/json
ReportingBulkPayoutAdjustRequest

Bulk-adjust revenue_paid_out and/or publisher_paid_out for many call logs (same amount(s) on each row).

object
call_log_ids
required
Call Log Ids

Call log row IDs (same ids as returned by reporting queries). Maximum 500 per request.

Array<string>
>= 1 items <= 500 items
revenue_paid_out
Any of:
number
publisher_paid_out
Any of:
number
Examplegenerated
{
"call_log_ids": [
"example"
],
"revenue_paid_out": 1,
"publisher_paid_out": 1
}

Successful Response

Media typeapplication/json
ReportingBulkPayoutAdjustResponse
object
message
required
Message
string
updated_count
required
Updated Count
integer
requested_count
required
Requested Count
integer
revenue_paid_out
Any of:
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
publisher_paid_out
Any of:
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
failed_call_log_ids
Failed Call Log Ids

Call log ids from the request that were not found for your organization (no row updated). Empty when every requested id matched a call log.

Array<string>
Examplegenerated
{
"message": "example",
"updated_count": 1,
"requested_count": 1,
"revenue_paid_out": "example",
"publisher_paid_out": "example",
"failed_call_log_ids": [
"example"
]
}

Bad Request

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Unauthorized

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Not Found

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Conflict

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}

Too Many Requests

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Internal server error