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

  • id
    required readonly string
    Unique ID of the record.
  • tenant
    required readonly string
    Unique ID of the tenant.
  • position
    required string
    Unique ID of the position.
  • date_from
    required string
    Start date of the pay period in YYYY-MM-DD format.
  • date_to
    required string
    End date of the pay period in YYYY-MM-DD format. This value must be after date_to.
  • pay_date
    required string
    Date the earnings were paid in YYYY-MM-DD format.
  • hours
    number
    Number of hours worked during the pay period. Number can be up to 5 digits with 2 decimal places.
  • amount
    required number
    Amount earned during the pay period in cents.
  • notes
    nullable string
    Optional notes about the earnings.
  • archived_at
    nullable string
    UTC timestamp of when the record was archived.
  • created_at
    required readonly string
    UTC timestamp of when the record was created.
  • updated_at
    nullable readonly string
    UTC 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?
© 2026 Bloom Data · System status