Referral Earn out
The earn out object
Whenever a user is rewarded credits/payouts from their pending balance
(e.g. ReferralConfig.credits_earned
), an earn out instance is created.
Attributes | Type | Description |
---|---|---|
id | int | Unique identifier of the earn out instance. |
mode | str | Indicates whether the earn out is a |
paypal_payout_email | str | If mode is |
amount | float | Amount earned out in USD. |
status | str | Status can be |
error_reason | str | If status is set to |
created_at | str | The timestamp of when this instance was created. |
updated_at | str | The timestamp when this instance was last updated. |
In JSON format
{
"id": 1,
"mode": "credits",
"paypal_payout_email": null,
"amount": 2.50,
"status": "completed",
"error_reason": null,
"created_at": "2022-06-14T11:58:10.246406-07:00",
"updated_at": "2022-06-14T11:58:10.246406-07:00"
}
List earn outs
This endpoint returns the earn outs in paginated format.
Request & Response
GET https://proxy.webshare.io/api/v2/referral/earnout
import requests
response = requests.get(
"https://proxy.webshare.io/api/v2/referral/earnout",
headers={"Authorization": "Token "}
)
response.json()
The commands above return JSON structured like this:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"mode": "credits",
"paypal_payout_email": null,
"amount": 2.50,
"status": "completed",
"error_reason": null,
"created_at": "2022-06-14T11:58:10.246406-07:00",
"updated_at": "2022-06-14T11:58:10.246406-07:00"
},
...
]
}
Retrieve earn out
This endpoint lets you retrieve an earn out.
Parameters
Parameter | Type | Description |
---|---|---|
ID | int | The ID of the earn out object to retrieve. |
Request & Response
GET https://proxy.webshare.io/api/v2/referral/earnout/{ID}/
import requests
response = requests.get(
"https://proxy.webshare.io/api/v2/referral/earnout/{ID}",
headers={"Authorization": "Token "}
)
response.json()
The commands above return JSON structured like this:
{
"id": 1,
"mode": "credits",
"paypal_payout_email": null,
"amount": 2.50,
"status": "completed",
"error_reason": null,
"created_at": "2022-06-14T11:58:10.246406-07:00",
"updated_at": "2022-06-14T11:58:10.246406-07:00"
}