Earnings
The earnings resource is used to track earnings for an employment position.
Earnings object
{
"id": "019c9026-3ef4-7cbd-9e71-36a0dc52300d",
"tenant": "01988bb8-1cfb-7c87-9326-93op0349288e",
"position": "0198bf9e-7832-78e2-bac5-88b7e9f5cdbd",
"date_from": "2026-02-01",
"date_to": "2026-02-14",
"pay_date": "2026-02-24",
"hours": 80,
"amount": 150000,
"notes": null,
"archived_at": "2026-02-24 14:56:04",
"created_at": "2026-02-24 14:55:51",
"updated_at": "2026-02-24 14:56:04"
}
Fields
- idrequired readonly stringUnique ID of the record.
- tenantrequired readonly stringUnique ID of the tenant.
- positionrequired stringUnique ID of the position.
- date_fromrequired stringStart date of the pay period in
YYYY-MM-DDformat. - date_torequired stringEnd date of the pay period in
YYYY-MM-DDformat. This value must be afterdate_to. - pay_daterequired stringDate the earnings were paid in
YYYY-MM-DDformat. - hoursnumberNumber of hours worked during the pay period. Number can be up to 5 digits with 2 decimal places.
- amountrequired numberAmount earned during the pay period in cents.
- notesnullable stringOptional notes about the earnings.
- archived_atnullable stringUTC timestamp of when the record was archived.
- created_atrequired readonly stringUTC timestamp of when the record was created.
- updated_atnullable readonly stringUTC timestamp of when the record was last updated.
Create an earnings record
POST /tenants/{tenantId}/earnings
The request body must include an earnings object.
Required permissions
earnings:create positions:read
Response
| HTTP status | Title | Description | Schema |
|---|---|---|---|
| 201 | Created | Successfully created | Earnings object |
| 400 | Bad Request | Invalid or missing field(s) | Error object |
| 404 | Not Found | Tenant not found | Error object |
List earnings records
GET /tenants/{tenantId}/earnings
Required permissions
earnings:read positions:read
Response
| HTTP status | Title | Description | Schema |
|---|---|---|---|
| 200 | OK | An associative array of earnings objects | |
| 400 | Bad Request | Invalid parameters in the request query | Error object |
| 404 | Not Found | Tenant not found | Error object |
Read an earnings record
GET /tenants/{tenantId}/earnings/{id}
Required permissions
earnings:read positions:read
Response
| HTTP status | Title | Description | Schema |
|---|---|---|---|
| 200 | OK | Earnings object | |
| 400 | Bad Request | Invalid parameters in the request query | Error object |
| 404 | Not Found | Tenant or earnings ID not found | Error object |
Update an earnings record
PATCH /tenants/{tenantId}/earnings/{id}
The request body must include parts of an earnings object.
Required permissions
earnings:update positions:read
Response
| HTTP status | Title | Description | Schema |
|---|---|---|---|
| 200 | OK | Updated earnings record | Earnings object |
| 400 | Bad Request | Invalid or missing field(s) | Error object |
| 404 | Not Found | Tenant or earnings ID not found | Error object |
Delete an earnings record
DELETE /tenants/{tenantId}/earnings/{id}
Required permissions
earnings:delete
Response
| HTTP status | Title | Description | Schema |
|---|---|---|---|
| 204 | No content | Successfully deleted | |
| 404 | Not Found | Tenant ID not found | Error object |
Was this page helpful?