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.


GET/v3/company/:id/config

Get Company Config

Get configuration for a company

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the object

Produces

The response content type: application/json

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
    message
    Type
    string
    Description
    the error message if success = false
  • 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
    sharedInventoryControl
    Type
    boolean Required
    Description
  • Name
    id
    Type
    string Required
    Description
  • Name
    companyId
    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
    updatedById
    Type
    string Required
    Description
  • Name
    documentFootersCompanyManaged
    Type
    boolean Required
    Description
  • Name
    estimateFooter
    Type
    string Required
    Description
  • Name
    invoiceFooter
    Type
    string Required
    Description
  • Name
    showTimestampOnEstimatesAndInvoices
    Type
    boolean Required
    Description
  • Name
    sharedInventory
    Type
    boolean Required
    Description
  • Name
    sharedInventoryPartsNotes
    Type
    boolean Required
    Description
  • Name
    sharedInventoryPartsPricing
    Type
    one of: Cost, None, PricingMatrix, PricingMatrixAndCost Required
    Description
  • Name
    sharedInventoryPartsURLs
    Type
    boolean Required
    Description
  • Name
    sharedInventoryVendorAccountNumbers
    Type
    boolean Required
    Description
  • Name
    sharedInventoryVendorAddresses
    Type
    boolean Required
    Description
  • Name
    sharedInventoryVendorContacts
    Type
    boolean Required
    Description
  • Name
    sharedInventoryVendorURLs
    Type
    boolean Required
    Description
  • Name
    orderChecklistCompanyManaged
    Type
    boolean Required
    Description
  • Name
    orderChecklistConfig
    Type
    object
    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/company/:id/config
curl https://api.shopmonkey.cloud/v3/company/:id/config \
  -H "Authorization: Bearer ${SM_TOKEN}"

Example Response
application/json

{
  "success": true,
  "data": {
    "id": "id",
    "companyId": "companyId",
    "meta": {
      "userId": "userId",
      "sessionId": "sessionId",
      "version": 1
    },
    "createdDate": "createdDate",
    "updatedDate": null,
    "updatedById": null,
    "documentFootersCompanyManaged": true,
    "estimateFooter": null,
    "invoiceFooter": null,
    "showTimestampOnEstimatesAndInvoices": true,
    "sharedInventory": true,
    "sharedInventoryPartsNotes": true,
    "sharedInventoryPartsPricing": null,
    "sharedInventoryPartsURLs": true,
    "sharedInventoryVendorAccountNumbers": true,
    "sharedInventoryVendorAddresses": true,
    "sharedInventoryVendorContacts": true,
    "sharedInventoryVendorURLs": true
  }
}

PUT/v3/company/:id/logo

Assign Logo to the Company

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id of the company

Body parameters

Consumes

The following content type is required: application/json

  • Name
    blobId
    Type
    string Required
    Description
    the id of the blob

Produces

The response content type: application/json

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
    message
    Type
    string
    Description
    the error message if success = false
  • 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
    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
application/json

PUT
/v3/company/:id/logo
curl https://api.shopmonkey.cloud/v3/company/:id/logo \
  -H "Authorization: Bearer ${SM_TOKEN}" \
  -X PUT -H 'Content-Type: application/json' \
  --data '{ "blobId" : "value" }'

Example Response
application/json

{
  "success": true,
  "data": {
    "blobId": "blobId"
  }
}

DELETE/v3/company/:id/logo

Unassign Logo from the Company

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id of the company

Produces

The response content type: application/json

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
    message
    Type
    string
    Description
    the error message if success = false
  • 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
    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
application/json

DELETE
/v3/company/:id/logo
curl https://api.shopmonkey.cloud/v3/company/:id/logo \
  -H "Authorization: Bearer ${SM_TOKEN}" \
  -X DELETE -H 'Content-Type: application/json' \
  --data '{}'

Example Response
application/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

Query String parameters

  • Name
    platform
    Type
    one of: 'Web', 'Mobile'
    Description
    the platform filter for custom field values included

Produces

The response content type: application/json

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
    message
    Type
    string
    Description
    the error message if success = false
  • 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
    one of: FullAccess, ReadOnly Required
    Description
  • Name
    parentCompanyConfigOverrides
    Type
    object 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
    one of: US, CA, MX, AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, VG, BN, BG, BF, BI, CV, KH, CM, KY, CF, TD, CL, CN, HK, MO, CX, CC, CO, KM, CG, CK, CR, HR, CU, CW, CY, CZ, CI, KP, CD, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, SZ, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, FM, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, KR, MD, RO, RU, RW, RE, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, SS, ES, LK, PS, SD, SR, SJ, SE, CH, SY, TW, TJ, TH, MK, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, TZ, UM, VI, UY, UZ, VU, VE, VN, WF, EH, YE, ZM, ZW Required
    Description
  • Name
    email
    Type
    string Required
    Description
  • Name
    contactName
    Type
    string Required
    Description
  • Name
    phone
    Type
    string Required
    Description
  • Name
    status
    Type
    one of: Pending, InProgress, Completed Required
    Description
  • Name
    upgradeScheduledDate
    Type
    string Required
    Description
    the date the company is scheduled to upgrade from v1
  • Name
    upgraded
    Type
    boolean Required
    Description
    if company was upgraded from v1
  • Name
    upgradedDate
    Type
    string Required
    Description
    the date the company was upgraded from v1
  • Name
    paymentProvider
    Type
    one of: Finix, FirstMile, Manual, Stripe, Sunbit 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
    inventoryTransfersEnabled
    Type
    boolean Required
    Description
    if the company is allowed to transfer inventory between locations
  • Name
    lastInventoryTransferNumber
    Type
    integer Required
    Description
    the last transfer number used for the company
  • Name
    imported
    Type
    boolean Required
    Description
  • Name
    maintenance
    Type
    boolean Required
    Description
  • 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
    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/company/:id
curl https://api.shopmonkey.cloud/v3/company/:id \
  -H "Authorization: Bearer ${SM_TOKEN}"

Example Response
application/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

Consumes

The following content type is required: application/json

  • Name
    parentCompanyId
    Type
    string
    Description
  • Name
    parentCompanyAccessLevel
    Type
    one of: FullAccess, ReadOnly
    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
    one of: US, CA, MX, AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, VG, BN, BG, BF, BI, CV, KH, CM, KY, CF, TD, CL, CN, HK, MO, CX, CC, CO, KM, CG, CK, CR, HR, CU, CW, CY, CZ, CI, KP, CD, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, SZ, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, FM, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, KR, MD, RO, RU, RW, RE, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, SS, ES, LK, PS, SD, SR, SJ, SE, CH, SY, TW, TJ, TH, MK, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, TZ, UM, VI, UY, UZ, VU, VE, VN, WF, EH, YE, ZM, ZW
    Description
  • Name
    email
    Type
    string
    Description
  • Name
    phone
    Type
    string
    Description
  • Name
    dataSharingEnabled
    Type
    boolean
    Description
  • Name
    useLogoForLocations
    Type
    boolean
    Description
    use the company logo for all locations
  • Name
    website
    Type
    string
    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 Request
application/json

PUT
/v3/company/:id
curl https://api.shopmonkey.cloud/v3/company/:id \
  -H "Authorization: Bearer ${SM_TOKEN}" \
  -X PUT -H 'Content-Type: application/json' \
  --data '{}'

Example Response
application/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

Consumes

The following content type is required: application/json

  • Name
    customFields
    Type
    object
    Description
    custom fields as JSON object

Produces

The response content type: application/json

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
    message
    Type
    string
    Description
    the error message if success = false
  • 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
    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
application/json

PUT
/v3/company/:id/customfield
curl https://api.shopmonkey.cloud/v3/company/:id/customfield \
  -H "Authorization: Bearer ${SM_TOKEN}" \
  -X PUT -H 'Content-Type: application/json' \
  --data '{}'

Example Response
application/json

{
  "success": true,
  "data": {
    "id": "id"
  }
}

GET/v3/company/:id/logo

Find the logo for the Company

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id of the company

Query String parameters

  • Name
    inline
    Type
    boolean
    Description
  • Name
    transform
    Type
    string
    Description
    an optional transformation to apply to the blob

200 Response

the content of the uploaded blob based on its contentType

Example Request

GET
/v3/company/:id/logo
curl https://api.shopmonkey.cloud/v3/company/:id/logo \
  -H "Authorization: Bearer ${SM_TOKEN}"