| ... | ... | @@ -178,24 +178,25 @@ The IDs necessary here are die "id" attributes in core.customer. |
|
|
|
|
|
|
|
#POST {{url}}/plugins/customer_company_join
|
|
|
|
{
|
|
|
|
"customerId" : 34,
|
|
|
|
"companyId" : 35
|
|
|
|
"client_customer_id" : 34,
|
|
|
|
"company_id" : 35
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Customer Leave Company
|
|
|
|
### Client Leave Company
|
|
|
|
|
|
|
|
The IDs necessary here are die "id" attributes in core.customer.
|
|
|
|
|
|
|
|
```
|
|
|
|
#!json
|
|
|
|
|
|
|
|
#POST {{url}}/plugins/customer_company_leave
|
|
|
|
#POST {{url}}/plugins/client_company_leave
|
|
|
|
{
|
|
|
|
"customerId" : 34,
|
|
|
|
"companyId" : 35
|
|
|
|
"client_customer_id" : 34,
|
|
|
|
"company_id" : 35
|
|
|
|
}
|
|
|
|
```
|
|
|
|
### List Client Companies
|
|
|
|
### List Clients
|
|
|
|
|
|
|
|
To list all companies a client is assigned to - get those entries from core.customers which are assigned to the client (5 = system.client.id = core.customer.owning_client) and which are labeled as companies (is_client = false).
|
|
|
|
```
|
| ... | ... | @@ -212,17 +213,6 @@ To list all companies a client is assigned to - get those entries from core.cust |
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Currently, there is a plugin implementing this query, but it only returns the ids of the companies. This may disappear. The id here is from core.customer.
|
|
|
|
|
|
|
|
```
|
|
|
|
#!json
|
|
|
|
|
|
|
|
# POST {{url}}/plugins/customer_companies_list
|
|
|
|
{
|
|
|
|
"customerId": 34
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### List Company Clients
|
|
|
|
|
|
|
|
To list all clients assigned to a company, join system.client via owning_client and onto that assignment.core_customer, filtering on the customer there.
|
| ... | ... | @@ -242,19 +232,6 @@ To list all clients assigned to a company, join system.client via owning_client |
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Currently, there is a plugin implementing this query, but it only returns the ids of the clients. This may disappear.
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
#!json
|
|
|
|
|
|
|
|
# POST {{url}}/plugins/company_customers_list
|
|
|
|
{
|
|
|
|
"companyId": 5
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Add Admin to Client
|
|
|
|
|
|
|
|
|
| ... | ... | |