-
Notifications
You must be signed in to change notification settings - Fork 0
Companies
Mark Mohr edited this page Apr 26, 2016
·
9 revisions
- Route: /companies/company-name
- Method: GET
- Expected Response:
{
"companies": {
"id": 226654575,
"name": "Testing",
"web_subdomain": "testing",
"timezone": "Eastern Time (US & Canada)",
"address": "456 Main Street",
"city": "Omaha",
"state": "NE",
"zip": "68154",
"country": "United States",
"billable_hours": 40,
"billing_rate": "65.0",
"work_days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
],
"week_start_day": "Sunday",
"clients": [
{
"id": 1070822778,
"link": "https://api.getbric.com/v1/clients/1070822778",
"name": "Yahoo"
},
{
"id": 1070822808,
"link": "https://api.getbric.com/v1/clients/1070822808",
"name": "Amazon"
}
],
"people": [
{
"id": 1062390218,
"link": "https://api.getbric.com/v1/people/1062390218",
"first_name": "Glemn",
"last_name": "Quagmire",
"email": "glenn@test.com",
"person_role": null
},
{
"id": 1062390222,
"link": "https://api.getbric.com/v1/people/1062390222",
"first_name": "Guy",
"last_name": "Fawkes",
"email": "guy@test.com",
"person_role": {
"id": 374648174,
"link": "https://api.getbric.com/v1/person_roles/374648174",
"name": "Engagement Manager"
}
}
],
"person_roles": [
{
"id": 374648174,
"link": "https://api.getbric.com/v1/person_roles/374648174",
"name": "Engagement Manager"
},
{
"id": 51848956,
"link": "https://api.getbric.com/v1/person_roles/51848956",
"name": "Project Manager"
}
],
"projects": [
{
"id": 1052037185,
"link": "https://api.getbric.com/v1/projects/1052037185",
"name": "Yahoo Fantasy Baseball",
"code": "RD-456",
"client": {
"id": 1070822778,
"link": "https://api.getbric.com/v1/clients/1070822778",
"name": "Yahoo"
},
"project_type": {
"id": 35,
"link": "https://api.getbric.com/v1/project_types/35",
"name": "Research & Development",
"billable": true
}
},
{
"id": 1052037179,
"link": "https://api.getbric.com/v1/projects/1052037179",
"name": "Amazon Home Page Redesign",
"code": "D-987",
"client": {
"id": 1070822808,
"link": "https://api.getbric.com/v1/clients/1070822808",
"name": "Amazon"
},
"project_type": {
"id": 36,
"link": "https://api.getbric.com/v1/project_types/36",
"name": "Design",
"billable": true
}
}
],
"project_types": [
{
"id": 35,
"link": "https://api.getbric.com/v1/project_types/35",
"name": "Research & Development",
"billable": true
},
{
"id": 36,
"link": "https://api.getbric.com/v1/project_types/36",
"name": "Design",
"billable": true
},
{
"id": 38,
"link": "https://api.getbric.com/v1/project_types/38",
"name": "In-house",
"billable": false
}
],
"time_blocks": [
{
"id": 113629430,
"link": "https://api.getbric.com/v1/time_blocks/113629430",
"person_id": 491142988,
"start_date": "2016-08-04",
"end_date": "2016-08-05"
},
{
"id": 980190985,
"link": "https://api.getbric.com/v1/time_blocks/980190985",
"start_date": "2016-03-22",
"end_date": "2016-03-23"
}
],
"tokens": [
{
"secret": "07e41024485fa7e832a1bf818f86e02871216f37",
"user": {
"email": "test@test.com"
}
}
],
"company_users": [
{
"id": 421690987,
"link": "https://api.getbric.com/v1/company_users/421690987",
"user": {
"email": "owner@test.com"
},
"role": "owner",
"permissions": {}
},
{
"id": 983044855,
"link": "https://api.getbric.com/v1/company_users/983044855",
"user": {
"email": "admin@test.com"
},
"role": "admin",
"permissions": {}
},
{
"id": 983044862,
"link": "https://api.getbric.com/v1/company_users/983044862",
"user": {
"email": "reports@test.com"
},
"role": "reports",
"permissions": {"view_revenue"=>false}
},
{
"id": 983044863,
"link": "https://api.getbric.com/v1/company_users/983044863",
"user": {
"email": "test@test.com"
},
"role": "employee",
"permissions": {"view_revenue"=>true}
}
],
"created_at": "2015-11-19T01:26:01.000-05:00",
"updated_at": "2016-04-13T13:25:53.740-04:00"
}
}
- Route: /companies/company-name
- Method: PATCH
- Allowed Fields:
- name
- timezone (Allowed parameters found in left column at http://www.rubydoc.info/docs/rails/2.3.8/ActiveSupport/TimeZone)
- address
- city
- state
- zip
- country
- billable_hours
- billing_rate
- work_days (Allowed parameters: any of the days of the week, separated by a comma i.e. Monday,Tuesday,Wednesday,Thursday,Friday)
- week_start_day (Allowed parameters: any one of the days of the week i.e. Monday)
- Expected Response:
{
"companies": {
"id": 226654575,
"name": "Testing",
"web_subdomain": "testing",
"timezone": "Eastern Time (US & Canada)",
"address": "456 Main Street",
"city": "Omaha",
"state": "NE",
"zip": "68154",
"country": "United States",
"billable_hours": 40,
"billing_rate": "65.0",
"work_days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
],
"week_start_day": "Sunday",
"clients": [
{
"id": 1070822778,
"link": "https://api.getbric.com/v1/clients/1070822778",
"name": "Yahoo"
},
{
"id": 1070822808,
"link": "https://api.getbric.com/v1/clients/1070822808",
"name": "Amazon"
}
],
"people": [
{
"id": 1062390218,
"link": "https://api.getbric.com/v1/people/1062390218",
"first_name": "Glemn",
"last_name": "Quagmire",
"email": "glenn@test.com",
"person_role": null
},
{
"id": 1062390222,
"link": "https://api.getbric.com/v1/people/1062390222",
"first_name": "Guy",
"last_name": "Fawkes",
"email": "guy@test.com",
"person_role": {
"id": 374648174,
"link": "https://api.getbric.com/v1/person_roles/374648174",
"name": "Engagement Manager"
}
}
],
"person_roles": [
{
"id": 374648174,
"link": "https://api.getbric.com/v1/person_roles/374648174",
"name": "Engagement Manager"
},
{
"id": 51848956,
"link": "https://api.getbric.com/v1/person_roles/51848956",
"name": "Project Manager"
}
],
"projects": [
{
"id": 1052037185,
"link": "https://api.getbric.com/v1/projects/1052037185",
"name": "Yahoo Fantasy Baseball",
"code": "RD-456",
"client": {
"id": 1070822778,
"link": "https://api.getbric.com/v1/clients/1070822778",
"name": "Yahoo"
},
"project_type": {
"id": 35,
"link": "https://api.getbric.com/v1/project_types/35",
"name": "Research & Development",
"billable": true
}
},
{
"id": 1052037179,
"link": "https://api.getbric.com/v1/projects/1052037179",
"name": "Amazon Home Page Redesign",
"code": "D-987",
"client": {
"id": 1070822808,
"link": "https://api.getbric.com/v1/clients/1070822808",
"name": "Amazon"
},
"project_type": {
"id": 36,
"link": "https://api.getbric.com/v1/project_types/36",
"name": "Design",
"billable": true
}
}
],
"project_types": [
{
"id": 35,
"link": "https://api.getbric.com/v1/project_types/35",
"name": "Research & Development",
"billable": true
},
{
"id": 36,
"link": "https://api.getbric.com/v1/project_types/36",
"name": "Design",
"billable": true
},
{
"id": 38,
"link": "https://api.getbric.com/v1/project_types/38",
"name": "In-house",
"billable": false
}
],
"time_blocks": [
{
"id": 113629430,
"link": "https://api.getbric.com/v1/time_blocks/113629430",
"person_id": 491142988,
"start_date": "2016-08-04",
"end_date": "2016-08-05"
},
{
"id": 980190985,
"link": "https://api.getbric.com/v1/time_blocks/980190985",
"start_date": "2016-03-22",
"end_date": "2016-03-23"
}
],
"tokens": [
{
"secret": "07e41024485fa7e832a1bf818f86e02871216f37",
"user": {
"email": "test@test.com"
}
}
],
"company_users": [
{
"id": 421690987,
"link": "https://api.getbric.com/v1/company_users/421690987",
"user": {
"email": "owner@test.com"
},
"role": "owner",
"permissions": {}
},
{
"id": 983044855,
"link": "https://api.getbric.com/v1/company_users/983044855",
"user": {
"email": "admin@test.com"
},
"role": "admin",
"permissions": {}
},
{
"id": 983044862,
"link": "https://api.getbric.com/v1/company_users/983044862",
"user": {
"email": "reports@test.com"
},
"role": "reports",
"permissions": {"view_revenue"=>false}
},
{
"id": 983044863,
"link": "https://api.getbric.com/v1/company_users/983044863",
"user": {
"email": "test@test.com"
},
"role": "employee",
"permissions": {"view_revenue"=>true}
}
],
"created_at": "2015-11-19T01:26:01.000-05:00",
"updated_at": "2016-04-13T13:25:53.740-04:00"
}
}