Integrate your application into Timely.
Timely API helps you integrate your application with Timely. Following are the list of API’s available. For any help or support email [email protected]
OAuth2 Authentication; http://tools.ietf.org/html/rfc6749
You can find the old api documentaion here
Base URL for all API's is https://api.timelyapp.com/1.1
GET /oauth/authorize
| Parameter Name | Parameter Value |
|---|---|
| response_type | code |
| redirect_uri | http://your-redirect-url/ |
| client_id | your_application_id |
This will respond with the code parameter, which you need to use to get the token.
Example Request
curl -XGET https://api.timelyapp.com/1.1/oauth/authorize?response_type=code
&redirect_uri=your_redirect_uri&client_id=your_client_id
POST /oauth/token
| Parameter Name | Parameter Value |
|---|---|
| redirect_uri | http://your-redirect-url/ |
| code | your_response_code |
| client_id | your_application_id |
| client_secret | your_application_secret |
| grant_type | authorization_code |
The response will be a token with a refresh token. Use the token to use the following API.
Example Request
curl -X POST --data "redirect_uri=https://your-redirect_url/&code=your_response_code
&client_id=application_id&client_secret=application_secret&grant_type=authorization_code"
https://api.timelyapp.com/1.1/oauth/token
Response
Success
200 Ok
{
"access_token":"1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a",
"token_type":"bearer",
"refresh_token":"9db4d1a5d87c707b8125d8f93ad08091fb3ff8b93be901dbeaba968cf532ed9b"
}
GET /accounts
Example Request
curl -v -X GET -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
https://api.timelyapp.com/1.1/accounts
Response
Success
200 Ok
[
{
"id":1,
"name":"Timely",
"from":"Web",
"max_users":45,
"max_projects":0, #Unlimited
"num_users":1,
"num_projects":2,
"plan_id":20,
"plan_name":"Premium",
"next_charge":"2015-05-20",
"currency":{
"id":"usd",
"iso_code":"USD",
"name":"United States Dollar",
"symbol":"$",
"symbol_first":true
},
trial: true,
start_of_week: 0,
"beta":true,
"created_at":1463060488,
"payment_mode":"web",
"paid":false,
"features":[
{"name":"control","days":-1},
{"name":"labels","days":-1},
{"name":"memories","days":-1},
{"name":"billing","days":-1}
]
}
]
GET /accounts/:id
| id | The numerical ID of the desired project.
Example Values: 123 |
Example Request
curl -v -X GET -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
https://api.timelyapp.com/1.1/accounts/1
Response
Success
200 Ok
{
"id":1,
"name":"Timely",
"from":"Web",
"max_users":45,
"max_projects":0, #Unlimited
"num_users":1,
"num_projects":2,
"plan_id":20,
"plan_name":"Premium",
"next_charge":"2015-05-20",
"currency":{
"id":"usd",
"iso_code":"USD",
"name":"United States Dollar",
"symbol":"$",
"symbol_first":true
},
trial: true,
start_of_week: 0,
"beta":true,
"created_at":1463060488,
"payment_mode":"web",
"paid":false,
"features":[
{"name":"control","days":-1},
{"name":"labels","days":-1},
{"name":"memories","days":-1},
{"name":"billing","days":-1}
]
}
GET /:account_id/projects
| Parameter Name | Parameter Value |
|---|---|
| limit | Specifies the number of records to retrieve. Must be less than or equal to 100.
Example: "limit=10" |
| offset | Specifies the starting record for results to return.
Example: specifying "offset=0" will start offset from 0 record, "offset=4" will start offset from 4th record, etc |
| order | Reverses the sorting order, when you include the parameter
Example: "order=desc" or "order=asc" |
Example Request
curl -v -X GET -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
https://api.timelyapp.com/1.1/1/projects
Response
Success
200 Ok
[
{
"id":331181,
"account_id":110941,
"active":true,
"budget":3000,
"budget_type":"M",
"client":{
"id":163951,
"name":"Development",
"active":false
},
"hour_rate":20.0,
"name":"New Website (California Brewing Co.)",
"billable":true,
"rate_type":"project",
"users":[
{"user_id":117861,"hour_rate":0.0,"hour_rate_in_cents":0.0},
{"user_id":175551,"hour_rate":0.0,"hour_rate_in_cents":0.0}
],
"updated_at":1408804137,
"color":"47b17c",
"cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"duration":{
"hours":95,
"minutes":26,
"seconds":0,
"formatted":"95:26",
"total_hours":95.4333333333333,
"total_seconds":343560,
"total_minutes":5726
},
"estimated_duration":{
"hours":24,
"minutes":0,
"seconds":0,
"formatted":"24:00",
"total_hours":24.0,
"total_seconds":86400,
"total_minutes":1440
},
"billed_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"billed_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"unbilled_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"unbilled_duration":{
"hours":95,
"minutes":26,
"seconds":0,
"formatted":"95:26",
"total_hours":95.4333333333333,
"total_seconds":343560,
"total_minutes":5726
}
},
{
"id":307611,
"account_id":110941,
"active":true,
"budget":null,
"budget_type":null,
"client":{
"id":163951,
"name":"Mobile",
"active":false
},
"hour_rate":20.0,
"name":"iOS App (Nelson Retail)",
"billable":true,
"rate_type":"project",
"users":[
{"user_id":117861,"hour_rate":0.0,"hour_rate_in_cents":0.0},
{"user_id":175551,"hour_rate":0.0,"hour_rate_in_cents":0.0},
{"user_id":183581,"hour_rate":0.0,"hour_rate_in_cents":0.0}
],
"updated_at":1402552390,
"color":"866b9c",
"cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"duration":{
"hours":95,
"minutes":26,
"seconds":0,
"formatted":"95:26",
"total_hours":95.4333333333333,
"total_seconds":343560,
"total_minutes":5726
},
"estimated_duration":{
"hours":24,
"minutes":0,
"seconds":0,
"formatted":"24:00",
"total_hours":24.0,
"total_seconds":86400,
"total_minutes":1440
},
"billed_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"billed_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"unbilled_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"unbilled_duration":{
"hours":95,
"minutes":26,
"seconds":0,
"formatted":"95:26",
"total_hours":95.4333333333333,
"total_seconds":343560,
"total_minutes":5726
}
}
]
Note: Normal user will get all the projects from account. Limited user will get only his projects.
Note: Project list will return recently updated 10 projects additionally you can add the “limit”, “offset” and “order” optional parameters to change the result.
GET /:account_id/projects/:id
| Parameter Name | Parameter Value |
|---|---|
| id | The numerical ID of the desired project.
Example Values: 123 |
Example Request
curl -v -X GET -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
https://api.timelyapp.com/1.1/1/projects/31
Response
Success
200 Ok
{
"id":31,
"account_id":110941,
"active":true,
"budget":30,
"budget_type":"H",
"client":{
"id":1,
"name":"Develoment",
"archived":false
},
"hour_rate":15.0,
"name":"New Website (California Brewing Co.)",
"billable":true,
"rate_type":"project",
"users":[
{"id":117861,"hour_rate":0.0},
{"id":175551,"hour_rate":0.0}
],
"updated_at":1402552184,
"color":"67a3bc",
"cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"duration":{
"hours":95,
"minutes":26,
"seconds":0,
"formatted":"95:26",
"total_hours":95.4333333333333,
"total_seconds":343560,
"total_minutes":5726
},
"estimated_duration":{
"hours":24,
"minutes":0,
"seconds":0,
"formatted":"24:00",
"total_hours":24.0,
"total_seconds":86400,
"total_minutes":1440
},
"billed_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"billed_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"unbilled_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"unbilled_duration":{
"hours":95,
"minutes":26,
"seconds":0,
"formatted":"95:26",
"total_hours":95.4333333333333,
"total_seconds":343560,
"total_minutes":5726
}
}
Unauthorized access of other projects of same account.
403 Forbidden
Unauthorized access of projects of other account.
404 Not Found
Access with wrong authentication token.
401 Unauthorized
POST /:account_id/projects
| Parameter Name | Parameter Value |
|---|---|
| name | Specifies the project name |
| color | Specifies the project color, should be one of 47b17c, 67a3bc, bd4c4f, d0915a, 866b9c, cdae4f, 5ab8b7, c697c0 |
| client_id | Specifies the numerical client id |
| users | Specifies the project users, should be array of users with numerical user id and hour_rate
Example: "users": [{ "user_id": 175551, "hour_rate": 25.0 },{ "user_id": 117861, "hour_rate": 27.0 }] |
| Parameter Name | Parameter Value |
|---|---|
| billable | Specifies the project is billable or not, should be true or false |
| budget | Specifies the budget for project, should be numeric value |
| hour_rate | Specifies the hour rate for project, should be numeric value |
| rate_type | Specifies the hour rate type for project, should be "user" or "project" |
Example Request
curl -v -X POST -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{ "project": { "name": "Clark-case", "color":"47b17c", "billable": true,
"budget": 1000, "hour_rate": 15.0, "client_id": 1, "rate_type" : "user",
"users": [{ "user_id": 2, "hour_rate": 20.0 },{ "user_id": 3, "hour_rate": 25.0 }] } }'
"http://api.timelyapp.com/1.1/1/projects"
Response
Success
201 Created
{
"id":10,
"account_id":1,
"active":true,
"budget":1000,
"budget_type":"H",
"client":{
"id":1,
"name":"Development",
"archived":false
},
"hour_rate":15.0,
"name":"Clark-case",
"billable":true,
"rate_type":"user",
"users":[
{"id":1,"hour_rate":20.0},
{"id":4,"hour_rate":25.0},
{"id":3,"hour_rate":27.0}
],
"updated_at":1409336297,
"color":"47b17c",
"cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"duration":{
"hours":95,
"minutes":26,
"seconds":0,
"formatted":"95:26",
"total_hours":95.4333333333333,
"total_seconds":343560,
"total_minutes":5726
},
"estimated_duration":{
"hours":24,
"minutes":0,
"seconds":0,
"formatted":"24:00",
"total_hours":24.0,
"total_seconds":86400,
"total_minutes":1440
},
"billed_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"billed_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"unbilled_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"unbilled_duration":{
"hours":95,
"minutes":26,
"seconds":0,
"formatted":"95:26",
"total_hours":95.4333333333333,
"total_seconds":343560,
"total_minutes":5726
}
}
Failure
422 Unprocessable Entity
{
"errors":{
"name":[
"can't be blank"
],
"project_users":[
]
}
}
Creating project for different account
403 Forbidden
{
"data":{
"reference":"a833626d3b763fbf738267ef792fba4d"
}
}
PUT /:account_id/projects/:id
| Parameter Name | Parameter Value |
|---|---|
| id | The numerical ID of the desired project.
Example Values: 123 |
Note: All other parameters are as mention in create project
Example Request
curl -v -X PUT -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{ "project": { "name": "Clark-case Updated", "color":"47b17c", "billable": true,
"budget": 1000, "hour_rate": 20.0, "client_id": 5, "rate_type" : "user",
"users": [{ "user_id": 3, "hour_rate": 20.0 },{ "user_id": 4, "hour_rate": 25.0 }] } }'
"https://api.timelyapp.com/1.1/1/projects/31"
Response
Success
200 OK
{
"id":482331,
"account_id":110941,
"active":true,
"budget":1000,
"budget_type":"H",
"client":{
"id":163951,
"name":"marketing",
"archived":false
},
"hour_rate":20.0,
"name":"Clark-case Update",
"billable":true,
"rate_type":"user",
"users":[
{"id":3,"hour_rate":20.0},
{"id":4,"hour_rate":25.0}
],
"updated_at":1409338512,
"color":"47b17c",
"cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"duration":{
"hours":95,
"minutes":26,
"seconds":0,
"formatted":"95:26",
"total_hours":95.4333333333333,
"total_seconds":343560,
"total_minutes":5726
},
"estimated_duration":{
"hours":24,
"minutes":0,
"seconds":0,
"formatted":"24:00",
"total_hours":24.0,
"total_seconds":86400,
"total_minutes":1440
},
"billed_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"billed_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"unbilled_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"unbilled_duration":{
"hours":95,
"minutes":26,
"seconds":0,
"formatted":"95:26",
"total_hours":95.4333333333333,
"total_seconds":343560,
"total_minutes":5726
}
}
Failure
422 Unprocessable Entity
{
"errors":{
"name":[
"can't be blank"
],
"project_users":[
]
}
}
DELETE /:account_id/projects/:id
| Parameter Name | Parameter Value |
|---|---|
| id | The numerical ID of the desired project.
Example Values: 123 |
Example Request
curl -v -X DELETE -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
"https://api.timelyapp.com/1.1/1/projects/31"
Response
Success
200 OK
Deleting project of other client
404 Not Found
Deleting other project of same client
403 Forbidden
Deleting project by Limited user
403 Forbidden
GET /:account_id/clients
| Parameter Name | Parameter Value |
|---|---|
| limit | Specifies the number of records to retrieve. Must be less than or equal to 100.
Example: "limit=10" |
| offset | Specifies the starting record for results to return.
Example: specifying "offset=0" will start offset from 0 record, "offset=4" will start offset from 4th record, etc |
| order | Reverses the sorting order, when you include the parameter
Example: "order=desc" or "order=asc" |
Example Request
curl -v -X GET -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
"https://api.timelyapp.com/1.1/1/clients"
Response
Success
200 OK
[
{
"id":1,
"name":"Marketing",
"active":true
},
{
"id":2,
"name":"Business",
"active":true
},
{
"id":3,
"name":"Development",
"active":true
}
]
NOTE : Client list will return recently updated 10 clients additionally you can add the “limit”, “offset” and “order” optional parameters to change the result
GET /:account_id/clients/:id
| Parameter Name | Parameter Value |
|---|---|
| id | The numerical ID of the desired client.
Example Values: 123 |
Example Request
curl -v -X GET -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
"https://api.timelyapp.com/1.1/1/clients/1"
Response
Success
200 Ok
{
"id":1,
"name":"Marketing",
"active":false
}
Accessing client of different account
404 Not Found
{
"data":{
"reference":"dca8215e324a30c08f61bdd5d348af9c"
}
}
POST /:account_id/clients
| Parameter Name | Parameter Value |
|---|---|
| name | Specifies the client name |
| Parameter Name | Parameter Value |
|---|---|
| color | Specifies the client color |
| archived | Change the client state to archived if set to true
Example values: true or false |
Example Request
curl -v -X POST -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{"client": { "name": "Development", "color":"c697c0" }}'
"https://api.timelyapp.com/1.1/1/clients"
Response
Success
201 Created
{
"id":6,
"name":Development",
"active":true
}
PUT /:account_id/clients/:id
| Parameter Name | Parameter Value |
|---|---|
| id | The numerical ID of the desired event.
Example Values: 123 |
Note: All other parameters are as mention in create client
Example Request
curl -v -X PUT -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{"client": { "name": "Marketing Update" }}'
"https://api.timelyapp.com/1.1/1/clients/1"
Response
Success
201 Created
{
"id":1,
"name":Marketing Update",
"active":true
}
Updating client of a different account
404 Not Found
GET /:account_id/users
| Parameter Name | Parameter Value |
|---|---|
| limit | Specifies the number of records to retrieve. Must be less than or equal to 100.
Example: "limit=10" |
| offset | Specifies the starting record for results to return.
Example: specifying "offset=0" will start offset from 0 record, "offset=4" will start offset from 4th record, etc |
| order | Reverses the sorting order, when you include the parameter
Example: "order=desc" or "order=asc" |
Example Request
curl -v -X GET -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
"https://api.timelyapp.com/1.1/1/users"
Response
Success
200 OK
[
{
"id": 1,
"email":"[email protected]",
"name":"Mathias Mikkelsen",
"user_level":"admin",
"time_zone":"Paris",
"account_id":110941,
"updated_at":1495792797,
"created_at":1407659056,
"active":true,
"deleted":false,
"hide_hourly_rate":false,
"day_view_onboarded":true,
"memory_onboarded":true,
"avatar":{
"large_retina":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/large_retina/retro_apple.jpg?1408906953",
"large":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/large/retro_apple.jpg?1408906953",
"medium_retina":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/medium_retina/retro_apple.jpg?1408906953",
"medium":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/medium/retro_apple.jpg?1408906953",
"timeline":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/timeline/retro_apple.jpg?1408906953"
}
},
{
"id":2,
"email":"[email protected]",
"name":"Martin",
"user_level":"normal",
"time_zone":"Paris",
"account_id":110941,
"updated_at":1408887156,
"active":true,
"deleted":false,
"hide_hourly_rate":false,
"day_view_onboarded":true,
"memory_onboarded":true,
"avatar":{
"large_retina":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/large_retina/retro_apple.jpg?1408906953",
"large":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/large/retro_apple.jpg?1408906953",
"medium_retina":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/medium_retina/retro_apple.jpg?1408906953",
"medium":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/medium/retro_apple.jpg?1408906953",
"timeline":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/timeline/retro_apple.jpg?1408906953"
}
},
{
"id":3,
"email":"[email protected]",
"name":"Linus Evertssen",
"user_level":"limited",
"time_zone":"Oslo",
"account_id":110941,
"updated_at":1408885367,
"active":true,
"deleted":false,
"hide_hourly_rate":false,
"day_view_onboarded":true,
"memory_onboarded":true,
"avatar":{
"large_retina":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/large_retina/retro_apple.jpg?1408906953",
"large":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/large/retro_apple.jpg?1408906953",
"medium_retina":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/medium_retina/retro_apple.jpg?1408906953",
"medium":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/medium/retro_apple.jpg?1408906953",
"timeline":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/timeline/retro_apple.jpg?1408906953"
}
}
]
Note: user list will return recently updated 10 users additionally you can add the “limit”, “offset” and “order” optional parameters to change the result.
GET /:account_id/users/:id
| Parameter Name | Parameter Value |
|---|---|
| id | The numerical ID of the desired event.
Example Values: 123 |
Example Request
curl -v -X GET -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
"https://api.timelyapp.com/1.1/1/users/1"
Response
Success
200 Ok
{
"id":1,
"email":"[email protected]",
"name":"Mathias Mikkelsen",
"user_level":"admin",
"time_zone":"Paris",
"account_id":110941,
"updated_at":1408906955,
"active":true,
"deleted":false,
"hide_hourly_rate":false,
"day_view_onboarded":true,
"memory_onboarded":true,
"avatar":{
"large_retina":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/large_retina/retro_apple.jpg?1408906953",
"large":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/large/retro_apple.jpg?1408906953",
"medium_retina":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/medium_retina/retro_apple.jpg?1408906953",
"medium":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/medium/retro_apple.jpg?1408906953",
"timeline":"https://timelytimetracking.s3.amazonaws.com/users/avatars/000/117/861/timeline/retro_apple.jpg?1408906953"
}
}
POST /:account_id/users
| Parameter Name | Parameter Value |
|---|---|
| name | Specifies the user name |
| Specifies the user email | |
| projects | Specifies the projects that user will be part of
Example"projects": [ {"id": 11 , "hour_rate": 10 }, {"id": 12 , "hour_rate": 20 }] |
| Parameter Name | Parameter Value |
|---|---|
| user_level | Specifies the user level, should be normal/limited, default will be "normal"
Example: "user_level": "normal" |
| admin | Specifies the user is admin, in this case user_level should be normal
Example: "admin": "true" |
Example Request
curl -v -X POST -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{"user": { "name": "Mathias M", "email":"[email protected]", "user_level": "normal",
"projects": [ {"id": 11 , "hour_rate": 10 }, {"id": 12 , "hour_rate": 20 }] } }'
"https://api.timelyapp.com/1.1/1/users"
Response
Success
200 OK
{
"id":5,
"email":"[email protected]",
"name":"Mathias M",
"user_level":"normal",
"time_zone":"Europe/Paris",
"account_id":110941,
"updated_at":1409346273,
"active":false,
"deleted":false,
"hide_hourly_rate":false,
"avatar":{
"large_retina":"https://www.gravatar.com/avatar/4fa2aa57001cb62fc6b796596362f951?d=https%3A%2F%2Fapp.timelyapp.com%2Fassets%2Fthumbs%2Fuser_large_retina.jpg&s=200",
"large":"https://www.gravatar.com/avatar/4fa2aa57001cb62fc6b796596362f951?d=https%3A%2F%2Fapp.timelyapp.com%2Fassets%2Fthumbs%2Fuser_large_retina.jpg&s=200",
"medium_retina":"https://www.gravatar.com/avatar/4fa2aa57001cb62fc6b796596362f951?d=https%3A%2F%2Fapp.timelyapp.com%2Fassets%2Fthumbs%2Fuser_medium_retina.jpg&s=50",
"medium":"https://www.gravatar.com/avatar/4fa2aa57001cb62fc6b796596362f951?d=https%3A%2F%2Fapp.timelyapp.com%2Fassets%2Fthumbs%2Fuser_medium_retina.jpg&s=50",
"small_retina":"https://www.gravatar.com/avatar/4fa2aa57001cb62fc6b796596362f951?d=https%3A%2F%2Fapp.timelyapp.com%2Fassets%2Fthumbs%2Fuser_small_retina.jpg&s=25",
"small":"https://www.gravatar.com/avatar/4fa2aa57001cb62fc6b796596362f951?d=https%3A%2F%2Fapp.timelyapp.com%2Fassets%2Fthumbs%2Fuser_small_retina.jpg&s=25"
}
}
User account creation by non admin user
401 Unauthorized
Note:
“user_level” can have values admin/normal/limited
“hide_hourly_rate” can be true or false(Default false) if set to “limited” the option to “hide_hourly_rate” can be set to “true” which means this limited user can not see his amount calculation anywhere on the site
PUT /:account_id/users/:id
| Parameter Name | Parameter Value |
|---|---|
| id | The numerical ID of the desired user.
Example Values: 123 |
Example Request
curl -v -X PUT -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{"user": { "name": "Mathias Mikkelsen", "email":"[email protected]", "time_zone": "Paris" ,
"user_level": "normal", "projects": [ {"id": 11 , "hour_rate": 10 }, {"id": 12 , "hour_rate": 20 }] }}'
"https://api.timelyapp.com/1.1/1/users/5"
Note:
All other parameters are as mention in create user
Should not update “user_level”, “projects” and “hide_hourly_rate” as these fields are only editable by admin for other users.
Only admin user can update other users profile, limited user will only update self profile
Response
Success
200 Ok
{
"id":5,
"email":"[email protected]",
"name":"Mathias Mikkelsen",
"user_level":"normal",
"time_zone":"Paris",
"account_id":110941,
"updated_at":1409346273,
"active":false,
"deleted":false,
"hide_hourly_rate":false,
"avatar":{
"large_retina":"https://www.gravatar.com/avatar/4fa2aa57001cb62fc6b796596362f951?d=https%3A%2F%2Fapp.timelyapp.com%2Fassets%2Fthumbs%2Fuser_large_retina.jpg&s=200",
"large":"https://www.gravatar.com/avatar/4fa2aa57001cb62fc6b796596362f951?d=https%3A%2F%2Fapp.timelyapp.com%2Fassets%2Fthumbs%2Fuser_large_retina.jpg&s=200",
"medium_retina":"https://www.gravatar.com/avatar/4fa2aa57001cb62fc6b796596362f951?d=https%3A%2F%2Fapp.timelyapp.com%2Fassets%2Fthumbs%2Fuser_medium_retina.jpg&s=50",
"medium":"https://www.gravatar.com/avatar/4fa2aa57001cb62fc6b796596362f951?d=https%3A%2F%2Fapp.timelyapp.com%2Fassets%2Fthumbs%2Fuser_medium_retina.jpg&s=50",
"small_retina":"https://www.gravatar.com/avatar/4fa2aa57001cb62fc6b796596362f951?d=https%3A%2F%2Fapp.timelyapp.com%2Fassets%2Fthumbs%2Fuser_small_retina.jpg&s=25",
"small":"https://www.gravatar.com/avatar/4fa2aa57001cb62fc6b796596362f951?d=https%3A%2F%2Fapp.timelyapp.com%2Fassets%2Fthumbs%2Fuser_small_retina.jpg&s=25"
}
}
Limited user updating others profile
401 Unauthorized
DELETE /:account_id/users/:id
| Parameter Name | Parameter Value |
|---|---|
| id | The numerical ID of the desired user.
Example Values: 123 |
Example Request
curl -v -X DELETE -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
"https://api.timelyapp.com/1.1/1/users/4"
Response
Success
200 OK
If deleting an admin
403 Forbidden
Get all the events of active projects present in user’s account
GET /:account_id/events
| Parameter Name | Parameter Value | |
|---|---|---|
| since | Specifies the start date for results to return.
Example: since=2014-08-18 |
|
| upto | Specifies the end date for results to return.
Example: upto=2014-08-24 |
|
| OR | ||
| day | Specifies the day date for results to return.
Example: day=2014-08-24 |
Note: If “since” and “upto” parameters are not passed, default period is current day.
Example Request
curl -v -X GET -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
"https://api.timelyapp.com/1.1/1/events?since=2014-08-18&until=2014-08-24"
Response
Success
200 Ok
[
{
"id":91635811,
"user":{
"id":4,
"email":"[email protected]",
"name":"Linus Evertssen",
"user_level":"limited",
"active":true,
"day_view_onboarded":true,
"memory_onboarded":true,
"created_at":1407659056,
"updated_at":1495796021
},
"project":{
"id":207,
"active":true,
"account_id":5,
"name":"New Website (California Brewing Co.)",
"color":"47b17c",
"rate_type":"user",
"client":{"id":106,"name":"Development","active":true},
"billable":true,
"updated_at":1494518744,
"budget":0,
"budget_type":"",
"hour_rate":0.0,
"hour_rate_in_cents":0.0,
"users":[{"user_id":1,"hour_rate":20.0,"hour_rate_in_cents":2000.0}]
},
"duration":{
"hours":2,
"minutes":0,
"seconds":0,
"formatted":"02:00",
"total_hours":2.0,
"total_seconds":7200,
"total_minutes":120
},
"estimated_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"cost":{
"fractional":4000,
"formatted":"£40.00",
"amount":40.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"day":"2017-05-26",
"note":"Mac app design",
"sequence":1,
"estimated":false,
"timer_state":"default",
"timer_started_on":0,
"timer_stopped_on":0,
"label_ids":[136,125,156],
"updated_at":1495796326,
"created_from":"Web",
"updated_from":"Web",
"billed":false,
"to":null,
"from":null,
"deleted":false,
"hour_rate":20.0,
"hour_rate_in_cents":2000.0,
"creator_id":1,
"updater_id":1
},
{
"id":91635811,
"user":{
"id":4,
"email":"[email protected]",
"name":"Linus Evertssen",
"user_level":"limited",
"active":true,
"day_view_onboarded":true,
"memory_onboarded":true,
"created_at":1407659056,
"updated_at":1495796021
},
"project":{
"id":207,
"active":true,
"account_id":5,
"name":"New Website (California Brewing Co.)",
"color":"47b17c",
"rate_type":"user",
"client":{"id":106,"name":"Development","active":true},
"billable":true,
"updated_at":1494518744,
"budget":0,
"budget_type":"",
"hour_rate":0.0,
"hour_rate_in_cents":0.0,
"users":[{"user_id":1,"hour_rate":20.0,"hour_rate_in_cents":2000.0}]
},
"duration":{
"hours":2,
"minutes":0,
"seconds":0,
"formatted":"02:00",
"total_hours":2.0,
"total_seconds":7200,
"total_minutes":120
},
"estimated_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"cost":{
"fractional":4000,
"formatted":"£40.00",
"amount":40.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"day":"2017-05-26",
"note":"Web app design",
"sequence":1,
"estimated":false,
"timer_state":"default",
"timer_started_on":0,
"timer_stopped_on":0,
"label_ids":[136,125,156],
"updated_at":1495796326,
"created_from":"Web",
"updated_from":"Web",
"billed":false,
"to":null,
"from":null,
"deleted":false,
"hour_rate":20.0,
"hour_rate_in_cents":2000.0,
"creator_id":1,
"updater_id":1
}
]
Get all events of user
GET /:account_id/users/:user_id/events
| Parameter Name | Parameter Value |
|---|---|
| user_id | The numerical ID of the desired user.
Example Values: 123 |
| As mention in all events api's |
Note: Only normal user can get events of other users of same account. Limited user will always get his one events.
Example Request
curl -v -X GET -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
"https://api.timelyapp.com/1.1/1/users/1/events?since=2014-08-18&until=2014-08-24"
Response
Success
200 Ok
[
{
"id":91635811,
"user":{
"id":1,
"email":"[email protected]",
"name":"Linus Evertssen",
"user_level":"limited",
"active":true,
"day_view_onboarded":true,
"memory_onboarded":true,
"created_at":1407659056,
"updated_at":1495796021
},
"project":{
"id":207,
"active":true,
"account_id":5,
"name":"New Website (California Brewing Co.)",
"color":"47b17c",
"rate_type":"user",
"client":{"id":106,"name":"Development","active":true},
"billable":true,
"updated_at":1494518744,
"budget":0,
"budget_type":"",
"hour_rate":0.0,
"hour_rate_in_cents":0.0,
"users":[{"user_id":1,"hour_rate":20.0,"hour_rate_in_cents":2000.0}]
},
"duration":{
"hours":2,
"minutes":0,
"seconds":0,
"formatted":"02:00",
"total_hours":2.0,
"total_seconds":7200,
"total_minutes":120
},
"estimated_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"cost":{
"fractional":4000,
"formatted":"£40.00",
"amount":40.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"day":"2017-05-26",
"note":"Mac app design",
"sequence":1,
"estimated":false,
"timer_state":"default",
"timer_started_on":0,
"timer_stopped_on":0,
"label_ids":[136,125,156],
"updated_at":1495796326,
"created_from":"Web",
"updated_from":"Web",
"billed":false,
"to":null,
"from":null,
"deleted":false,
"hour_rate":20.0,
"hour_rate_in_cents":2000.0,
"creator_id":1,
"updater_id":1
}
]
User accessing events of different account’s user
404 Not Found
Get all events of project
GET /:account_id/projects/:project_id/events
| Parameter Name | Parameter Value |
|---|---|
| project_id | The numerical ID of the desired project.
Example Values: 123 |
| As mention in all events api's |
Note: Only normal user can get events of other projects of same account. Limited user can only get events of his own project.
Example Request
curl -v -X GET -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
"https://api.timelyapp.com/1.1/1/projects/4/events?2014-08-18&until=2014-08-24"
Response
Success
200 Ok
[
{
"id":91635811,
"user":{
"id":4,
"email":"[email protected]",
"name":"Linus Evertssen",
"user_level":"limited",
"active":true,
"day_view_onboarded":true,
"memory_onboarded":true,
"created_at":1407659056,
"updated_at":1495796021
},
"project":{
"id":4,
"active":true,
"account_id":5,
"name":"New Website (California Brewing Co.)",
"color":"47b17c",
"rate_type":"user",
"client":{"id":106,"name":"Development","active":true},
"billable":true,
"updated_at":1494518744,
"budget":0,
"budget_type":"",
"hour_rate":0.0,
"hour_rate_in_cents":0.0,
"users":[{"user_id":1,"hour_rate":20.0,"hour_rate_in_cents":2000.0}]
},
"duration":{
"hours":2,
"minutes":0,
"seconds":0,
"formatted":"02:00",
"total_hours":2.0,
"total_seconds":7200,
"total_minutes":120
},
"estimated_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"cost":{
"fractional":4000,
"formatted":"£40.00",
"amount":40.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"day":"2017-05-26",
"note":"Mac app design",
"sequence":1,
"estimated":false,
"timer_state":"default",
"timer_started_on":0,
"timer_stopped_on":0,
"label_ids":[136,125,156],
"updated_at":1495796326,
"created_from":"Web",
"updated_from":"Web",
"billed":false,
"to":null,
"from":null,
"deleted":false,
"hour_rate":20.0,
"hour_rate_in_cents":2000.0,
"creator_id":1,
"updater_id":1
}
]
Normal user accessing project of different account
404 Not Found
Limited user accessing other than his own project
404 Not Found
Loggedin user creating an event for self
POST /:account_id/events
| Parameter Name | Parameter Value |
|---|---|
| day | Specifies the event day.
Example Values: "day":"2014-08-30" |
| minutes | Specifies the event minutes.
Example Values: 0-60 |
| hours | Specifies the event hours.
Example Values: 0-12 |
| Parameter Name | Parameter Value |
|---|---|
| estimated_minutes | Specifies the event estimated minutes.
Example Values: 0-60 |
| estimated_hours | Specifies the event estimated hours.
Example Values: 0-12 |
| note | Specifies the event notes. |
| from | Specifies the from time.
Example Values: from: "2017-05-26T10:00:00+05:30" |
| to | Specifies the to time.
Example Values: to: "2017-05-26T12:00:00+05:30" |
| label_ids | Specifies the label ids.
Example Values: label_ids:[2,3,4] |
| project_id | Specifies the project id.
Example Values: project_id:113 |
Note: By default the event is created for user’s last hour project or the first active project
Example Request
curl -v -X POST -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{"event": {"day":"2014-08-30", "minutes":0, "hours":4, "label_ids":[2,3,4], "estimated_minutes":0,
"estimated_hours":0, "note" : "Created a web mockup"}}'
"https://api.timelyapp.com/1.1/1/events"
Response
Success
201 Created
{
"id":12141,
"uid":"",
"user":{
"id":1,
"email":"[email protected]",
"name":"Linus Evertssen",
"active":true,
"day_view_onboarded":true,
"memory_onboarded":true
},
"project":{
"id":113,
"active":true,
"account_id":5,
"name":"New Website (California Brewing Co.)",
"color":"47b17c",
"rate_type":"project",
"client":{
"id":9,
"name":"Developoment",
"active":true
},
"billable":true,
"updated_at":1491564445,
"budget":0,
"budget_type":"",
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"users":[
{"user_id":1,"hour_rate":0.0,"hour_rate_in_cents":0.0},
{"user_id":20,"hour_rate":0.0,"hour_rate_in_cents":0.0}
]
},
"duration":{
"hours":3,
"minutes":45,
"seconds":0,
"formatted":"03:45",
"total_hours":3.75,
"total_seconds":13500,
"total_minutes":225
},
"estimated_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"cost":{
"fractional":75000,
"formatted":"£750.00",
"amount":750.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"day":"2017-04-21",
"note":"Created a web mockup",
"sequence":1,
"estimated":false,
"timer_state":"default",
"timer_started_on":0,
"timer_stopped_on":0,
"label_ids":[2,3,4],
"updated_at":1492779312,
"created_from":"Web",
"updated_from":"Web",
"billed":false,
"to":null,
"from":null,
"deleted":false,
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"creator_id":1,
"updater_id":1
}
Loggedin user creating event for a project
POST /:account_id/projects/:project_id/events
| Parameter Name | Parameter Value |
|---|---|
| project_id | The numerical ID of the desired project.
Example Values: 123 |
All other parameter as mention in self event create.
Note: Normal user can add hours to existing projects from account.
Limited user can add hours to only his projects
Example Request
curl -v -X POST -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{"event": {"day":"2014-04-17", "minutes":0, "hours":4, "note" : "Created a web mockup"}}'
"https://api.timelyapp.com/1.1/1/projects/5/events"
Response
Success
200 OK
{
"id":12141,
"uid":"",
"user":{
"id":1,
"email":"[email protected]",
"name":"Linus Evertssen",
"active":true,
"day_view_onboarded":true,
"memory_onboarded":true
},
"project":{
"id":113,
"active":true,
"account_id":5,
"name":"non billable",
"color":"47b17c",
"rate_type":"project",
"client":{
"id":9,
"name":"Report Client 1",
"active":true
},
"billable":true,
"updated_at":1491564445,
"budget":0,
"budget_type":"",
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"users":[
{"user_id":1,"hour_rate":0.0,"hour_rate_in_cents":0.0},
{"user_id":20,"hour_rate":0.0,"hour_rate_in_cents":0.0}
]
},
"duration":{
"hours":3,
"minutes":45,
"seconds":0,
"formatted":"03:45",
"total_hours":3.75,
"total_seconds":13500,
"total_minutes":225
},
"estimated_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"cost":{
"fractional":75000,
"formatted":"£750.00",
"amount":750.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"day":"2017-04-21",
"note":"test",
"sequence":1,
"estimated":false,
"timer_state":"default",
"timer_started_on":0,
"timer_stopped_on":0,
"label_ids":[],
"updated_at":1492779312,
"created_from":"Web",
"updated_from":"Web",
"billed":false,
"to":null,
"from":null,
"deleted":false,
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"creator_id":1,
"updater_id":1
}
Loggedin user creating event for another user
POST /:account_id/users/:user_id/events
| Parameter Name | Parameter Value |
|---|---|
| user_id | The numerical ID of the desired user.
Example Values: 123 |
All other parameter as mention in self event create.
Note: Normal user can add hours for any user. If project_id is not provided, the event is created for user’s last hour project or the first active project.
Example Request
curl -v -X POST -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{"event": {"day":"2017-04-21", "minutes":0, "hours":4, "note" : "Created a web mockup"}}'
"https://api.timelyapp.com/1.1/1/users/5/events"
Response
Success
200 OK
{
"id":12141,
"uid":"",
"user":{
"id":1,
"email":"[email protected]",
"name":"Linus Evertssen",
"active":true,
"day_view_onboarded":true,
"memory_onboarded":true
},
"project":{
"id":113,
"active":true,
"account_id":5,
"name":"non billable",
"color":"47b17c",
"rate_type":"project",
"client":{
"id":9,
"name":"Report Client 1",
"active":true
},
"billable":true,
"updated_at":1491564445,
"budget":0,
"budget_type":"",
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"users":[
{"user_id":1,"hour_rate":0.0,"hour_rate_in_cents":0.0},
{"user_id":20,"hour_rate":0.0,"hour_rate_in_cents":0.0}
]
},
"duration":{
"hours":3,
"minutes":45,
"seconds":0,
"formatted":"03:45",
"total_hours":3.75,
"total_seconds":13500,
"total_minutes":225
},
"estimated_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"cost":{
"fractional":75000,
"formatted":"£750.00",
"amount":750.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"day":"2017-04-21",
"note":"test",
"sequence":1,
"estimated":false,
"timer_state":"default",
"timer_started_on":0,
"timer_stopped_on":0,
"label_ids":[],
"updated_at":1492779312,
"created_from":"Web",
"updated_from":"Web",
"billed":false,
"to":null,
"from":null,
"deleted":false,
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"creator_id":1,
"updater_id":1
}
Loggedin user updating self event
PUT /:account_id/events/:id
| Parameter Name | Parameter Value |
|---|---|
| id | The numerical ID of the desired event.
Example Values: 123 |
All other parameters as mention in event create
Note: If its a normal user then he can edit events of other users of his account. Also the project_id can be edited to one from his account. If limited user, then he can edit only his events.
Example Request
curl -v -X PUT -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{"event" : {"minutes" : 0, "hours" : 0, "estimated" : true,
"estimated_minutes" : 0, "estimated_hours" : 2, "note" : "Updating testing"}}'
"https://api.timelyapp.com/1.1/1/events/91815811"
Response
Success
200 OK
{
"id":12141,
"uid":"",
"user":{
"id":1,
"email":"[email protected]",
"name":"Linus Evertssen",
"active":true,
"day_view_onboarded":true,
"memory_onboarded":true
},
"project":{
"id":113,
"active":true,
"account_id":5,
"name":"non billable",
"color":"47b17c",
"rate_type":"project",
"client":{
"id":9,
"name":"Report Client 1",
"active":true
},
"billable":true,
"updated_at":1491564445,
"budget":0,
"budget_type":"",
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"users":[
{"user_id":1,"hour_rate":0.0,"hour_rate_in_cents":0.0},
{"user_id":20,"hour_rate":0.0,"hour_rate_in_cents":0.0}
]
},
"duration":{
"hours":3,
"minutes":45,
"seconds":0,
"formatted":"03:45",
"total_hours":3.75,
"total_seconds":13500,
"total_minutes":225
},
"estimated_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"cost":{
"fractional":75000,
"formatted":"£750.00",
"amount":750.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"day":"2017-04-21",
"note":"test",
"sequence":1,
"estimated":false,
"timer_state":"default",
"timer_started_on":0,
"timer_stopped_on":0,
"label_ids":[],
"updated_at":1492779312,
"created_from":"Web",
"updated_from":"Web",
"billed":false,
"to":null,
"from":null,
"deleted":false,
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"creator_id":1,
"updater_id":1
}
Unauthorized access to update event
404 Not Found/403 forbidden
Loggedin user updating details and project of his event
PUT /:account_id/projects/:project_id/events/:id
| Parameter Name | Parameter Value |
|---|---|
| id | The numerical ID of the desired event.
Example Values: 123 |
| project_id | The numerical ID of the desired project.
Example Values: 123 |
All other parameters as mention in event create
Example Request
curl -v -X PUT -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{"event" : {"minutes" : 0, "hours" : 0, "estimated" : true,
"estimated_minutes" : 0, "estimated_hours" : 2, "note" : "Updating testing"}}'
"https://api.timelyapp.com/1.1/1/projects/11/events/31"
Response
Success
200 OK
{
"id":12141,
"uid":"",
"user":{
"id":1,
"email":"[email protected]",
"name":"Linus Evertssen",
"active":true,
"day_view_onboarded":true,
"memory_onboarded":true
},
"project":{
"id":113,
"active":true,
"account_id":5,
"name":"non billable",
"color":"47b17c",
"rate_type":"project",
"client":{
"id":9,
"name":"Report Client 1",
"active":true
},
"billable":true,
"updated_at":1491564445,
"budget":0,
"budget_type":"",
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"users":[
{"user_id":1,"hour_rate":0.0,"hour_rate_in_cents":0.0},
{"user_id":20,"hour_rate":0.0,"hour_rate_in_cents":0.0}
]
},
"duration":{
"hours":3,
"minutes":45,
"seconds":0,
"formatted":"03:45",
"total_hours":3.75,
"total_seconds":13500,
"total_minutes":225
},
"estimated_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"cost":{
"fractional":75000,
"formatted":"£750.00",
"amount":750.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"day":"2017-04-21",
"note":"test",
"sequence":1,
"estimated":false,
"timer_state":"default",
"timer_started_on":0,
"timer_stopped_on":0,
"label_ids":[],
"updated_at":1492779312,
"created_from":"Web",
"updated_from":"Web",
"billed":false,
"to":null,
"from":null,
"deleted":false,
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"creator_id":1,
"updater_id":1
}
Loggedin user updating details and user of an event
PUT /:account_id/users/:user_id/events/:id
| Parameter Name | Parameter Value |
|---|---|
| id | The numerical ID of the desired event.
Example Values: 123 |
| user_id | The numerical ID of the desired user.
Example Values: 123 |
All other parameters as mention in event create
Note: Normal user can edit event’s user to one of his account’s user. Limited user can not edit user.
Example Request
curl -v -X PUT -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{"event" : {"minutes" : 0, "hours" : 0, "estimated" : true,
"estimated_minutes" : 0, "estimated_hours" : 2, "note" : "Updating testing"}}'
"https://api.timelyapp.com/1.1/1/users/11/events/3155"
Response
Success
200 OK
{
"id":12141,
"uid":"",
"user":{
"id":1,
"email":"[email protected]",
"name":"Linus Evertssen",
"active":true,
"day_view_onboarded":true,
"memory_onboarded":true
},
"project":{
"id":113,
"active":true,
"account_id":5,
"name":"non billable",
"color":"47b17c",
"rate_type":"project",
"client":{
"id":9,
"name":"Report Client 1",
"active":true
},
"billable":true,
"updated_at":1491564445,
"budget":0,
"budget_type":"",
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"users":[
{"user_id":1,"hour_rate":0.0,"hour_rate_in_cents":0.0},
{"user_id":20,"hour_rate":0.0,"hour_rate_in_cents":0.0}
]
},
"duration":{
"hours":3,
"minutes":45,
"seconds":0,
"formatted":"03:45",
"total_hours":3.75,
"total_seconds":13500,
"total_minutes":225
},
"estimated_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"cost":{
"fractional":75000,
"formatted":"£750.00",
"amount":750.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"day":"2017-04-21",
"note":"test",
"sequence":1,
"estimated":false,
"timer_state":"default",
"timer_started_on":0,
"timer_stopped_on":0,
"label_ids":[],
"updated_at":1492779312,
"created_from":"Web",
"updated_from":"Web",
"billed":false,
"to":null,
"from":null,
"deleted":false,
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"creator_id":1,
"updater_id":1
}
DELETE /:account_id/events/:id
| Parameter Name | Parameter Value |
|---|---|
| id | The numerical ID of the desired event.
Example Values: 123 |
Note: Normal user can delete events of other projects of same account.
Limited user can delete only his events.
Example Request
curl -v -X DELETE -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
"https://api.timelyapp.dev/1.1/1/events/3155"
Response
Success
200 Ok
Unauthorized access
404 Not Found
PUT /:account_id/events/:id/start
| Parameter Name | Parameter Value |
|---|---|
| id | The numerical ID of the desired event.
Example Values: 123 |
Example Request
curl -v -X PUT -H "Content-Type: application/json"
-H "Authorization: Bearer feb5965e6b89fdd5ab8819bce1bc56ca697867d58b7a4dcd4ac4fa7fbb1e3510"
"https://api.timelyapp.com/1.1/5/events/12141/start"
Response
Success
200 OK
{
"id":12141,
"uid":"",
"user":{
"id":1,
"email":"[email protected]",
"name":"Linus Evertssen",
"active":true,
"day_view_onboarded":true,
"memory_onboarded":true
},
"project":{
"id":113,
"active":true,
"account_id":5,
"name":"non billable",
"color":"47b17c",
"rate_type":"project",
"client":{
"id":9,
"name":"Report Client 1",
"active":true
},
"billable":true,
"updated_at":1491564445,
"budget":0,
"budget_type":"",
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"users":[
{"user_id":1,"hour_rate":0.0,"hour_rate_in_cents":0.0},
{"user_id":20,"hour_rate":0.0,"hour_rate_in_cents":0.0}
]
},
"duration":{
"hours":3,
"minutes":45,
"seconds":0,
"formatted":"03:45",
"total_hours":3.75,
"total_seconds":13500,
"total_minutes":225
},
"estimated_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"cost":{
"fractional":75000,
"formatted":"£750.00",
"amount":750.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"day":"2017-04-21",
"note":"test",
"sequence":1,
"estimated":false,
"timer_state":"start",
"timer_started_on":1491043814,
"timer_stopped_on":0,
"label_ids":[],
"updated_at":1492779312,
"created_from":"Web",
"updated_from":"Web",
"billed":false,
"to":null,
"from":null,
"deleted":false,
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"creator_id":1,
"updater_id":1
}
PUT /:account_id/events/:id/stop
| Parameter Name | Parameter Value |
|---|---|
| id | The numerical ID of the desired event.
Example Values: 123 |
Example Request
curl -v -X PUT -H "Content-Type: application/json"
-H "Authorization: Bearer feb5965e6b89fdd5ab8819bce1bc56ca697867d58b7a4dcd4ac4fa7fbb1e3510"
"https://api.timelyapp.com/1.1/5/events/12141/stop"
Response
Success
200 OK
{
"id":12141,
"uid":"",
"user":{
"id":1,
"email":"[email protected]",
"name":"Linus Evertssen",
"active":true,
"day_view_onboarded":true,
"memory_onboarded":true
},
"project":{
"id":113,
"active":true,
"account_id":5,
"name":"non billable",
"color":"47b17c",
"rate_type":"project",
"client":{
"id":9,
"name":"Report Client 1",
"active":true
},
"billable":true,
"updated_at":1491564445,
"budget":0,
"budget_type":"",
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"users":[
{"user_id":1,"hour_rate":0.0,"hour_rate_in_cents":0.0},
{"user_id":20,"hour_rate":0.0,"hour_rate_in_cents":0.0}
]
},
"duration":{
"hours":3,
"minutes":45,
"seconds":0,
"formatted":"03:45",
"total_hours":3.75,
"total_seconds":13500,
"total_minutes":225
},
"estimated_duration":{
"hours":0,
"minutes":0,
"seconds":0,
"formatted":"00:00",
"total_hours":0.0,
"total_seconds":0,
"total_minutes":0
},
"cost":{
"fractional":75000,
"formatted":"£750.00",
"amount":750.0
},
"estimated_cost":{
"fractional":0,
"formatted":"£0.00",
"amount":0.0
},
"day":"2017-04-21",
"note":"test",
"sequence":1,
"estimated":false,
"timer_state":"stop",
"timer_started_on":0,
"timer_stopped_on":1496132251,
"label_ids":[],
"updated_at":1492779312,
"created_from":"Web",
"updated_from":"Web",
"billed":false,
"to":null,
"from":null,
"deleted":false,
"hour_rate":200.0,
"hour_rate_in_cents":20000.0,
"creator_id":1,
"updater_id":1
}
POST /:account_id/reports
| Parameter Name | Parameter Value |
|---|---|
| user_ids | Specifies the users to get report, should be comma separated numerical user ids
Example: "user_ids": "175551,117861" |
| since | Specifies the start date for report
Example: "since" : "Jan 01, 2014" |
| until | Specifies the end date for report
Example: "until" : "Dec 31, 2014" |
| project_ids | Specifies the projects to get report, should be comma separated numerical project ids
Example: "project_ids": "1751,1171" |
| billed | Specifies the report type to retrive estimated or billed events.
Example: "billed": false or "billed": true |
| label_ids | Specifies the labels to get report, should be comma separated numerical label ids
Example: "label_ids": "751,117" |
Normal user accessing report for account
Example Request
curl -v -X POST -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{"user_ids": "1,5", "since" : "Jan 01, 2014", "until" : "Dec 31, 2014", "project_ids" : "1,5"}'
"https://api.timelyapp.com/1.1/1/reports"
Response
Success
200 Ok
[
[
{
"id":163951,
"name":"development",
"archived":false
},
[
[
{
"id":307611,
"account_id":110941,
"active":true,
"budget":null,
"budget_type":null,
"client":{
"id":163951,
"name":"development",
"archived":false
},
"hourly_rate":20.0,
"name":"development camp",
"billable":true,
"rate_type":"project",
"users":[
{"id":117861,"hour_rate":0.0},
{"id":175551,"hour_rate":0.0}
],
"updated_at":1402552390,
"color":"866b9c",
"total_estimated":{
"duration":{
"total_minutes":540,
"total_hours":9.0,
"minutes":0,
"hours":9,
"formatted":"09:00"
},
"cost":17999.999999999996
},
"total_logged":{
"duration":{
"total_minutes":660,
"total_hours":11.0,
"minutes":0,
"hours":11,
"formatted":"11:00"
},
"cost":21999.999999999996
}
},
[
{
"id":91635811,
"user":{
"id":183581,
"email":"[email protected]",
"name":"Linus Evertssen",
"user_level":"limited",
"active":true
},
"project":{
"id":307611,
"active":true,
"budget":null,
"client":{
"id":163951,
"name":"development",
"archived":false
},
"hour_rate":20.0,
"color":"866b9c",
"name":"timely",
"rate_type":"development camp",
"billable":true,
"updated_at":1402552390
},
"duration":{
"total_minutes":180,
"total_hours":3.0,
"minutes":0,
"hours":3,
"formatted":"03:00"
},
"estimated_duration":{
"total_minutes":0,
"total_hours":0.0,
"minutes":0,
"hours":0,
"formatted":"00:00"
},
"day":"2014-08-20",
"days_count":null,
"cost":6000,
"estimated_cost":0.0,
"hour_rate":2000.0,
"note":"Linus hours 1",
"sequence":1,
"estimated":false,
"updated_at":1409402524
},
{
"id":91706341,
"user":{
"id":117861,
"email":"[email protected]",
"name":"Pravin Thakare",
"user_level":"admin",
"active":true
},
"project":{
"id":307611,
"active":true,
"budget":null,
"client":{
"id":163951,
"name":"development",
"archived":false
},
"hour_rate":20.0,
"color":"866b9c",
"name":"development camp",
"rate_type":"project",
"billable":true,
"updated_at":1402552390
},
"duration":{
"total_minutes":180,
"total_hours":3.0,
"minutes":0,
"hours":3,
"formatted":"03:00"
},
"estimated_duration":{
"total_minutes":180,
"total_hours":3.0,
"minutes":0,
"hours":3,
"formatted":"03:00"
},
"day":"2014-08-25",
"days_count":null,
"cost":6000,
"estimated_cost":6000,
"hour_rate":2000.0,
"note":"Created a web mockup Admin",
"sequence":1,
"estimated":false,
"updated_at":1409082513
}
]
]
]
],
[
{
"id":257641,
"name":"marketing",
"archived":false
},
[
[
{
"id":480101,
"account_id":110941,
"active":true,
"budget":1000,
"budget_type":"H",
"client":{
"id":257641,
"name":"marketing",
"archived":false
},
"hourly_rate":15.0,
"name":"marketing camp",
"billable":true,
"rate_type":"user",
"users":[
{"id":183581,"hour_rate":10.0},
{"id":175551,"hour_rate":25.0},
{"id":117861,"hour_rate":27.0},
{"id":184471,"hour_rate":10.0},
{"id":187331,"hour_rate":10.0}
],
"updated_at":1409424644,
"color":"47b17c",
"total_estimated":{
"duration":{
"total_minutes":1230,
"total_hours":20.5,
"minutes":30,
"hours":20,
"formatted":"20:30"
},
"cost":28150.0
},
"total_logged":{
"duration":{
"total_minutes":2370,
"total_hours":39.5,
"minutes":30,
"hours":39,
"formatted":"39:30"
},
"cost":69250.0
}
},
[
{
"id":91810271,
"user":{
"id":117861,
"email":"[email protected]",
"name":"Pravin Thakare",
"user_level":"admin",
"active":true
},
"project":{
"id":480101,
"active":true,
"budget":1000,
client":{
"id":257641,
"name":"marketing",
"archived":false
},
"hour_rate":15.0,
"color":"47b17c",
"name":"marketing camp",
"rate_type":"user",
"billable":true,
"updated_at":1409424644
},
"duration":{
"total_minutes":300,
"total_hours":5.0,
"minutes":0,
"hours":5,
"formatted":"05:00"
},
"estimated_duration":{
"total_minutes":0,
"total_hours":0.0,
"minutes":0,
"hours":0,
"formatted":"00:00"
},
"day":"2014-08-20",
"days_count":null,
"cost":13500.0,
"estimated_cost":0.0,
"hour_rate":2700.0,
"note":"Pravin entry 1",
"sequence":1,
"estimated":false,
"updated_at":1409424647
},
{
"id":91641031,
"user":{
"id":183581,
"email":"[email protected]",
"name":"Linus Evertssen",
"user_level":"limited",
"active":true
},
"project":{
"id":480101,
"active":true,
"budget":1000,
"client":{
"id":257641,
"name":"marketing",
"archived":false
},
"hour_rate":15.0,
"color":"47b17c",
"name":"marketing camp",
"rate_type":"user",
"billable":true,
"updated_at":1409424644
},
"duration":{
"total_minutes":540,
"total_hours":9.0,
"minutes":0,
"hours":9,
"formatted":"09:00"
},
"estimated_duration":{
"total_minutes":0,
"total_hours":0.0,
"minutes":0,
"hours":0,
"formatted":"00:00"
},
"day":"2014-08-24",
"days_count":null,
"cost":8999.999999999998,
"estimated_cost":0.0,
"hour_rate":1000.0,
"note":"Linus 5",
"sequence":1,
"estimated":false,
"updated_at":1409424644
}
]
]
]
]
]
Note:
1) If "start_date" and "end_date" parameters are not passed, default period is beginning of month to end of month.
2) if the “users” and “projects” parameters are not passed, default normal user will get all the report from account and limited user will get his report.
3) Only normal user can get report of other users of same account. Limited user will always get his report.
4) Only normal user can get report of other projects of same account. Limited user can only get report of his own project.
Get all the tags present in user’s account
GET /:account_id/labels
curl -v -X GET -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
"https://api.timelyapp.com/1.1/1/labels"
Response
Success
200 Ok
[
{
"id":138,
"name":"design",
"sequence":0,
"parent_id":null,
"emoji":"https://twemoji.maxcdn.com/36x36/1f516.png",
"children":[]
},
{
"id":126,
"name":"me",
"sequence":0,
"parent_id":null,
"emoji":"https://twemoji.maxcdn.com/36x36/1f516.png",
"children":[]
},
{
"id":127,
"name":"state",
"sequence":0,
"parent_id":null,
"emoji":"https://twemoji.maxcdn.com/36x36/1f516.png",
"children":[
{
"id":132,
"name":"mh",
"sequence":1,
"parent_id":127,
"emoji":"https://twemoji.maxcdn.com/36x36/1f516.png",
"children":[]
},
{
"id":133,
"name":"jk",
"sequence":2,
"parent_id":127,
"emoji":"https://twemoji.maxcdn.com/36x36/1f516.png",
"children":[]
}
]
}
]
Get all child of given tags present in user’s account
GET /:account_id/labels?parent_id=parent_tag_id
curl -v -X GET -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
"https://api.timelyapp.com/1.1/1/labels?parent_id=127"
Response
Success
200 Ok
[
{
"id":127,
"name":"state",
"sequence":0,
"parent_id":null,
"emoji":"https://twemoji.maxcdn.com/36x36/1f516.png",
"children":[
{
"id":132,
"name":"mh",
"sequence":1,
"parent_id":127,
"emoji":"https://twemoji.maxcdn.com/36x36/1f516.png",
"children":[]
},
{
"id":133,
"name":"jk",
"sequence":2,
"parent_id":127,
"emoji":"https://twemoji.maxcdn.com/36x36/1f516.png",
"children":[]
}
]
}
]
Get single tags present in user’s account
GET /:account_id/labels/label_id
curl -v -X GET -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
"https://api.timelyapp.com/1.1/1/labels/127"
Response
Success
200 Ok
[
{
"id":127,
"name":"state",
"sequence":0,
"parent_id":null,
"emoji":"https://twemoji.maxcdn.com/36x36/1f516.png",
"children":[
{
"id":132,
"name":"mh",
"sequence":1,
"parent_id":127,
"emoji":"https://twemoji.maxcdn.com/36x36/1f516.png",
"children":[]
},
{
"id":133,
"name":"jk",
"sequence":2,
"parent_id":127,
"emoji":"https://twemoji.maxcdn.com/36x36/1f516.png",
"children":[]
}
]
}
]
POST /:account_id/labels
| Parameter Name | Parameter Value |
|---|---|
| name | Specifies the tag name |
| Parameter Name | Parameter Value |
|---|---|
| emoji | Specifies the emoji url for tag |
| parent_id | set the parent_id if you want to create child tags |
Example Request for parent tag
curl -v -X POST -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{"label": { "name": "development", , "emoji" : "http://twemoji.maxcdn.com/36x36/1f4dd.png"}}'
"https://api.timelyapp.com/1.1/1/labels"
Example Request for child tag
curl -v -X POST -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{"label": { "name": "code", , "emoji" : "http://twemoji.maxcdn.com/36x36/1f4dd.png", "parent_id": 127}}'
"https://api.timelyapp.com/1.1/1/labels"
Response
Success
201 Created
{
"id":126,
"name":"development",
"sequence":0,
"parent_id":null,
"emoji":"https://twemoji.maxcdn.com/36x36/1f516.png",
"children":[]
}
PUT /:account_id/labels/:id
| Parameter Name | Parameter Value |
|---|---|
| id | The numerical ID of the desired tag.
Example Values: 123 |
Note: All other parameters are as mention in create tag
Example Request
curl -v -X PUT -H "Content-Type: application/json"
-H "Authorization: Bearer 1886f011cd72eabc88d087eabd741b51a9059f5ba57c7bc439285fe86a4e465a"
--data '{"label": { "name": "marketing update" }}'
"https://api.timelyapp.com/1.1/1/labels/1"
Response
Success
201 Created
{
"id":126,
"name":"marketing update",
"sequence":0,
"parent_id":null,
"emoji":"https://twemoji.maxcdn.com/36x36/1f516.png",
"children":[]
}
Updating tag of a different account
404 Not Found