Projects represent hubs of work, tasks, logged hours, expenses, and invoices related to a Client.
Projects in Clientary have many sub-resources, but only the time-tracking component is currently available through the API.
GET /api/v2/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 }, ... ] }
1
: Active2
: Completed4
: BillableBy default, this end point will only return active and billable projects. To also retrieve closed projects, use the filter
parameter with value all
GET /api/v2/clients/:client_id/projects
You can also fetch projects under a specific client. Clientary will return 10 results by default, and you can use the page
parameter to paginate.
GET /api/v2/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 }
POST /api/v2/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)
PUT /api/v2/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 /api/v2/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.