Projects

Projects represent hubs of work, tasks, logged hours, expenses, and invoices related to a Client.

Projects in Ronin have many sub-resources, but only the time-tracking component is currently available through the API.

Get All Projects

GET /projects
{
  "page_count": 4
  "page_size": 20
  "total_count": 61
  "projects": [
    {
        "number": "PROJ101"
        "name": "Project Name"
        "budget_type": 0
        "client": {
          "number": "101"
          "name": "ACME Corp"
          "city": "New York"
          "address": "123 Main St."
          "zip": "12345"
          "country": "US"
          "id": 2123
          "invoice_extra_fields": null
          "website": "http://www.example.com"
          "address_2": "Suite 101"
          "description": "A sample API Client"
          "state": "NY"
        }
        "project_type": 0
        "worked_hours": 87
        "rate": 125
        "unbilled_hours": 8.5
        "id": 24
        "cost": 11675
        "description": "Project description"
        "status": 1
        "end_date": "2011/04/06"
        "currency_code": "USD"
        "budget": 15000
    },
    ...
  ]
}

Project Status Values:
1: Active
2: Completed
4: Billable

By default, this end point will only return active and billable projects. To also retrieve closed projects, use the filter parameter with value all

GET /clients/:client_id/projects

You can also fetch projects under a specific client. Ronin will return 10 results by default, and you can use the page parameter to paginate.

Get A Project

GET /projects/:id
{
    "number": "PROJ101"
    "name": "Project Name"
    "budget_type": 0
    "client": {
      "number": "101"
      "name": "ACME Corp"
      "city": "New York"
      "address": "123 Main St."
      "zip": "12345"
      "country": "US"
      "id": 2123
      "invoice_extra_fields": null
      "website": "http://www.example.com"
      "address_2": "Suite 101"
      "description": "A sample API Client"
      "state": "NY"
    }
    "project_type": 0
    "worked_hours": 87
    "rate": 125
    "unbilled_hours": 8.5
    "id": 24
    "cost": 11675
    "description": "Project description"
    "status": 1
    "end_date": "2011/04/06"
    "currency_code": "USD"
    "budget": 15000
}

Create A New Project

POST /projects
{
  "project": {
    "name": "ACME Corp Project"
    "rate": 150
  }
}

budget_type can be 0 (total budgeted hours) or 1 (total budgeted amount).
project_type can be 0 (hourly rate project) or 2 (fixed amount project). Rate the total cost of the project in the latter case.

Required Fields: name, rate (HTTP 422 on failure)
Unique Fields: number (HTTP 422 on failure)

Update A Project

PUT /projects/:id

You may provide a partial list of fields to update

  {
    "project": {
      "name": "ACME Corp Project"
      "rate": 150
    }
  }

Unique Fields: number (HTTP 422 on failure)

Delete A Project

DELETE /projects/:id

Deleting a project will result in the deletion of all associated Tasks, logged Hours, Comments, and Notes. Deletions are permanent and not reversible.