Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • A abocar
  • Project information
    • Project information
    • Activity
    • Members
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Wiki
    • Wiki
  • Activity
Collapse sidebar
  • cct
  • abocar
  • Wiki
  • Customers

Customers · Changes

Page history
Edited online authored Mar 02, 2021 by Andrea Pavlovic's avatar Andrea Pavlovic
Hide whitespace changes
Inline Side-by-side
Customers.md
View page @ 3db748a0
...@@ -178,24 +178,25 @@ The IDs necessary here are die "id" attributes in core.customer. ...@@ -178,24 +178,25 @@ The IDs necessary here are die "id" attributes in core.customer.
#POST {{url}}/plugins/customer_company_join #POST {{url}}/plugins/customer_company_join
{ {
"customerId" : 34, "client_customer_id" : 34,
"companyId" : 35 "company_id" : 35
} }
``` ```
### Customer Leave Company ### Client Leave Company
The IDs necessary here are die "id" attributes in core.customer. The IDs necessary here are die "id" attributes in core.customer.
``` ```
#!json #!json
#POST {{url}}/plugins/customer_company_leave #POST {{url}}/plugins/client_company_leave
{ {
"customerId" : 34, "client_customer_id" : 34,
"companyId" : 35 "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). 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 ...@@ -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 ### 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. 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 ...@@ -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 ### Add Admin to Client
......
Clone repository
  • Customers
  • Home
  • Queries
  • Test_Setup
  • Vehicles
  • v2