Company Notes
Company notes can contain sensitive information that clients and subcontractors should not be able to see. For that reason, this info is not included in regular company responses, but as a separate request. For the purpose of this test, we create one client company and left the note field blank:
Response: HTTP 200, application/json (Hide)
GET /companies/2
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
{ "single": { "id": 2, "class": "Company", "url_path": "\/companies\/2", "name": "Client Company", "members": [], "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "is_archived": false, "created_on": 1430164555, "created_by_id": 1, "updated_on": 1430164555, "updated_by_id": 1, "address": null, "phone": null, "homepage_url": null, "tax_id": null, "currency_id": null, "is_owner": false, "has_note": false }, "hourly_rates": { "1": 100 }, "active_projects_count": 0 }
/companies/notes
request also returns an empty array because we have no companies with notes:
Lets update our test company with a note:
Response: HTTP 200, application/json (Hide)
PUT /companies/2
Payload:
1 2 3
{ "note": "This is a VIP client" }
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
{ "single": { "id": 2, "class": "Company", "url_path": "\/companies\/2", "name": "Client Company", "members": [], "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "is_archived": false, "created_on": 1430164555, "created_by_id": 1, "updated_on": 1430164555, "updated_by_id": 1, "address": null, "phone": null, "homepage_url": null, "tax_id": null, "currency_id": null, "is_owner": false, "has_note": true }, "hourly_rates": { "1": 100 }, "active_projects_count": 0 }
Now when we check /companies/notes
we'll see that system properly returns company note:
Response: HTTP 200, application/json (Hide)
GET /companies/notes
Response:
1 2 3
{ "2": "This is a VIP client" }