Projects

  • Update a project

    PUT /api/1/projects/:id.json
    Formats
    json jsonp

    Update an existing project. Requires a valid project object to be posted. Missing attributes from the object will be merged with the existing project.

    Errors
    • 401 Unauthorized
    • 404 Record Not Found - returned if the company with the specified UUID is not found
    • 404 Record Not Found - returned if the project with the specified UUID is not found
    • 422 Invalid Record - if the project fails validation. An error message will be returned, declaring the error.
    Example
    PUT /api/1/projects/7cadb71d-2eeb-4ee3-8067-fd35bb8b3512
    {
      "project": {
        "name": "mollitia saepe",
        "company_uuid": "d0ad24cb-d74d-4cfe-bae9-4314bef82237",
        "visibility": "private"
      }
    }
    200
    {
      "response": {
        "active": "true",
        "company_uuid": "d0ad24cb-d74d-4cfe-bae9-4314bef82237",
        "default_tags": null,
        "hourly_rate": null,
        "hourly_rate_cents": null,
        "name": "mollitia saepe",
        "notes": null,
        "time_limit": null,
        "time_limit_string": null,
        "uuid": "7cadb71d-2eeb-4ee3-8067-fd35bb8b3512",
        "visibility": "private",
        "activities": [
          {
            "name": "dolores quidem",
            "project_uuid": "7cadb71d-2eeb-4ee3-8067-fd35bb8b3512",
            "uuid": "9551368b-8bb2-4596-ab38-e313c68d0679"
          },
          {
            "name": "est fugiat",
            "project_uuid": "7cadb71d-2eeb-4ee3-8067-fd35bb8b3512",
            "uuid": "87107bdd-7c31-48a2-9ddf-6c2170ffe858"
          }
        ],
        "running": false,
        "grand_total": 0,
        "running_total": 0
      }
    }
    Parameters
    • project

      A project JSON object.

      • uuid

        A UUID to identify the project. If null, one will be generated

      • name

        Name of the project

      • active

        Indicates if the project can be punched in to or not

      • company_uuid

        UUID of the company the project belongs to

      • visibility

        Sets the visibility of the project. Public projects will be added to all staff; Private projects will only be available to the owner; Custom projects are only available to users in the user_uuids array

      • time_limit_string

        String representation of the time limit. When saving, this value will be parsed and will populate time limit (if the supplied time limit is null)

      • time_limit

        Time limit for this project (in seconds)

      • default_tags

        An comma separated list of tags that will automatically applied to new running shifts when punching in

      • notes

        Notes associated with this project

      • hourly_rate

        String representation of the hourly rate. Will include currency symbol. When saving, this will be parsed and set hourly_rate_cents (if hourly_rate_cents is null)

      • hourly_rate_cents

        Hourly rate in cents.

      • running

        Is true if the project is currently running. Will be null if there is no time limit. This value is ignored when creating or updating a project.

      • grand_total

        The number of seconds already punched in to this project by all users. If the project is punched in to, the grand_total will include time up until when the request is made

      • running_total

        The number of seconds already punched in to this project by just the authenticated user. If the project is punched in to, the running_total will include time up until when the request is made.

      • time_left

        Returns the number of seconds lefts before the project becomes overdue. This value is ignored when creating or updating a project

      • overdue

        Is true if the project is overdue. Will be null if there is no time limit. This value is ignored when creating or update a project

      • nearly_overdue

        Is true if the project is nearly overdue. Will be null if there is no time limit. This value is ignored when creating or update a project

      • started_at

        The start time of the currently running shift. Will be null if the project is not running. This value is ignored when creating or update a project. Formatted as the number of seconds since EPOCH (in seconds).

      • activities

        Array of activity objects

      • tag_list

        An comma separated list of tags associated with the company

      • invoice_amount

        invoice_amount

    Update a project belonging to a company

    PUT /api/1/companies/:company_uuid/projects/:uuid.json
    Formats
    json jsonp

    Update an existing project. Requires a valid project object to be posted. Missing attributes from the object will be merged with the existing project.

    Errors
    • 401 Unauthorized
    • 404 Record Not Found - returned if the company with the specified UUID is not found
    • 404 Record Not Found - returned if the project with the specified UUID is not found
    • 422 Invalid Record - if the project fails validation. An error message will be returned, declaring the error.
    Example
    PUT /api/1/projects/7cadb71d-2eeb-4ee3-8067-fd35bb8b3512
    {
      "project": {
        "name": "mollitia saepe",
        "company_uuid": "d0ad24cb-d74d-4cfe-bae9-4314bef82237",
        "visibility": "private"
      }
    }
    200
    {
      "response": {
        "active": "true",
        "company_uuid": "d0ad24cb-d74d-4cfe-bae9-4314bef82237",
        "default_tags": null,
        "hourly_rate": null,
        "hourly_rate_cents": null,
        "name": "mollitia saepe",
        "notes": null,
        "time_limit": null,
        "time_limit_string": null,
        "uuid": "7cadb71d-2eeb-4ee3-8067-fd35bb8b3512",
        "visibility": "private",
        "activities": [
          {
            "name": "dolores quidem",
            "project_uuid": "7cadb71d-2eeb-4ee3-8067-fd35bb8b3512",
            "uuid": "9551368b-8bb2-4596-ab38-e313c68d0679"
          },
          {
            "name": "est fugiat",
            "project_uuid": "7cadb71d-2eeb-4ee3-8067-fd35bb8b3512",
            "uuid": "87107bdd-7c31-48a2-9ddf-6c2170ffe858"
          }
        ],
        "running": false,
        "grand_total": 0,
        "running_total": 0
      }
    }
    Parameters
    • project

      A project JSON object.

      • uuid

        A UUID to identify the project. If null, one will be generated

      • name

        Name of the project

      • active

        Indicates if the project can be punched in to or not

      • company_uuid

        UUID of the company the project belongs to

      • visibility

        Sets the visibility of the project. Public projects will be added to all staff; Private projects will only be available to the owner; Custom projects are only available to users in the user_uuids array

      • time_limit_string

        String representation of the time limit. When saving, this value will be parsed and will populate time limit (if the supplied time limit is null)

      • time_limit

        Time limit for this project (in seconds)

      • default_tags

        An comma separated list of tags that will automatically applied to new running shifts when punching in

      • notes

        Notes associated with this project

      • hourly_rate

        String representation of the hourly rate. Will include currency symbol. When saving, this will be parsed and set hourly_rate_cents (if hourly_rate_cents is null)

      • hourly_rate_cents

        Hourly rate in cents.

      • running

        Is true if the project is currently running. Will be null if there is no time limit. This value is ignored when creating or updating a project.

      • grand_total

        The number of seconds already punched in to this project by all users. If the project is punched in to, the grand_total will include time up until when the request is made

      • running_total

        The number of seconds already punched in to this project by just the authenticated user. If the project is punched in to, the running_total will include time up until when the request is made.

      • time_left

        Returns the number of seconds lefts before the project becomes overdue. This value is ignored when creating or updating a project

      • overdue

        Is true if the project is overdue. Will be null if there is no time limit. This value is ignored when creating or update a project

      • nearly_overdue

        Is true if the project is nearly overdue. Will be null if there is no time limit. This value is ignored when creating or update a project

      • started_at

        The start time of the currently running shift. Will be null if the project is not running. This value is ignored when creating or update a project. Formatted as the number of seconds since EPOCH (in seconds).

      • activities

        Array of activity objects

      • tag_list

        An comma separated list of tags associated with the company

      • invoice_amount

        invoice_amount