Label
A Label object describe a specific label you can attach to various objects in the Shopmonkey app.
Find
Find one 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
- 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
color- Type
- one of: aqua, black, blue, brown, gray, green, orange, purple, red, yellow Required
- Description
- Name
companyId- Type
- string Required
- Description
- Name
createdDate- Type
- string Required
- Description
- Name
entity- Type
- one of: CannedService, CannedServiceFee, CannedServiceLabor, CannedServicePart, CannedServiceTire, CannedServiceSubcontract, Customer, Fee, Labor, Order, Part, Service, Subcontract, Vehicle Required
- Description
- Name
id- 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
name- Type
- string Required
- Description
- Name
saved- Type
- boolean Required
- Description
- Name
updatedDate- Type
- string Required
- Description
- Name
labelTemplateId- Type
- string
- Description
- the id of the label template
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
curl https://api.shopmonkey.cloud/v3/label/: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,
"companyId": "companyId",
"locationId": "locationId",
"name": "name",
"color": "color",
"entity": "entity",
"saved": true
}
}
List s
Find all s
Query String parameters
- Name
collate- Type
- boolean
- Description
- if set to true, use natural sort collation when used with orderBy
- Name
ids- Type
- array
- Description
- Name
limit- Type
- number
- Description
- the limit on the number of records to return
- Name
orderby- Type
- string
- Description
- the order instructions for the result
- Name
params- Type
- string
- Description
- additional request specific params
- Name
skip- Type
- number
- Description
- the number of records to skip for a paginated result
- Name
where- Type
- string
- Description
- an object to use for filtering the results
Produces
The response content type: application/json
200 Response
- Name
data- Type
- array Required
- Description
- an array of items
- Name
meta- Type
- object
- Description
- 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 meta object
- Name
hasMore- Type
- boolean Required
- Description
- if there are more records available
- Name
total- Type
- number Required
- Description
- the total number of records
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
curl https://api.shopmonkey.cloud/v3/label \
-H "Authorization: Bearer ${SM_TOKEN}"
Example Responseapplication/json
{
"success": true,
"data": [
{
"id": "id",
"createdDate": "createdDate",
"updatedDate": null,
"companyId": "companyId",
"locationId": "locationId",
"name": "name",
"color": "color",
"entity": "entity",
"saved": true
}
]
}
Update Label
Update one Label by id
URL parameters
- Name
id- Type
- string Required
- Description
- the id for the object to update
Body parameters
Consumes
The following content type is required: application/json
- Name
color- Type
- one of: aqua, black, blue, brown, gray, green, orange, purple, red, yellow
- Description
- Name
entity- Type
- one of: CannedService, CannedServiceFee, CannedServiceLabor, CannedServicePart, CannedServiceTire, CannedServiceSubcontract, Customer, Fee, Labor, Order, Part, Service, Subcontract, Vehicle
- Description
- Name
name- Type
- string
- Description
- Name
saved- Type
- boolean
- Description
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
curl https://api.shopmonkey.cloud/v3/label/:id \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X PUT -H 'Content-Type: application/json' \
--data '{}'
Example Responseapplication/json
{
"success": true
}
Create Label
Create a new Label
Body parameters
Consumes
The following content type is required: application/json
- Name
color- Type
- one of: aqua, black, blue, brown, gray, green, orange, purple, red, yellow
- Description
- Name
entity- Type
- one of: CannedService, CannedServiceFee, CannedServiceLabor, CannedServicePart, CannedServiceTire, CannedServiceSubcontract, Customer, Fee, Labor, Order, Part, Service, Subcontract, Vehicle
- Description
- Name
name- Type
- string Required
- Description
- Name
saved- Type
- boolean
- Description
- Name
entityId- Type
- string
- Description
- id of an entity to assign the new label to
- Name
locationId- Type
- string
- Description
- the id for the location
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
curl https://api.shopmonkey.cloud/v3/label \
-H "Authorization: Bearer ${SM_TOKEN}" \
-H 'Content-Type: application/json' \
--data '{ "name" : "value" }'
Example Responseapplication/json
{
"success": true
}
Assign Label
Assign a Label to an entity
URL parameters
- Name
id- Type
- string Required
- Description
- the id for the label
Body parameters
Consumes
The following content type is required: application/json
- Name
entity- Type
- one of: CannedService, CannedServiceFee, CannedServiceLabor, CannedServicePart, CannedServiceTire, CannedServiceSubcontract, Customer, Fee, Labor, Order, Part, Service, Subcontract, Vehicle Required
- Description
- type of entity to assign the label to
- Name
entityId- Type
- string Required
- Description
- id of an entity to assign the label to
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
curl https://api.shopmonkey.cloud/v3/label/:id/assign \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X PUT -H 'Content-Type: application/json' \
--data '{ "entity" : "value", "entityId" : "value" }'
Example Responseapplication/json
{
"success": true
}
Remove Label
Remove the label from an assigned entity
URL parameters
- Name
id- Type
- string Required
- Description
- the id for the label
Body parameters
Consumes
The following content type is required: application/json
- Name
entity- Type
- one of: CannedService, CannedServiceFee, CannedServiceLabor, CannedServicePart, CannedServiceTire, CannedServiceSubcontract, Customer, Fee, Labor, Order, Part, Service, Subcontract, Vehicle Required
- Description
- type of the entity to remove this label from
- Name
entityId- Type
- string Required
- Description
- id of the entity to remove this label from
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
curl https://api.shopmonkey.cloud/v3/label/:id/assign \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X DELETE -H 'Content-Type: application/json' \
--data '{ "entity" : "value", "entityId" : "value" }'
Example Responseapplication/json
{
"success": true
}
Delete Label
Delete one Label 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
curl https://api.shopmonkey.cloud/v3/label/:id \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X DELETE -H 'Content-Type: application/json' \
--data '{}'
Example Responseapplication/json
{
"success": true
}