Create Project Time
This endpoint allows you to create a new project time.
Request
curl --request POST \
--url 'https://www.zep-online.de/zepinstanz/next/api/v1/attendances' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
"employee_id": "john.doe",
"date": "2024-08-17",
"from": "09:45:00",
"to": "14:30:00",
"duration": 4.75,
"locked": false,
"is_travel": false,
"billable": true,
"work_location_is_project_relevant": false,
"color": "#FF5733",
"project_task_id": 41,
"project_id": 9,
"activity_id": "re",
"start": "Location A",
"destination": "Location B",
"vehicle_id": 3,
"private": true,
"km": 120,
"passengers": 2,
"direction_of_travel": "continue"
}'
Response
{
"data": [
{
"id": 1,
"employee_id": "john.doe",
"date": "2024-08-17",
"from": "09:45:00",
"to": "14:30:00",
"duration": 4.75,
"locked": false,
"is_travel": false,
"billable": true,
"work_location_is_project_relevant": false,
"color": "#FF5733",
"project_task_id": 41,
"project_id": 9,
"activity_id": "re",
"start": "Location A",
"destination": "Location B",
"vehicle_id": 3,
"private": true,
"km": 120,
"passengers": 2,
"direction_of_travel": {
"id": 1,
"name": "continue"
},
"created": "2024-09-17T10:15:47.000000Z",
"modified": "2024-09-17T10:15:47.000000Z"
}
]
}
Required Parameters
- Name
employee_id
- Type
- string
- Description
The username of the employee creating the project time.
- Name
date
- Type
- date | Y-m-d
- Description
The date of the project time.
- Name
from
- Type
- string | H:i:s
- Description
The start time of the project time.
- Name
to
- Type
- string | H:i:s
- Description
The end time of the project time. Must be after
from
.
- Name
project_task_id
- Type
- integer
- Description
The ID of the associated project task.
- Name
project_id
- Type
- integer
- Description
The ID of the associated project.
- Name
activity_id
- Type
- string
- Description
The ID of the activity.
Optional Parameters
- Name
duration
- Type
- float
- Description
The total duration of the project time in hours.
- Name
locked
- Type
- boolean
- Description
Indicates whether the project time is locked.
- Name
is_travel
- Type
- boolean
- Description
Indicates whether the project time is considered travel time.
- Name
billable
- Type
- boolean
- Description
Indicates whether the project time is billable.
- Name
work_location_is_project_relevant
- Type
- boolean
- Description
Indicates whether the work location is project-related.
- Name
color
- Type
- string | Hex
- Description
Color in hex format (e.g.,
#FF5733
).
- Name
start
- Type
- string
- Description
The starting point of the trip.
- Name
destination
- Type
- string
- Description
The destination of the trip.
- Name
vehicle_id
- Type
- integer
- Description
The ID of the vehicle.
- Name
private
- Type
- boolean
- Description
Indicates whether the trip is private.
- Name
km
- Type
- integer
- Description
Distance covered in kilometers.
- Name
passengers
- Type
- integer
- Description
Number of passengers.
- Name
direction_of_travel
- Type
- string | enum
- Description
Direction of travel (e.g.,
continue
).