Resource
Company template
Read-only templates that classify companies. List and fetch. Reference the template from company create and update bodies.
The endpoint reference below is kept in English in both language trees. It mirrors the API contract verbatim and there is no generator to rebuild it from, so a translated copy would drift from the API the first time an endpoint changes.
A company template is the named classification a company is created under, and it carries the policy that comes with that classification: whether companies created from it are placed under monitoring, whether they are risk-assessed, whether they are access-controlled rather than public, and whether creating one also creates a project and redirects there. One of the templates is the tenant's default. Over the API they are read-only — you list them and read one, then reference the one you want from a company create or update body; the template itself is maintained in Visena, not here.
Endpoints
Two endpoints, in the order they are documented below.
- GET
/company-template— List company templates (offset-paginated) - GET
/company-template/{templateId}— Get a company template
Every endpoint on this page can additionally answer the shared errors — 401, 403, 404 (unknown instance) and 500. They are documented once, under Errors and troubleshooting.
List company templates (offset-paginated)
GET /{instanceName}/api/v1/{locale}/company-template
Offset/limit paging with a real total. Ordered by name ascending, case-insensitively — the order is fixed and cannot be selected, because name is the only orderable field upstream. Optional filters: isActive, shouldBeMonitored; no other filter and no name search is available. The items carry the template's own attributes only: the company-type, business-field, project-template and access-control associations are deliberately excluded, so that a paged read has a bounded query count. RFC 8288 navigation links are in the body.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
offset |
query | integerdefault 0 |
Zero-based item offset. |
limit |
query | integer |
Maximum items to return per page. |
isActive |
query | boolean |
Filter on active state. |
shouldBeMonitored |
query | boolean |
Responses
| Status | Description |
|---|---|
| 200 | A page of company templates with totals and navigation links. CompanyTemplateOffsetListResponse · application/json |
| 400 | Invalid paging parameter. |
Example
curl "https://api.visena.example/acme/api/v1/en/company-template?offset=0&limit=20" \
-H "Authorization: Bearer $TOKEN"
Get a company template
GET /{instanceName}/api/v1/{locale}/company-template/{templateId}
Returns the template's own attributes. The company-type, business-field, project-template and access-control associations are deliberately excluded, as is the company count, which is a list-only figure and not an attribute of the template. 404 if unknown; 400 if the id cannot be unmasked.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
templateId required |
path | string |
Masked template id. |
Responses
| Status | Description |
|---|---|
| 200 | The company template. CompanyTemplateDto · application/json |
| 400 | The id is not a valid id. |
| 404 | No company template with that id. |
Example
curl "https://api.visena.example/acme/api/v1/en/company-template/tM2qL6" \
-H "Authorization: Bearer $TOKEN"
Object shapes
The response bodies used above, in the order they are first referenced. Neither endpoint takes a request body.
CompanyTemplateOffsetListResponse
| Field | Type | Description |
|---|---|---|
totalItems |
integer |
Total number of matching company templates. |
totalPages |
integer |
Total number of pages at the current page size. |
page |
integer |
Zero-based index of the current page. |
size |
object |
Page size actually applied. |
items |
array of CompanyTemplateListItemDto | The company templates on this page, ordered by name. |
links |
CompanyTemplateListLinks |
CompanyTemplateListItemDto
The company templates on this page, ordered by name.
| Field | Type | Description |
|---|---|---|
id |
string (masked id) |
|
name |
string |
|
code |
string |
Short code of the company template. |
description |
string |
Free-text description, if any. |
isActive |
boolean |
|
shouldBeMonitored |
boolean |
Whether companies created from this template are placed under monitoring. A policy flag, not an observed state. |
isDefault |
boolean |
Whether this is the tenant's default company template. |
isDefaultPublicAccess |
boolean |
Whether companies created from this template are access-controlled rather than public. Derived as the negation of the template's default-public-access flag; it does not consult the template's access-control member list, so a template can report false while holding one. |
isSystemType |
boolean |
Whether this is a system template. |
numCompanies |
integer |
Number of companies using this template. NOT access-filtered: it counts companies the caller may not itself be permitted to see. A bare count carries no company identity. |
CompanyTemplateListLinks
RFC 8288 navigation links.
| Field | Type | Description |
|---|---|---|
self |
string |
URL of the current page. |
first |
string |
URL of the first page. |
prev |
string |
URL of the previous page, if any. |
next |
string |
URL of the next page, if any. |
last |
string |
URL of the last page. |
CompanyTemplateDto
| Field | Type | Description |
|---|---|---|
id |
string (masked id) |
|
name |
string |
|
code |
string |
Short code of the company template. |
description |
string |
Free-text description, if any. |
isActive |
boolean |
|
isDefault |
boolean |
Whether this is the tenant's default company template. |
shouldBeMonitored |
boolean |
Whether companies created from this template are placed under monitoring. A policy flag, not an observed state. |
shouldBeRiskAssessed |
boolean |
Whether companies created from this template are risk-assessed. Only meaningful when the template also monitors. |
redirectToProjectAfterCreate |
boolean |
Whether creating a company from this template redirects to the project it also creates. |
isDefaultPublicAccess |
boolean |
Whether companies created from this template are access-controlled rather than public. Derived as the negation of the template's default-public-access flag; it does not consult the template's access-control member list, so a template can report false while holding one. |
isSystemType |
boolean |
Whether this is a system template. |