includes only the user's records
GET /api/v1/earnings_statements
Parameters
| Name |
Description |
|
id
|
id of the statement
|
Request
Headers
Route
GET /api/v1/earnings_statements
Query Parameters
{}:
cURL
curl "http://localhost:3000/api/v1/earnings_statements" -X GET \
-H "Accept: application/json" \
-H "X-Api-Token: ADeY-Az6BYVdg23D7zZDvfxN1i2G-KM9aw" \
-H "X-Api-Email: user-493@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
200 OK
Body
{
"earnings_statements": [
{
"created_at": "2019-10-31T22:05:10Z",
"payee_name": "User Name",
"status": "Pending",
"id": 7,
"school_id": 407,
"payee_id": 852,
"payee_type": "User",
"period_start": "2019-08-01T00:00:00Z",
"period_end": "2019-08-31T23:59:59Z",
"total_amount": 1000,
"internal_gateway_amount": 1000,
"teachable_payments_amount": 0,
"custom_gateway_amount": 0,
"user_note": "Earnings for August 2019",
"requires_review": false,
"locked": false,
"fully_paid": false,
"updated_at": "2019-10-31T22:05:10Z",
"teachable_payments_payout_type": "non_teachable_payments",
"meta": {
"class": "earningsstatement",
"url": null,
"name": "7",
"description": "",
"image_url": null
}
}
],
"meta": {
"total": 1,
"page": 1,
"from": 1,
"to": 1,
"per": 25,
"number_of_pages": 1,
"query": {
"page": 1,
"school_id": 407
}
}
}