Working Time Transactions

Working time transactions allow manual adjustments to an employee's working time balance. Use them to record overtime corrections, initial balance carryovers, or other adjustments that cannot be captured through regular time tracking.

The Working Time Transaction Object

  • Name
    id
    Type
    string (UUID)
    Description

    Unique identifier for the transaction.

  • Name
    type
    Type
    string
    Description

    Transaction type: auto, custom, or workmonth. Read-only.

  • Name
    date
    Type
    string (YYYY-MM-DD)
    Description

    The effective date of the transaction.

  • Name
    employee_id
    Type
    string (UUID)
    Description

    The employee this transaction belongs to. Read-only.

  • Name
    amount
    Type
    decimal
    Description

    The adjustment amount in seconds. Positive values add time, negative values deduct.

  • Name
    comment
    Type
    string
    Description

    A description of the adjustment.

  • Name
    additional_fields
    Type
    object
    Description

    Custom key-value data.


GET/api/v2/timestamps/working-time-transactions/

List all Transactions

Retrieve a paginated list of working time transactions.

Query Parameters

  • Name
    employee_ids
    Type
    string
    Description

    Filter by employee IDs, pipe-separated.

  • Name
    employee_group_ids
    Type
    string
    Description

    Filter by employee group IDs, pipe-separated. Use null for ungrouped.

  • Name
    date__gte
    Type
    string (YYYY-MM-DD)
    Description

    Filter by minimum date.

  • Name
    date__lte
    Type
    string (YYYY-MM-DD)
    Description

    Filter by maximum date.

  • Name
    types
    Type
    string
    Description

    Filter by type: auto, custom, or workmonth.

  • Name
    order
    Type
    string
    Description

    Sort by date or -date (descending).

Request

curl -X GET "https://api.zeitstrom.com/api/v2/timestamps/working-time-transactions/?employee_ids=a1b2c3d4-e5f6-7890-abcd-ef1234567890&date__gte=2024-01-01" \
  -H "Authorization: Token <YOUR_API_TOKEN>"

Response

{
  "count": 2,
  "results": [
    {
      "id": "w1w1w1w1-w2w2-w3w3-w4w4-w5w5w5w5w5w5",
      "type": "custom",
      "date": "2024-01-01",
      "employee_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "amount": 14400.0,
      "comment": "Overtime carryover from December 2023 (4 hours)",
      "additional_fields": {}
    }
  ]
}

POST/api/v2/timestamps/working-time-transactions/

Create a Transaction

Create a manual working time adjustment.

  • Name
    employee_id
    Type
    string (UUID)
    Description

    The employee. Required.

  • Name
    type
    Type
    string
    Description

    Transaction type: auto or custom. Required.

  • Name
    date
    Type
    string (YYYY-MM-DD)
    Description

    Effective date. Required.

  • Name
    amount
    Type
    decimal
    Description

    Adjustment amount in seconds. Required.

  • Name
    comment
    Type
    string
    Description

    Description of the adjustment.

  • Name
    additional_fields
    Type
    object
    Description

    Custom key-value data.

Request

curl -X POST "https://api.zeitstrom.com/api/v2/timestamps/working-time-transactions/" \
  -H "Authorization: Token <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "employee_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "custom",
    "date": "2024-06-01",
    "amount": 7200,
    "comment": "2 hours overtime compensation"
  }'

PUT/api/v2/timestamps/working-time-transactions/:id/

Update a Transaction

Update an existing working time transaction.

Request

curl -X PUT "https://api.zeitstrom.com/api/v2/timestamps/working-time-transactions/w1w1w1w1-w2w2-w3w3-w4w4-w5w5w5w5w5w5/" \
  -H "Authorization: Token <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "employee_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "custom",
    "date": "2024-01-01",
    "amount": 18000,
    "comment": "Corrected overtime carryover (5 hours)"
  }'

DELETE/api/v2/timestamps/working-time-transactions/:id/

Delete a Transaction

Delete a working time transaction.

Request

curl -X DELETE "https://api.zeitstrom.com/api/v2/timestamps/working-time-transactions/w1w1w1w1-w2w2-w3w3-w4w4-w5w5w5w5w5w5/" \
  -H "Authorization: Token <YOUR_API_TOKEN>"

GET/api/v2/timestamps/working-time-transactions/aggregate/

Aggregate

Get the aggregated working time balance per employee.

Request

curl -X GET "https://api.zeitstrom.com/api/v2/timestamps/working-time-transactions/aggregate/?employee_ids=a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  -H "Authorization: Token <YOUR_API_TOKEN>"

Response

[
  {
    "employee_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "amount": 21600.0
  }
]

GET/api/v2/timestamps/working-time-transactions/types/

Transaction Types

Get the list of available transaction types.

Request

curl -X GET "https://api.zeitstrom.com/api/v2/timestamps/working-time-transactions/types/" \
  -H "Authorization: Token <YOUR_API_TOKEN>"

Was this page helpful?