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
Produces
The response content type: application/json
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
activity- Type
- one of: General, Order, Service, Labor Required
- Description
- Name
clockIn- Type
- string Required
- Description
- Name
clockInAtLocation- Type
- boolean Required
- Description
- true if the clocked in location was at the store location
- Name
clockInGeoLocationId- Type
- string Required
- Description
- the geolocation id for the clocked in location if provided
- 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
clockInPlatform- Type
- one of: Web, Mobile Required
- Description
- Name
clockOut- Type
- string Required
- Description
- Name
clockOutAtLocation- Type
- boolean Required
- Description
- true if the clocked out location was at the store location
- Name
clockOutGeoLocationId- Type
- string Required
- Description
- the geolocation id for the clocked out location if provided
- 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
clockOutPlatform- Type
- one of: Web, Mobile Required
- Description
- Name
companyId- Type
- string Required
- Description
- Name
createdDate- Type
- string Required
- Description
- Name
duration- Type
- number Required
- Description
- '
- Name
flatRate- Type
- boolean Required
- Description
- if the technician uses a flat rate
- Name
id- Type
- string Required
- Description
- Name
inProgress- Type
- boolean Required
- Description
- Name
laborId- Type
- string Required
- Description
- Name
locationId- 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
note- Type
- string Required
- Description
- Name
number- Type
- string Required
- Description
- COLLATE "en-u-kn-true"
- Name
orderId- Type
- string Required
- Description
- Name
rateCents- Type
- integer Required
- Description
- Name
serviceId- Type
- string Required
- Description
- Name
technicianId- Type
- string Required
- Description
- Name
type- Type
- one of: Timeclock, Manual Required
- Description
- Name
updatedDate- Type
- string Required
- Description
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
data- Type
- object
- Description
- An optional object containing relevant error data
- 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
data- Type
- object
- Description
- An optional object containing relevant error data
- 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
Delete one Timesheet by id
URL parameters
- Name
id- Type
- string Required
- Description
- the id for the object to delete
Produces
The response content type: application/json
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
data- Type
- object
- Description
- An optional object containing relevant error data
- 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
data- Type
- object
- Description
- An optional object containing relevant error data
- 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
}