Labor Matrix

WIP: A summary needs to be written for Labor Matrix


GET/v3/labor_matrix/:id

Find Labor Matrix

Find one Labor Matrix 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
    LaborMatrix 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
    name
    Type
    string Required
    Description
  • Name
    type
    Type
    one of: Hours, Rate Required
    Description
  • Name
    default
    Type
    boolean Required
    Description
  • Name
    ranges
    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/labor_matrix/:id
curl https://api.shopmonkey.cloud/v3/labor_matrix/: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,
    "locationId": "locationId",
    "companyId": "companyId",
    "name": "name",
    "type": "type",
    "default": true,
    "ranges": [
      {
        "id": "id",
        "createdDate": "createdDate",
        "updatedDate": null,
        "companyId": "companyId",
        "start": 1,
        "end": null,
        "multiplier": 1,
        "laborMatrixId": "laborMatrixId"
      }
    ]
  }
}

GET/v3/labor_matrix

List Labor Matrixs

Find all Labor Matrixs

Query String parameters

  • 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

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

Example Response
application/json

{
  "success": true,
  "data": [
    {
      "id": "id",
      "createdDate": "createdDate",
      "updatedDate": null,
      "locationId": "locationId",
      "companyId": "companyId",
      "name": "name",
      "type": "type",
      "default": true,
      "ranges": [
        {
          "id": "id",
          "createdDate": "createdDate",
          "updatedDate": null,
          "companyId": "companyId",
          "start": 1,
          "end": null,
          "multiplier": 1,
          "laborMatrixId": "laborMatrixId"
        }
      ]
    }
  ]
}

PUT/v3/labor_matrix/:id

Update Labor Matrix

Update an existing Labor Matrix

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the labor matrix

Body parameters

Consumes

The following content type is required: application/json

  • Name
    name
    Type
    string
    Description
  • Name
    type
    Type
    one of: Hours, Rate
    Description
  • Name
    default
    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 Request
application/json

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

Example Response
application/json

{
  "success": true
}

DELETE/v3/labor_matrix/:id

Delete Labor Matrix

Permanently delete a Labor Matrix by id

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id of the record 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 Request
application/json

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

Example Response
application/json

{
  "success": true
}

POST/v3/labor_matrix

Create Labor Matrix with optional Ranges

Create new Labor Matrix, optionally create the new ranges and associate them with the Labor Matrix

Body parameters

Consumes

The following content type is required: application/json

  • Name
    name
    Type
    string Required
    Description
  • Name
    type
    Type
    one of: Hours, Rate Required
    Description
  • Name
    default
    Type
    boolean
    Description
  • Name
    ranges
    Type
    array
    Description

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
    LaborMatrix schema

Properties for data object

  • Name
    id
    Type
    string Required
    Description
  • 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
    name
    Type
    string Required
    Description
  • Name
    type
    Type
    one of: Hours, Rate Required
    Description
  • Name
    default
    Type
    boolean Required
    Description
  • Name
    ranges
    Type
    array Required
    Description

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

POST
/v3/labor_matrix
curl https://api.shopmonkey.cloud/v3/labor_matrix \
  -H "Authorization: Bearer ${SM_TOKEN}" \
  -H 'Content-Type: application/json' \
  --data '{ "name" : "value", "type" : "value" }'

Example Response
application/json

{
  "success": true,
  "data": {
    "id": "id",
    "createdDate": "createdDate",
    "updatedDate": null,
    "locationId": "locationId",
    "companyId": "companyId",
    "name": "name",
    "type": "type",
    "default": true
  }
}

POST/v3/labor_matrix/:id/range

Create Range

Create a new Range for the specified Labor Matrix

URL parameters

  • Name
    id
    Type
    string Required
    Description

Body parameters

Consumes

The following content type is required: application/json

  • Name
    start
    Type
    number Required
    Description
  • Name
    end
    Type
    number
    Description
  • Name
    multiplier
    Type
    number Required
    Description
  • Name
    laborMatrixId
    Type
    string
    Description
    the id for the labor matrix

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
    LaborMatrix schema

Properties for data object

  • Name
    id
    Type
    string Required
    Description
  • 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
    name
    Type
    string Required
    Description
  • Name
    type
    Type
    one of: Hours, Rate Required
    Description
  • Name
    default
    Type
    boolean Required
    Description
  • Name
    ranges
    Type
    array Required
    Description

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

POST
/v3/labor_matrix/:id/range
curl https://api.shopmonkey.cloud/v3/labor_matrix/:id/range \
  -H "Authorization: Bearer ${SM_TOKEN}" \
  -H 'Content-Type: application/json' \
  --data '{ "start" : 0, "multiplier" : 0 }'

Example Response
application/json

{
  "success": true,
  "data": {
    "id": "id",
    "createdDate": "createdDate",
    "updatedDate": null,
    "locationId": "locationId",
    "companyId": "companyId",
    "name": "name",
    "type": "type",
    "default": true,
    "ranges": [
      {
        "id": "id",
        "createdDate": "createdDate",
        "updatedDate": null,
        "companyId": "companyId",
        "start": 1,
        "end": null,
        "multiplier": 1,
        "laborMatrixId": "laborMatrixId"
      }
    ]
  }
}

PUT/v3/labor_matrix/:id/range/:rangeId

Update Range

Update the specified Range for an existing Labor Matrix

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the labor matrix
  • Name
    rangeId
    Type
    string Required
    Description
    the id for the range

Body parameters

Consumes

The following content type is required: application/json

  • Name
    start
    Type
    number
    Description
  • Name
    end
    Type
    number
    Description
  • Name
    multiplier
    Type
    number
    Description

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
    LaborMatrix schema

Properties for data object

  • Name
    id
    Type
    string Required
    Description
  • 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
    name
    Type
    string Required
    Description
  • Name
    type
    Type
    one of: Hours, Rate Required
    Description
  • Name
    default
    Type
    boolean Required
    Description
  • Name
    ranges
    Type
    array Required
    Description

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/labor_matrix/:id/range/:rangeId
curl https://api.shopmonkey.cloud/v3/labor_matrix/:id/range/:rangeId \
  -H "Authorization: Bearer ${SM_TOKEN}" \
  -X PUT -H 'Content-Type: application/json' \
  --data '{}'

Example Response
application/json

{
  "success": true,
  "data": {
    "id": "id",
    "createdDate": "createdDate",
    "updatedDate": null,
    "locationId": "locationId",
    "companyId": "companyId",
    "name": "name",
    "type": "type",
    "default": true,
    "ranges": [
      {
        "id": "id",
        "createdDate": "createdDate",
        "updatedDate": null,
        "companyId": "companyId",
        "start": 1,
        "end": null,
        "multiplier": 1,
        "laborMatrixId": "laborMatrixId"
      }
    ]
  }
}

PUT/v3/labor_matrix/:id/range

Upsert the Ranges

Upsert the specified ranges for an existing Labor Matrix

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the labor matrix

Body parameters

Consumes

The following content type is required: application/json

  • Name
    ranges
    Type
    array Required
    Description

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
    LaborMatrix schema

Properties for data object

  • Name
    id
    Type
    string Required
    Description
  • 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
    name
    Type
    string Required
    Description
  • Name
    type
    Type
    one of: Hours, Rate Required
    Description
  • Name
    default
    Type
    boolean Required
    Description
  • Name
    ranges
    Type
    array Required
    Description

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/labor_matrix/:id/range
curl https://api.shopmonkey.cloud/v3/labor_matrix/:id/range \
  -H "Authorization: Bearer ${SM_TOKEN}" \
  -X PUT -H 'Content-Type: application/json' \
  --data '{ "ranges" : [] }'

Example Response
application/json

{
  "success": true,
  "data": {
    "id": "id",
    "createdDate": "createdDate",
    "updatedDate": null,
    "locationId": "locationId",
    "companyId": "companyId",
    "name": "name",
    "type": "type",
    "default": true,
    "ranges": [
      {
        "id": "id",
        "createdDate": "createdDate",
        "updatedDate": null,
        "companyId": "companyId",
        "start": 1,
        "end": null,
        "multiplier": 1,
        "laborMatrixId": "laborMatrixId"
      }
    ]
  }
}

DELETE/v3/labor_matrix/:id/range/:rangeId

Delete Range

Delete the specified Range for an existing Labor Matrix

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the labor matrix
  • Name
    rangeId
    Type
    string Required
    Description
    the id for the range

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
    LaborMatrix schema

Properties for data object

  • Name
    id
    Type
    string Required
    Description
  • 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
    name
    Type
    string Required
    Description
  • Name
    type
    Type
    one of: Hours, Rate Required
    Description
  • Name
    default
    Type
    boolean Required
    Description
  • Name
    ranges
    Type
    array Required
    Description

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/labor_matrix/:id/range/:rangeId
curl https://api.shopmonkey.cloud/v3/labor_matrix/:id/range/:rangeId \
  -H "Authorization: Bearer ${SM_TOKEN}" \
  -X DELETE -H 'Content-Type: application/json' \
  --data '{}'

Example Response
application/json

{
  "success": true,
  "data": {
    "id": "id",
    "createdDate": "createdDate",
    "updatedDate": null,
    "locationId": "locationId",
    "companyId": "companyId",
    "name": "name",
    "type": "type",
    "default": true,
    "ranges": [
      {
        "id": "id",
        "createdDate": "createdDate",
        "updatedDate": null,
        "companyId": "companyId",
        "start": 1,
        "end": null,
        "multiplier": 1,
        "laborMatrixId": "laborMatrixId"
      }
    ]
  }
}