ePunnet API Documentation

API Version 1.2.0

Get Active Dates with Harvest Data (Packages)

Endpoint: GET /api/worker/harvests-packages/[employeeId]/active-dates

Retrieves dates that have harvest package data for a specific employee within a date range.

Path Parameters:

  • employeeId - ID of the employee to fetch data for

Query Parameters:

  • from (required) - Start timestamp (Unix timestamp in milliseconds)
  • to (required) - End timestamp (Unix timestamp in milliseconds)

Get Harvests by Date (Packages)

Endpoint: GET /api/worker/harvests-packages/[employeeId]/by-date

Retrieves detailed harvest package data for a specific employee on a particular date.

Path Parameters:

  • employeeId - ID of the employee to fetch data for

Query Parameters:

  • date (required) - Date timestamp (Unix timestamp in milliseconds)
  • offset (optional) - Number of items to skip for pagination
  • limit (optional) - Maximum number of items to return

Response:

  • Array of HarvestsByDayResponseItem objects with harvest package details

Get Active Dates with Harvest Data (KG)

Endpoint: GET /api/worker/harvests-kg/[employeeId]/active-dates

Retrieves dates that have harvest kg data for a specific employee within a date range.

Path Parameters:

  • employeeId - ID of the employee to fetch data for

Query Parameters:

  • from (required) - Start timestamp (Unix timestamp in milliseconds)
  • to (required) - End timestamp (Unix timestamp in milliseconds)

Response:

  • Array of DateResponseItem objects with date, quantity, and totalPrice fields
  • Returns aggregated data grouped by date within the specified time range

Get Harvests by Date (KG)

Endpoint: GET /api/worker/harvests-kg/[employeeId]/by-date

Retrieves detailed harvest kg data for a specific employee on a particular date.

Path Parameters:

  • employeeId - ID of the employee to fetch data for

Query Parameters:

  • date (required) - Date timestamp (Unix timestamp in milliseconds)
  • offset (optional) - Number of items to skip for pagination
  • limit (optional) - Maximum number of items to return

Response:

  • Array of HarvestsByDayResponseItem objects with harvest kg details

Get Active Dates with Working Times Data

Endpoint: GET /api/worker/working-times/[employeeId]/active-dates

Retrieves dates that have working times data for a specific employee within a date range.

Path Parameters:

  • employeeId - ID of the employee to fetch data for

Query Parameters:

  • from (required) - Start timestamp (Unix timestamp in milliseconds)
  • to (required) - End timestamp (Unix timestamp in milliseconds)

Response:

  • Array of DateResponseItem objects with date, quantity (work time in ms), and totalPrice fields
  • Quantity represents total working time in milliseconds for each date
  • TotalPrice represents calculated payment based on working hours and hourly rate

Get Working Times by Date

Endpoint: GET /api/worker/working-times/[employeeId]/by-date

Retrieves detailed working times data for a specific employee on a particular date.

Path Parameters:

  • employeeId - ID of the employee to fetch data for

Query Parameters:

  • date (required) - Date timestamp (Unix timestamp in milliseconds)
  • offset (optional) - Number of items to skip for pagination
  • limit (optional) - Maximum number of items to return

Response:

  • Array of WorkingTimesByDayResponseItem objects with working times details including status
  • Quantity field represents total work time in milliseconds
  • Price field represents hourly rate used for payment calculation

Get Employee by Wristband ID

Endpoint: GET /api/worker/by-wristband/[wristbandId]

Retrieves employee information by their wristband ID.

Path Parameters:

  • wristbandId - Wristband ID of the employee to fetch

Response:

  • EmployeeApiResponse object with _id, name, and surname fields
  • 404 error if employee not found
  • 500 error for server errors