Company
The Company object is set by Shopmonkey when you account is provisioned and generally has limited ability to be modified. You can update the name and custom fields.
PUT/v3/company/:id/logo
Assign Logo
Assign Logo to the Company
URL parameters
- Name
id
- Type
- string Required
- Description
- the id of the company
Body parameters
- Name
blobId
- Type
- string Required
- Description
- the id of the blob
200
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
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
- Name
data
- Type
- object Required
- Description
Properties for data
object
- Name
blobId
- Type
- string Required
- Description
- the id of the blob
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
PUT
/v3/company/:id/logocurl https://api.shopmonkey.cloud/v3/company/ID/logo \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X PUT -H 'Content-Type: application/json' \
--data '{ "blobId" : "value" }'
Example Responseapplication/json
{
"success": true,
"data": {
"blobId": "blobId"
}
}
DELETE/v3/company/:id/logo
Unassign Logo
Unassign Logo from the Company
URL parameters
- Name
id
- Type
- string Required
- Description
- the id of the company
200
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
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
- Name
data
- Type
- object Required
- Description
Properties for data
object
- Name
blobId
- Type
- string Required
- Description
- the id of the blob
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/company/:id/logocurl https://api.shopmonkey.cloud/v3/company/ID/logo \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X DELETE -H 'Content-Type: application/json' \
--data '{}'
Example Responseapplication/json
{
"success": true,
"data": {
"blobId": "blobId"
}
}
GET/v3/company/:id
Find Company
Find a Company by id
URL parameters
- Name
id
- Type
- string Required
- Description
- the id for the object
200
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
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
- Name
data
- Type
- object Required
- Description
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
createdDate
- Type
- string Required
- Description
- Name
updatedDate
- Type
- string Required
- Description
- Name
parentCompanyId
- Type
- string Required
- Description
- Name
parentCompanyAccessLevel
- Type
- string Required
- Description
- Name
name
- Type
- string Required
- Description
- Name
address1
- Type
- string Required
- Description
- Name
address2
- Type
- string Required
- Description
- Name
city
- Type
- string Required
- Description
- Name
state
- Type
- string Required
- Description
- Name
postalCode
- Type
- string Required
- Description
- Name
country
- Type
- string Required
- Description
- Name
email
- Type
- string Required
- Description
- Name
contactName
- Type
- string Required
- Description
- Name
phone
- Type
- string Required
- Description
- Name
status
- Type
- string Required
- Description
- Name
upgraded
- Type
- boolean Required
- Description
- if company was upgraded from v1
- Name
paymentProvider
- Type
- string Required
- Description
- Name
deactivatedRoles
- Type
- object
- Description
- Name
dataSharingEnabled
- Type
- boolean Required
- Description
- Name
useLogoForLocations
- Type
- boolean Required
- Description
- use the company logo for all locations
- Name
hqEnabled
- Type
- boolean Required
- Description
- Name
website
- Type
- string Required
- Description
- Name
whiteLabelBlobId
- Type
- string Required
- Description
- Name
salesforceAccountId
- Type
- string Required
- Description
- the sf account record id if a real customer
- Name
markedForDeletion
- Type
- boolean Required
- Description
- if the company is marked for deletion
- Name
markedForDeletionByUserId
- Type
- string Required
- Description
- the user id that marked the company for deletion
- Name
markedForDeletionDate
- Type
- string Required
- Description
- the date the company was marked for deletion
- Name
demo
- Type
- boolean Required
- Description
- if the company is marked as a demo shop and should not be considered production
- Name
customFieldDefinitions
- Type
- array Required
- Description
- Name
customFields
- Type
- object
- Description
- custom fields as JSON object
- Name
integrationConfigs
- Type
- array 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
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/company/:idcurl https://api.shopmonkey.cloud/v3/company/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,
"name": "name",
"defaultLaborRateId": null,
"companyAddOns": [
{
"addon": "addon",
"status": "status"
}
],
"customFieldDefinitions": [
{
"definition": {
"id": "id",
"type": "type",
"name": "name",
"required": true,
"validationUrl": null,
"validationRegExp": null,
"scope": "scope"
},
"target": {
"id": "id",
"name": "name",
"platform": "platform",
"scope": "scope"
},
"order": 1
}
],
"customFields": {}
}
}
PUT/v3/company/:id
Update Company
Update a Company by id
URL parameters
- Name
id
- Type
- string Required
- Description
- the id for the object
Body parameters
- Name
parentCompanyId
- Type
- string
- Description
- Name
parentCompanyAccessLevel
- Type
- string
- Description
- Name
name
- Type
- string
- Description
- Name
address1
- Type
- string
- Description
- Name
address2
- Type
- string
- Description
- Name
city
- Type
- string
- Description
- Name
state
- Type
- string
- Description
- Name
postalCode
- Type
- string
- Description
- Name
country
- Type
- string
- Description
- Name
email
- Type
- string
- Description
- Name
phone
- Type
- string
- Description
- Name
useLogoForLocations
- Type
- boolean
- Description
- use the company logo for all locations
- Name
website
- Type
- string
- Description
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
PUT
/v3/company/:idcurl https://api.shopmonkey.cloud/v3/company/ID \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X PUT -H 'Content-Type: application/json' \
--data '{}'
Example Responseapplication/json
{
"success": true
}
PUT/v3/company/:id/customfield
Update Company Custom Fields
Update a Company custom fields
URL parameters
- Name
id
- Type
- string Required
- Description
- the id for the object
Body parameters
- Name
customFields
- Type
- object
- Description
- custom fields as JSON object
200
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
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
- Name
data
- Type
- object 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
PUT
/v3/company/:id/customfieldcurl https://api.shopmonkey.cloud/v3/company/ID/customfield \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X PUT -H 'Content-Type: application/json' \
--data '{}'
Example Responseapplication/json
{
"success": true,
"data": {
"id": "id"
}
}
GET/v3/company/:id/logo
Find Company Logo
Find the logo for the Company
URL parameters
- Name
id
- Type
- string Required
- Description
- the id of the company
200
Response
the content of the uploaded blob based on its contentType
Example Request
GET
/v3/company/:id/logocurl https://api.shopmonkey.cloud/v3/company/ID/logo \
-H "Authorization: Bearer ${SM_TOKEN}"