Skip to main content

Create a Company

Request:
{
  "service": "company.create",
  "company": {
    "name": "myCompany",
    "corporate" : true      //optional: is the company corporate or customer ?  default false (customer)
  }
}
Response:
{
  "status": "ok",
  "id": 233
}

Get a Company

Request:
{
  "service": "company.get",
  "id": 233
}
Response:
{
  "status" : "ok",
  "company" : {
    "id" : 233,
    "name" : "myCompany",
    "projects": {
      "count": 3
    },
    "active" : true
  }
}

Update a Company

Request:
{
  "service" : "company.update",
  "company" : {
    "id" : 233,
    "name" : "newName"
  }
}
Response:
{"status" : "ok"}

List Companies

Request:
{
  "service": "company.list"
}
Response:
{
  "status" : "ok",
  "companies": [
    {
      "id" : 233,
      "name" : "myCompany",
      "projects": {"count": 3},
      "active" : true
    }, ...
  ]
}

Activate a Company

Request:
{
  "service": "company.activate",
  "id": 233
}
Response:
{"status": "ok"}

Deactivate a Company

Request:
{
  "service": "company.deactivate",
  "id": 233
}
Response:
{"status": "ok"}

Assign a Specific Task to a Company

Request:
{
  "service" : "company.attach_specific_task",
  "id" : 78,
  "task" : {
    "id" : 43
  }
}
Response:
{"status" : "ok"}

Unassign a Specific Task to a Company

Request:
{
  "service" : "company.detach_specific_task",
  "id" : 78,
  "task" : {
    "id" : 43
  }
}
Response:
{"status" : "ok"}

List Specific Tasks Assigned to a Company

Request:
{
  "service" : "company.specific_tasks",
  "id" : 78
}
Response:
{
 "status" : "ok",
 "disabled" : false,  //default : false
 "specificTasks": [
   {
     "name" : "Administration",
     "id" : 345,
     "active":true
   }, ...
 ]
}

Enable Specific Tasks for a Company (enabled by default)

Request:
{
  "service" : "company.enable_specific_tasks",
  "id" : 78
}
Response:
{"status" : "ok"}

Disable Specific Tasks for a Company

Request:
{
  "service" : "company.disable_specific_tasks",
  "id" : 78
}
Response:
{"status" : "ok"}

Assign an Exclusive Member to a Company

Request:
{
  "service" : "company.attach_member",
  "id" : 78,
  "person" : {  // "person" or "group"
    "id" : 43
  }
}
Response:
{"status" : "ok"}

Unassign an Exclusive Member to a Company

Request:
{
  "service" : "company.detach_member",
  "id" : 78,
  "person" : {  // "person" or "group"
    "id" : 43
  }
}
Response:
{"status" : "ok"}

List Exclusive Members Assigned to a Company

Request:
{
  "service" : "company.members",
  "id" : 78
}
Response:
{
 "status" : "ok",
 "members": [
   {
     "name" : "John Le Carré",
     "id" : 345
   }, ...
 ],
 "groups": [
   {
     "name" : "US",
     "id" : 978
   }, ...
 ]
}

Assign a Group to a Company

Request:
{
  "service" : "company.add_group",
  "id" : 78,
  "group" : {
    "id" : 105
  }
}
Response:
{"status": "ok"}

Unassign a Group to a Company

Request:
{
  "service" : "company.remove_group",
  "id" : 78,
  "group" : {
    "id" : 105
  }
}
Response:
{"status": "ok"}

List Groups Assigned to a Company

Request:
{
  "service" : "company.groups",
  "id" : 78
}
Response:
{
  "status":"ok",
  "groups":[
    {
      "id":4787,
      "name":"US",
      "groups":{"count":4}
    }, ...
  ]
}

Set a Custom Field Value to a Company

Request:
{
  "service" : "company.set_custom_field_value",
  "id" : 78,
  "customField" : {
    "id" : 7206,
    "value" : "Transportation"
  }
}
Response:
{"status": "ok"}

Clear a Company Custom Field Value

Request:
{
  "service" : "company.clear_custom_field_value",
  "id" : 78,
  "customField" : {
    "id" : 7206
  }
}
Response:
{"status": "ok"}

List Custom Fields Assigned to a Company

Request:
{
  "service" : "company.custom_fields",
  "id" : 78
}
Response:
{
  "status":"ok",
  "customFields":[
    {
      "id" : 7206,
      "name" : "Industry",
      "value" : "Transportation" 
    },
    {
      "id" : 4149,
      "name" : "location"
    }, ...
  ]
}