HubstaffDeveloper Portal

Job sites

Define physical locations for field work tracking

Get job site

GET/v2/job_sites/{job_site_id}

Returns the job site with the given ID.

Parameters

NameInTypeDescription
job_site_idrequired
pathinteger (int32)
Job site ID

Responses

200A job site
object
  • job_siteobject
    object

    JobSite model

    • idinteger required

      Job Site ID

    • organization_idinteger required

      Organization ID

    • namestring required

      Job site name

    • statusstring required

      Job site status

    • addressstring required

      Job site address

    • latitudenumber required

      Job site latitude

    • longitudenumber required

      Job site longitude

    • radiusinteger required

      Job site radius

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

    • last_visited_atstring required

      Last visit time

    • rulesobject
      object
      • idinteger required

        Job Site Rule ID

      • enter_actionstring required

        The enter action

      • exit_actionstring required

        The exit action

      • user_idsarray required

        List of user IDs to set for this rule

        array<integer>

        List of user IDs to set for this rule

        items
        integer(int64)
      • team_idsarray required

        List of team IDs to set for this rule

        array<integer>

        List of team IDs to set for this rule

        items
        integer(int64)
      • start_project_idinteger

        Project ID to auto start when enter_action is set to track

      • start_task_idinteger

        Project ID to auto start when enter_action is set to track

Example response
json
{
  "job_site": {
    "id": 0,
    "organization_id": 0,
    "name": "string",
    "status": "string",
    "address": "string",
    "latitude": 0,
    "longitude": 0,
    "radius": 0,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "last_visited_at": "2024-01-15T10:30:00Z",
    "rules": {
      "id": 0,
      "enter_action": "string",
      "exit_action": "string",
      "user_ids": [
        0
      ],
      "team_ids": [
        0
      ],
      "start_project_id": 0,
      "start_task_id": 0
    }
  }
}
400Invalid parameters
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
401Unauthorized
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
403API access is only for organizations on an active plan
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
404Could not find record
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
429Rate limit exceeded
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}

Update job site

PUT/v2/job_sites/{job_site_id}

Updates a job site.

Returns the updated job site.

Parameters

NameInTypeDescription
job_site_idrequired
pathinteger (int32)
Job site ID

Request body

object

Update job site

  • namestring

    Updated job site name

  • addressstring

    Updated job site address

  • latitudenumber

    Updated job site longitude

  • longitudenumber

    Updated job site latitude

  • radiusinteger

    Updated job site radius

  • statusstring

    The job site status.

Responses

201A job site
object
  • job_siteobject
    object

    JobSite model

    • idinteger required

      Job Site ID

    • organization_idinteger required

      Organization ID

    • namestring required

      Job site name

    • statusstring required

      Job site status

    • addressstring required

      Job site address

    • latitudenumber required

      Job site latitude

    • longitudenumber required

      Job site longitude

    • radiusinteger required

      Job site radius

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

    • last_visited_atstring required

      Last visit time

    • rulesobject
      object
      • idinteger required

        Job Site Rule ID

      • enter_actionstring required

        The enter action

      • exit_actionstring required

        The exit action

      • user_idsarray required

        List of user IDs to set for this rule

        array<integer>

        List of user IDs to set for this rule

        items
        integer(int64)
      • team_idsarray required

        List of team IDs to set for this rule

        array<integer>

        List of team IDs to set for this rule

        items
        integer(int64)
      • start_project_idinteger

        Project ID to auto start when enter_action is set to track

      • start_task_idinteger

        Project ID to auto start when enter_action is set to track

Example response
json
{
  "job_site": {
    "id": 0,
    "organization_id": 0,
    "name": "string",
    "status": "string",
    "address": "string",
    "latitude": 0,
    "longitude": 0,
    "radius": 0,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "last_visited_at": "2024-01-15T10:30:00Z",
    "rules": {
      "id": 0,
      "enter_action": "string",
      "exit_action": "string",
      "user_ids": [
        0
      ],
      "team_ids": [
        0
      ],
      "start_project_id": 0,
      "start_task_id": 0
    }
  }
}
400Invalid parameters
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
401Unauthorized
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
403API access is only for organizations on an active plan
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
404Could not find record
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
429Rate limit exceeded
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}

Update job site rules

PUT/v2/job_sites/{job_site_id}/update_rules

Updates rules on a job site.

Returns the updated job site.

Parameters

NameInTypeDescription
job_site_idrequired
pathinteger (int32)
Job site ID

Request body

object

Update job site rules

  • rulesarray required

    A set of rule updates

    array<object>

    A set of rule updates

    items
    object
    • idinteger required

      The rule ID number

    • enter_actionstring

      The enter action

    • exit_actionstring

      The exit action

    • user_idsarray

      List of user IDs to set for this rule (replaces other users)

      array<integer>

      List of user IDs to set for this rule (replaces other users)

      items
      integer(int32)
    • add_user_idsarray

      List of user IDs to add to this rule

      array<integer>

      List of user IDs to add to this rule

      items
      integer(int32)
    • remove_user_idsarray

      List of user IDs to remove from this rule

      array<integer>

      List of user IDs to remove from this rule

      items
      integer(int32)
    • team_idsarray

      List of team IDs to set for this rule (replaces other teams)

      array<integer>

      List of team IDs to set for this rule (replaces other teams)

      items
      integer(int32)
    • add_team_idsarray

      List of team IDs to add to this rule

      array<integer>

      List of team IDs to add to this rule

      items
      integer(int32)
    • remove_team_idsarray

      List of team IDs to remove from this rule

      array<integer>

      List of team IDs to remove from this rule

      items
      integer(int32)
    • start_project_idinteger

      Project ID to auto start when enter_action is set to track, or none to clear

Responses

201A job site
object
  • job_siteobject
    object

    JobSite model

    • idinteger required

      Job Site ID

    • organization_idinteger required

      Organization ID

    • namestring required

      Job site name

    • statusstring required

      Job site status

    • addressstring required

      Job site address

    • latitudenumber required

      Job site latitude

    • longitudenumber required

      Job site longitude

    • radiusinteger required

      Job site radius

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

    • last_visited_atstring required

      Last visit time

    • rulesobject
      object
      • idinteger required

        Job Site Rule ID

      • enter_actionstring required

        The enter action

      • exit_actionstring required

        The exit action

      • user_idsarray required

        List of user IDs to set for this rule

        array<integer>

        List of user IDs to set for this rule

        items
        integer(int64)
      • team_idsarray required

        List of team IDs to set for this rule

        array<integer>

        List of team IDs to set for this rule

        items
        integer(int64)
      • start_project_idinteger

        Project ID to auto start when enter_action is set to track

      • start_task_idinteger

        Project ID to auto start when enter_action is set to track

Example response
json
{
  "job_site": {
    "id": 0,
    "organization_id": 0,
    "name": "string",
    "status": "string",
    "address": "string",
    "latitude": 0,
    "longitude": 0,
    "radius": 0,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "last_visited_at": "2024-01-15T10:30:00Z",
    "rules": {
      "id": 0,
      "enter_action": "string",
      "exit_action": "string",
      "user_ids": [
        0
      ],
      "team_ids": [
        0
      ],
      "start_project_id": 0,
      "start_task_id": 0
    }
  }
}
400Invalid parameters
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
401Unauthorized
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
403API access is only for organizations on an active plan
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
404Could not find record
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
429Rate limit exceeded
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}

Add job site rules

PUT/v2/job_sites/{job_site_id}/add_rules

Adds new rules to a job site.

Returns the updated job site.

Parameters

NameInTypeDescription
job_site_idrequired
pathinteger (int32)
Job site ID

Request body

object

Add job site rules

  • rulesarray required

    A rule configuration

    array<object>

    A rule configuration

    items
    object
    • enter_actionstring

      The enter action

    • exit_actionstring

      The exit action

    • user_idsarray

      List of user IDs to set for this rule

      array<integer>

      List of user IDs to set for this rule

      items
      integer(int32)
    • team_idsarray

      List of team IDs to set for this rule

      array<integer>

      List of team IDs to set for this rule

      items
      integer(int32)
    • start_project_idinteger

      Project ID to auto start when enter_action is set to track

Responses

201A job site
object
  • job_siteobject
    object

    JobSite model

    • idinteger required

      Job Site ID

    • organization_idinteger required

      Organization ID

    • namestring required

      Job site name

    • statusstring required

      Job site status

    • addressstring required

      Job site address

    • latitudenumber required

      Job site latitude

    • longitudenumber required

      Job site longitude

    • radiusinteger required

      Job site radius

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

    • last_visited_atstring required

      Last visit time

    • rulesobject
      object
      • idinteger required

        Job Site Rule ID

      • enter_actionstring required

        The enter action

      • exit_actionstring required

        The exit action

      • user_idsarray required

        List of user IDs to set for this rule

        array<integer>

        List of user IDs to set for this rule

        items
        integer(int64)
      • team_idsarray required

        List of team IDs to set for this rule

        array<integer>

        List of team IDs to set for this rule

        items
        integer(int64)
      • start_project_idinteger

        Project ID to auto start when enter_action is set to track

      • start_task_idinteger

        Project ID to auto start when enter_action is set to track

Example response
json
{
  "job_site": {
    "id": 0,
    "organization_id": 0,
    "name": "string",
    "status": "string",
    "address": "string",
    "latitude": 0,
    "longitude": 0,
    "radius": 0,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "last_visited_at": "2024-01-15T10:30:00Z",
    "rules": {
      "id": 0,
      "enter_action": "string",
      "exit_action": "string",
      "user_ids": [
        0
      ],
      "team_ids": [
        0
      ],
      "start_project_id": 0,
      "start_task_id": 0
    }
  }
}
400Invalid parameters
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
401Unauthorized
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
403API access is only for organizations on an active plan
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
404Could not find record
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
429Rate limit exceeded
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}

Remove job site rules

PUT/v2/job_sites/{job_site_id}/remove_rules

Removes rules from a job site.

Returns the updated job site.

Parameters

NameInTypeDescription
job_site_idrequired
pathinteger (int32)
Job site ID

Request body

object

Remove job site rules

  • rule_idsarray required

    The rule ids to remove

    array<integer>

    The rule ids to remove

    items
    integer(int32)

Responses

201A job site
object
  • job_siteobject
    object

    JobSite model

    • idinteger required

      Job Site ID

    • organization_idinteger required

      Organization ID

    • namestring required

      Job site name

    • statusstring required

      Job site status

    • addressstring required

      Job site address

    • latitudenumber required

      Job site latitude

    • longitudenumber required

      Job site longitude

    • radiusinteger required

      Job site radius

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

    • last_visited_atstring required

      Last visit time

    • rulesobject
      object
      • idinteger required

        Job Site Rule ID

      • enter_actionstring required

        The enter action

      • exit_actionstring required

        The exit action

      • user_idsarray required

        List of user IDs to set for this rule

        array<integer>

        List of user IDs to set for this rule

        items
        integer(int64)
      • team_idsarray required

        List of team IDs to set for this rule

        array<integer>

        List of team IDs to set for this rule

        items
        integer(int64)
      • start_project_idinteger

        Project ID to auto start when enter_action is set to track

      • start_task_idinteger

        Project ID to auto start when enter_action is set to track

Example response
json
{
  "job_site": {
    "id": 0,
    "organization_id": 0,
    "name": "string",
    "status": "string",
    "address": "string",
    "latitude": 0,
    "longitude": 0,
    "radius": 0,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "last_visited_at": "2024-01-15T10:30:00Z",
    "rules": {
      "id": 0,
      "enter_action": "string",
      "exit_action": "string",
      "user_ids": [
        0
      ],
      "team_ids": [
        0
      ],
      "start_project_id": 0,
      "start_task_id": 0
    }
  }
}
400Invalid parameters
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
401Unauthorized
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
403API access is only for organizations on an active plan
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
404Could not find record
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
429Rate limit exceeded
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}

List organization job sites

GET/v2/organizations/{organization_id}/job_sites

Returns a collection of job sites (geofenced locations) for the organization.

Results can be filtered by created[start]/[stop].

Parameters

NameInTypeDescription
organization_idrequired
pathinteger (int32)
page_start_id
queryinteger (int32)
The page start ID.
page_limit
queryinteger (int32)
The default page size
created[start]
querystring (date-time)
Start time (ISO 8601)
created[stop]
querystring (date-time)
Stop time (ISO 8601, Exclusive)

Responses

200A list of job sites
object
  • job_sitesarray
    array<object>
    items
    object

    JobSite model

    • idinteger required

      Job Site ID

    • organization_idinteger required

      Organization ID

    • namestring required

      Job site name

    • statusstring required

      Job site status

    • addressstring required

      Job site address

    • latitudenumber required

      Job site latitude

    • longitudenumber required

      Job site longitude

    • radiusinteger required

      Job site radius

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

    • last_visited_atstring required

      Last visit time

    • rulesobject
      object
      • idinteger required

        Job Site Rule ID

      • enter_actionstring required

        The enter action

      • exit_actionstring required

        The exit action

      • user_idsarray required

        List of user IDs to set for this rule

        array<integer>

        List of user IDs to set for this rule

        items
        integer(int64)
      • team_idsarray required

        List of team IDs to set for this rule

        array<integer>

        List of team IDs to set for this rule

        items
        integer(int64)
      • start_project_idinteger

        Project ID to auto start when enter_action is set to track

      • start_task_idinteger

        Project ID to auto start when enter_action is set to track

Example response
json
{
  "job_sites": [
    {
      "id": 0,
      "organization_id": 0,
      "name": "string",
      "status": "string",
      "address": "string",
      "latitude": 0,
      "longitude": 0,
      "radius": 0,
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z",
      "last_visited_at": "2024-01-15T10:30:00Z",
      "rules": {
        "id": 0,
        "enter_action": "string",
        "exit_action": "string",
        "user_ids": [
          0
        ],
        "team_ids": [
          0
        ],
        "start_project_id": 0,
        "start_task_id": 0
      }
    }
  ]
}
400Invalid parameters
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
401Unauthorized
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
403API access is only for organizations on an active plan
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
404Could not find record
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
429Rate limit exceeded
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}

Create job site

POST/v2/organizations/{organization_id}/job_sites

Creates a new job site.

Returns the created job site.

Parameters

NameInTypeDescription
organization_idrequired
pathinteger (int32)

Request body

object

Create job site

  • namestring required

    Job site name

  • addressstring required

    Job site address

  • latitudenumber required

    Job site longitude

  • longitudenumber required

    Job site latitude

  • radiusinteger required

    Job site radius

  • rulesarray required

    A rule configuration

    array<object>

    A rule configuration

    items
    object
    • enter_actionstring

      The enter action

    • exit_actionstring

      The exit action

    • user_idsarray

      List of user IDs to add to this rule

      array<integer>

      List of user IDs to add to this rule

      items
      integer(int32)
    • team_idsarray

      List of team IDs to add to this rule

      array<integer>

      List of team IDs to add to this rule

      items
      integer(int32)
    • start_project_idinteger

      Project ID to auto start when enter_action is set to track

Responses

201A job site
object
  • job_siteobject
    object

    JobSite model

    • idinteger required

      Job Site ID

    • organization_idinteger required

      Organization ID

    • namestring required

      Job site name

    • statusstring required

      Job site status

    • addressstring required

      Job site address

    • latitudenumber required

      Job site latitude

    • longitudenumber required

      Job site longitude

    • radiusinteger required

      Job site radius

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

    • last_visited_atstring required

      Last visit time

    • rulesobject
      object
      • idinteger required

        Job Site Rule ID

      • enter_actionstring required

        The enter action

      • exit_actionstring required

        The exit action

      • user_idsarray required

        List of user IDs to set for this rule

        array<integer>

        List of user IDs to set for this rule

        items
        integer(int64)
      • team_idsarray required

        List of team IDs to set for this rule

        array<integer>

        List of team IDs to set for this rule

        items
        integer(int64)
      • start_project_idinteger

        Project ID to auto start when enter_action is set to track

      • start_task_idinteger

        Project ID to auto start when enter_action is set to track

Example response
json
{
  "job_site": {
    "id": 0,
    "organization_id": 0,
    "name": "string",
    "status": "string",
    "address": "string",
    "latitude": 0,
    "longitude": 0,
    "radius": 0,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "last_visited_at": "2024-01-15T10:30:00Z",
    "rules": {
      "id": 0,
      "enter_action": "string",
      "exit_action": "string",
      "user_ids": [
        0
      ],
      "team_ids": [
        0
      ],
      "start_project_id": 0,
      "start_task_id": 0
    }
  }
}
400Invalid parameters
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
401Unauthorized
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
403API access is only for organizations on an active plan
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
404Could not find record
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
429Rate limit exceeded
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}