Create a timesheet
curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/timesheets \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"user_id": 1,
"clock_in_title": "some string",
"clock_in_method": "automatic",
"clock_in_time": 1234567890
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/timesheets"
payload = {
"user_id": 1,
"clock_in_title": "some string",
"clock_in_method": "automatic",
"clock_in_time": 1234567890
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_id: 1,
clock_in_title: 'some string',
clock_in_method: 'automatic',
clock_in_time: 1234567890
})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/timesheets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": false,
"response": {}
}{
"error": true,
"errors": [
"error message",
"error message"
]
}{
"message": "Unauthorized"
}{
"message": "Request URL not found"
}{
"message": "Internal Server Error"
}Timesheets
Create a timesheet
Create a timesheet
POST
/
timesheets
Create a timesheet
curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/timesheets \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"user_id": 1,
"clock_in_title": "some string",
"clock_in_method": "automatic",
"clock_in_time": 1234567890
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/timesheets"
payload = {
"user_id": 1,
"clock_in_title": "some string",
"clock_in_method": "automatic",
"clock_in_time": 1234567890
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_id: 1,
clock_in_title: 'some string',
clock_in_method: 'automatic',
clock_in_time: 1234567890
})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/timesheets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": false,
"response": {}
}{
"error": true,
"errors": [
"error message",
"error message"
]
}{
"message": "Unauthorized"
}{
"message": "Request URL not found"
}{
"message": "Internal Server Error"
}Body raw (json)
{
"user_id",// required | integer | existing user id
"clock_in_title",// required | string | max:255
"clock_out_title",// nullable | string | max:255
"clock_in_method",// required | string | acceptable_values: automatic,manual
"clock_out_method",// nullable | string | acceptable_values: automatic,manual
"clock_in_time",// required | timestamp
"clock_out_time",// nullable | timestamp
"clock_in_notes",// nullable | string | max:255
"clock_out_notes",// nullable | string | max:255
"clock_in_location",// optional | string
"clock_out_location",// optional | string
"job_id",// nullable | integer | existing job id
"subtask_id",// nullable | integer | existing subtask id
"type",// nullable | string | acceptable_values: general,job
"is_historical"// nullable | boolean
}
Authorizations
Body
application/json
Existing user id.
Maximum string length:
255Available options:
automatic, manual Unix timestamp.
Maximum string length:
255Available options:
automatic, manual Unix timestamp.
Maximum string length:
255Maximum string length:
255Existing job id.
Existing subtask id.
Available options:
general, job