Timesheet
WIP: A summary needs to be written for Timesheet
GET/v3/timesheet/:id
Find Timesheet
Find one Timesheet by id
URL parameters
- Name
id
- Type
- string Required
- Description
- the id for the object to retrieve
200
Response
- Name
data
- Type
- object Required
- Description
- Timesheet schema
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Properties for data
object
- Name
id
- Type
- string Required
- Description
- Name
meta
- Type
- object Required
- Description
- the metadata about the most recent change to the row
- Name
metadata
- Type
- object
- Description
- metadata reserved for customers to control
- Name
createdDate
- Type
- string Required
- Description
- Name
updatedDate
- Type
- string Required
- Description
- Name
locationId
- Type
- string Required
- Description
- Name
companyId
- Type
- string Required
- Description
- Name
number
- Type
- string Required
- Description
- Name
orderId
- Type
- string Required
- Description
- Name
serviceId
- Type
- string Required
- Description
- Name
laborId
- Type
- string Required
- Description
- Name
technicianId
- Type
- string Required
- Description
- Name
duration
- Type
- number Required
- Description
- Name
clockIn
- Type
- string Required
- Description
- Name
clockOut
- Type
- string Required
- Description
- Name
clockInPlatform
- Type
- string Required
- Description
- Name
clockOutPlatform
- Type
- string Required
- Description
- Name
flatRate
- Type
- boolean Required
- Description
- if the technician uses a flat rate
- Name
rateCents
- Type
- integer Required
- Description
- Name
activity
- Type
- string Required
- Description
- Name
type
- Type
- string Required
- Description
- Name
note
- Type
- string Required
- Description
- Name
inProgress
- Type
- boolean Required
- Description
- Name
clockInLatitude
- Type
- number Required
- Description
- the latitude for the clocked in location
- Name
clockInLongitude
- Type
- number Required
- Description
- the longitude for the clocked in location
- Name
clockOutLatitude
- Type
- number Required
- Description
- the latitude for the clocked out location
- Name
clockOutLongitude
- Type
- number Required
- Description
- the longitude for the clocked out location
- Name
clockInGeoLocationId
- Type
- string Required
- Description
- the geolocation id for the clocked in location if provided
- Name
clockOutGeoLocationId
- Type
- string Required
- Description
- the geolocation id for the clocked out location if provided
- Name
clockInAtLocation
- Type
- boolean Required
- Description
- true if the clocked in location was at the store location
- Name
clockOutAtLocation
- Type
- boolean Required
- Description
- true if the clocked out location was at the store location
Properties for meta
object
- Name
userId
- Type
- string
- Description
- the user id that made the most recent change
- Name
sessionId
- Type
- string
- Description
- the session id for the most recent change
- Name
version
- Type
- number
- Description
- a monotonically increasing number for the most recent change
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Request
GET
/v3/timesheet/:idcurl https://api.shopmonkey.cloud/v3/timesheet/ID \
-H "Authorization: Bearer ${SM_TOKEN}"
Example Responseapplication/json
{
"success": true,
"data": {
"id": "id",
"meta": {
"userId": "userId",
"sessionId": "sessionId",
"version": 1
},
"createdDate": "createdDate",
"updatedDate": null,
"locationId": "locationId",
"companyId": "companyId",
"number": 1,
"orderId": null,
"serviceId": null,
"laborId": null,
"technicianId": "technicianId",
"duration": null,
"clockIn": "clockIn",
"clockOut": null,
"clockInPlatform": null,
"clockOutPlatform": null,
"flatRate": true,
"rateCents": null,
"activity": "activity",
"type": "type",
"note": "note",
"inProgress": true
}
}
DELETE/v3/timesheet/:id
Delete Timesheet
Permanently delete a Timesheet by id
URL parameters
- Name
id
- Type
- string Required
- Description
- the id of the record to delete
200
Response
- Name
data
- Type
- object
- Description
- Name
success
- Type
- boolean Required
- Description
Properties for data
object
- Name
id
- Type
- string Required
- Description
- the id for the object
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Requestapplication/json
DELETE
/v3/timesheet/:idcurl https://api.shopmonkey.cloud/v3/timesheet/ID \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X DELETE -H 'Content-Type: application/json' \
--data '{}'
Example Responseapplication/json
{
"success": true
}