LINKEDIN

FRONTEND GUIDE FOR AI CODING AGENTS - PART 9 - Company Service

This document is a part of a REST API guide for the linkedin project. It is designed for AI agents that will generate frontend code to consume the project’s backend.

This document provides extensive instruction for the usage of company

Service Access

Company service management is handled through service specific base urls.

Company service may be deployed to the preview server, staging server, or production server. Therefore,it has 3 access URLs. The frontend application must support all deployment environments during development, and the user should be able to select the target API server on the login page (already handled in first part.).

For the company service, the base URLs are:

Scope

Company Service Description

Handles company profiles, company admin assignments, company following, and posting company updates/news. Enables professionals to follow companies, get updates, and enables admins to manage company presence…

Company service provides apis and business logic for following data objects in linkedin application. Each data object may be either a central domain of the application data structure or a related helper data object for a central concept. Note that data object concept is equal to table concept in the database, in the service database each data object is represented as a db table scheme and the object instances as table rows.

companyFollower Data Object: Tracks when a user follows a company to receive updates. Append-only, deletes for unfollow.

companyUpdate Data Object: A post/news update created by company admin and visible to followers depending on visibility.

company Data Object: Represents a company profile and brand presence/pages on the network.

companyAdmin Data Object: Tracks which users are assigned as admins for a company, allowing them to manage the company page and edits.

API Structure

Object Structure of a Successful Response

When the service processes requests successfully, it wraps the requested resource(s) within a JSON envelope. This envelope includes the data and essential metadata such as configuration details and pagination information, providing context to the client.

HTTP Status Codes:

Success Response Format:

For successful operations, the response includes a "status": "OK" property, signaling that the request executed successfully. The structure of a successful response is outlined below:

{
  "status":"OK",
  "statusCode": 200,   
  "elapsedMs":126,
  "ssoTime":120,
  "source": "db",
  "cacheKey": "hexCode",
  "userId": "ID",
  "sessionId": "ID",
  "requestId": "ID",
  "dataName":"products",
  "method":"GET",
  "action":"list",
  "appVersion":"Version",
  "rowCount":3,
  "products":[{},{},{}],
  "paging": {
    "pageNumber":1, 
    "pageRowCount":25, 
    "totalRowCount":3,
    "pageCount":1
  },
  "filters": [],
  "uiPermissions": []
}

Additional Data

Each API may include additional data besides the main data object, depending on the business logic of the API. These will be provided in each API’s response signature.

Error Response

If a request encounters an issue—whether due to a logical fault or a technical problem—the service responds with a standardized JSON error structure. The HTTP status code indicates the nature of the error, using commonly recognized codes for clarity:

Each error response is structured to provide meaningful insight into the problem, assisting in efficient diagnosis and resolution.

{
  "result": "ERR",
  "status": 400,
  "message": "errMsg_organizationIdisNotAValidID",
  "errCode": 400,
  "date": "2024-03-19T12:13:54.124Z",
  "detail": "String"
}

CompanyFollower Data Object

Tracks when a user follows a company to receive updates. Append-only, deletes for unfollow.

CompanyFollower Data Object Properties

CompanyFollower data object has got following properties that are represented as table fields in the database scheme. These properties don’t stand just for data storage, but each may have different settings to manage the business logic.

Property Type IsArray Required Secret Description
userId ID false Yes No -
companyId ID false Yes No -
followedAt Date false Yes No -

Relation Properties

userId companyId

Mindbricks supports relations between data objects, allowing you to define how objects are linked together. The relations may reference to a data object either in this service or in another service. Id the reference is remote, backend handles the relations through service communication or elastic search. These relations should be respected in the frontend so that instaead of showing the related objects id, the frontend should list human readable values from other data objects. If the relation points to another service, frontend should use the referenced service api in case it needs related data. The relation logic is montly handled in backend so the api responses feeds the frontend about the relational data. In mmost cases the api response will provide the relational data as well as the main one.

In frontend, please ensure that,

1- instaead of these relational ids you show the main human readable field of the related target data (like name), 2- if this data object needs a user input of these relational ids, you should provide a combobox with the list of possible records or (a searchbox) to select with the realted target data object main human readable field.

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

Filter Properties

userId

Filter properties are used to define parameters that can be used in query filters, allowing for dynamic data retrieval based on user input or predefined criteria. These properties are automatically mapped as API parameters in the listing API’s.

CompanyUpdate Data Object

A post/news update created by company admin and visible to followers depending on visibility.

CompanyUpdate Data Object Properties

CompanyUpdate data object has got following properties that are represented as table fields in the database scheme. These properties don’t stand just for data storage, but each may have different settings to manage the business logic.

Property Type IsArray Required Secret Description
companyId ID false Yes No -
content Text false Yes No -
authorUserId ID false Yes No -
attachmentUrls String true No No -
visibility Enum false Yes No -

Array Properties

attachmentUrls

Array properties can hold multiple values. Array properties should be respected according to their multiple structure in the frontend in any user input for them. Please use multiple input components for the array proeprties when needed.

Enum Properties

Enum properties are defined with a set of allowed values, ensuring that only valid options can be assigned to them. The enum options value will be stored as strings in the database, but when a data object is created an additional property with the same name plus an idx suffix will be created, which will hold the index of the selected enum option. You can use the {fieldName_idx} property to sort by the enum value or when your enum options represent a hiyerarchy of values. In the frontend input components, enum type properties should only accept values from an option component that lists the enum options.

Relation Properties

companyId authorUserId

Mindbricks supports relations between data objects, allowing you to define how objects are linked together. The relations may reference to a data object either in this service or in another service. Id the reference is remote, backend handles the relations through service communication or elastic search. These relations should be respected in the frontend so that instaead of showing the related objects id, the frontend should list human readable values from other data objects. If the relation points to another service, frontend should use the referenced service api in case it needs related data. The relation logic is montly handled in backend so the api responses feeds the frontend about the relational data. In mmost cases the api response will provide the relational data as well as the main one.

In frontend, please ensure that,

1- instaead of these relational ids you show the main human readable field of the related target data (like name), 2- if this data object needs a user input of these relational ids, you should provide a combobox with the list of possible records or (a searchbox) to select with the realted target data object main human readable field.

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

Filter Properties

visibility

Filter properties are used to define parameters that can be used in query filters, allowing for dynamic data retrieval based on user input or predefined criteria. These properties are automatically mapped as API parameters in the listing API’s.

Company Data Object

Represents a company profile and brand presence/pages on the network.

Company Data Object Properties

Company data object has got following properties that are represented as table fields in the database scheme. These properties don’t stand just for data storage, but each may have different settings to manage the business logic.

Property Type IsArray Required Secret Description
name String false Yes No -
website String false No No -
location String false No No -
logoUrl String false No No -
pageVisibility Enum false Yes No -
createdByUserId ID false Yes No -
description Text false No No -
industry String false No No -

Enum Properties

Enum properties are defined with a set of allowed values, ensuring that only valid options can be assigned to them. The enum options value will be stored as strings in the database, but when a data object is created an additional property with the same name plus an idx suffix will be created, which will hold the index of the selected enum option. You can use the {fieldName_idx} property to sort by the enum value or when your enum options represent a hiyerarchy of values. In the frontend input components, enum type properties should only accept values from an option component that lists the enum options.

Filter Properties

name location pageVisibility industry

Filter properties are used to define parameters that can be used in query filters, allowing for dynamic data retrieval based on user input or predefined criteria. These properties are automatically mapped as API parameters in the listing API’s.

CompanyAdmin Data Object

Tracks which users are assigned as admins for a company, allowing them to manage the company page and edits.

CompanyAdmin Data Object Properties

CompanyAdmin data object has got following properties that are represented as table fields in the database scheme. These properties don’t stand just for data storage, but each may have different settings to manage the business logic.

Property Type IsArray Required Secret Description
assignedAt Date false Yes No -
userId ID false Yes No -
companyId ID false Yes No -
assignedBy ID false Yes No -

Relation Properties

userId companyId assignedBy

Mindbricks supports relations between data objects, allowing you to define how objects are linked together. The relations may reference to a data object either in this service or in another service. Id the reference is remote, backend handles the relations through service communication or elastic search. These relations should be respected in the frontend so that instaead of showing the related objects id, the frontend should list human readable values from other data objects. If the relation points to another service, frontend should use the referenced service api in case it needs related data. The relation logic is montly handled in backend so the api responses feeds the frontend about the relational data. In mmost cases the api response will provide the relational data as well as the main one.

In frontend, please ensure that,

1- instaead of these relational ids you show the main human readable field of the related target data (like name), 2- if this data object needs a user input of these relational ids, you should provide a combobox with the list of possible records or (a searchbox) to select with the realted target data object main human readable field.

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: No

Filter Properties

userId

Filter properties are used to define parameters that can be used in query filters, allowing for dynamic data retrieval based on user input or predefined criteria. These properties are automatically mapped as API parameters in the listing API’s.

Default CRUD APIs

For each data object, the backend architect may designate default APIs for standard operations (create, update, delete, get, list). These are the APIs that frontend CRUD forms and AI agents should use for basic record management. If no default is explicitly set (isDefaultApi), the frontend generator auto-discovers the most general API for each operation.

CompanyFollower Default APIs

Operation API Name Route Explicitly Set
Create followCompany /v1/followcompany Auto
Update none - Auto
Delete unfollowCompany /v1/unfollowcompany/:companyFollowerId Auto
Get getCompanyFollower /v1/companyfollowers/:companyFollowerId Auto
List listCompanyFollowers /v1/companyfollowers Auto

CompanyUpdate Default APIs

Operation API Name Route Explicitly Set
Create createCompanyUpdate /v1/companyupdates Auto
Update updateCompanyUpdate /v1/companyupdates/:companyUpdateId Auto
Delete deleteCompanyUpdate /v1/companyupdates/:companyUpdateId Auto
Get getCompanyUpdate /v1/companyupdates/:companyUpdateId Auto
List listCompanyUpdates /v1/companyupdates Auto

Company Default APIs

Operation API Name Route Explicitly Set
Create createCompany /v1/companies Auto
Update updateCompany /v1/companies/:companyId Auto
Delete deleteCompany /v1/companies/:companyId Auto
Get getCompany /v1/companies/:companyId Auto
List listCompanies /v1/companies Auto

CompanyAdmin Default APIs

Operation API Name Route Explicitly Set
Create assignCompanyAdmin /v1/assigncompanyadmin Auto
Update none - Auto
Delete removeCompanyAdmin /v1/removecompanyadmin/:companyAdminId Auto
Get getCompanyAdmin /v1/companyadmins/:companyAdminId Auto
List listCompanyAdmins /v1/companyadmins Auto

When building CRUD forms for a data object, use the default create/update APIs listed above. The form fields should correspond to the API’s body parameters. For relation fields, render a dropdown loaded from the related object’s list API using the display label property.

API Reference

Get Companyadmin API

Get company admin record by ID. Only admins can query of their company.

Rest Route

The getCompanyAdmin API REST controller can be triggered via the following route:

/v1/companyadmins/:companyAdminId

Rest Request Parameters

The getCompanyAdmin api has got 1 regular request parameter

Parameter Type Required Population
companyAdminId ID true request.params?.[“companyAdminId”]
companyAdminId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/companyadmins/:companyAdminId

  axios({
    method: 'GET',
    url: `/v1/companyadmins/${companyAdminId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "companyAdmin",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"companyAdmin": {
		"id": "ID",
		"assignedAt": "Date",
		"userId": "ID",
		"companyId": "ID",
		"assignedBy": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Follow Company API

Follow a company. Adds entry to companyFollower. Any logged-in user may follow. Cannot follow twice.

Rest Route

The followCompany API REST controller can be triggered via the following route:

/v1/followcompany

Rest Request Parameters

The followCompany api has got 3 regular request parameters

Parameter Type Required Population
userId ID true request.body?.[“userId”]
companyId ID true request.body?.[“companyId”]
followedAt Date true request.body?.[“followedAt”]
userId :
companyId :
followedAt :

REST Request To access the api you can use the REST controller with the path POST /v1/followcompany

  axios({
    method: 'POST',
    url: '/v1/followcompany',
    data: {
            userId:"ID",  
            companyId:"ID",  
            followedAt:"Date",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "companyFollower",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"companyFollower": {
		"id": "ID",
		"userId": "ID",
		"companyId": "ID",
		"followedAt": "Date",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Remove Companyadmin API

Removes admin rights from a user for a company. Can only be performed by current admin, not self-removal unless last admin?

Rest Route

The removeCompanyAdmin API REST controller can be triggered via the following route:

/v1/removecompanyadmin/:companyAdminId

Rest Request Parameters

The removeCompanyAdmin api has got 1 regular request parameter

Parameter Type Required Population
companyAdminId ID true request.params?.[“companyAdminId”]
companyAdminId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/removecompanyadmin/:companyAdminId

  axios({
    method: 'DELETE',
    url: `/v1/removecompanyadmin/${companyAdminId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "companyAdmin",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"companyAdmin": {
		"id": "ID",
		"assignedAt": "Date",
		"userId": "ID",
		"companyId": "ID",
		"assignedBy": "ID",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Create Company API

Creates a new company profile (page). User initiating the company becomes initial admin (enforced in workflow).

Rest Route

The createCompany API REST controller can be triggered via the following route:

/v1/companies

Rest Request Parameters

The createCompany api has got 8 regular request parameters

Parameter Type Required Population
name String true request.body?.[“name”]
website String false request.body?.[“website”]
location String false request.body?.[“location”]
logoUrl String false request.body?.[“logoUrl”]
pageVisibility Enum true request.body?.[“pageVisibility”]
createdByUserId ID true request.body?.[“createdByUserId”]
description Text false request.body?.[“description”]
industry String false request.body?.[“industry”]
name :
website :
location :
logoUrl :
pageVisibility :
createdByUserId :
description :
industry :

REST Request To access the api you can use the REST controller with the path POST /v1/companies

  axios({
    method: 'POST',
    url: '/v1/companies',
    data: {
            name:"String",  
            website:"String",  
            location:"String",  
            logoUrl:"String",  
            pageVisibility:"Enum",  
            createdByUserId:"ID",  
            description:"Text",  
            industry:"String",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "company",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"company": {
		"id": "ID",
		"name": "String",
		"website": "String",
		"location": "String",
		"logoUrl": "String",
		"pageVisibility": "Enum",
		"pageVisibility_idx": "Integer",
		"createdByUserId": "ID",
		"description": "Text",
		"industry": "String",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Get Company API

Get a company page by ID. If public, anyone can view. If private, only admin/followers.

Rest Route

The getCompany API REST controller can be triggered via the following route:

/v1/companies/:companyId

Rest Request Parameters

The getCompany api has got 1 regular request parameter

Parameter Type Required Population
companyId ID true request.params?.[“companyId”]
companyId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/companies/:companyId

  axios({
    method: 'GET',
    url: `/v1/companies/${companyId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "company",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"company": {
		"id": "ID",
		"name": "String",
		"website": "String",
		"location": "String",
		"logoUrl": "String",
		"pageVisibility": "Enum",
		"pageVisibility_idx": "Integer",
		"createdByUserId": "ID",
		"description": "Text",
		"industry": "String",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Companies API

List all (optionally filtered) companies, e.g. for directory/search, subject to visibility.

Rest Route

The listCompanies API REST controller can be triggered via the following route:

/v1/companies

Rest Request Parameters

Filter Parameters

The listCompanies api supports 4 optional filter parameters for filtering list results:

name (String): Filter by name

location (String): Filter by location

pageVisibility (Enum): Filter by pageVisibility

industry (String): Filter by industry

REST Request To access the api you can use the REST controller with the path GET /v1/companies

  axios({
    method: 'GET',
    url: '/v1/companies',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // name: '<value>' // Filter by name
        // location: '<value>' // Filter by location
        // pageVisibility: '<value>' // Filter by pageVisibility
        // industry: '<value>' // Filter by industry
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "companies",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"companies": [
		{
			"id": "ID",
			"name": "String",
			"website": "String",
			"location": "String",
			"logoUrl": "String",
			"pageVisibility": "Enum",
			"pageVisibility_idx": "Integer",
			"createdByUserId": "ID",
			"description": "Text",
			"industry": "String",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Update Company API

Updates fields of a company page/profile. Only current company admin can update.

Rest Route

The updateCompany API REST controller can be triggered via the following route:

/v1/companies/:companyId

Rest Request Parameters

The updateCompany api has got 9 regular request parameters

Parameter Type Required Population
companyId ID true request.params?.[“companyId”]
name String false request.body?.[“name”]
website String false request.body?.[“website”]
location String false request.body?.[“location”]
logoUrl String false request.body?.[“logoUrl”]
pageVisibility Enum false request.body?.[“pageVisibility”]
createdByUserId ID true request.body?.[“createdByUserId”]
description Text false request.body?.[“description”]
industry String false request.body?.[“industry”]
companyId : This id paremeter is used to select the required data object that will be updated
name :
website :
location :
logoUrl :
pageVisibility :
createdByUserId :
description :
industry :

REST Request To access the api you can use the REST controller with the path PATCH /v1/companies/:companyId

  axios({
    method: 'PATCH',
    url: `/v1/companies/${companyId}`,
    data: {
            name:"String",  
            website:"String",  
            location:"String",  
            logoUrl:"String",  
            pageVisibility:"Enum",  
            createdByUserId:"ID",  
            description:"Text",  
            industry:"String",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "company",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"company": {
		"id": "ID",
		"name": "String",
		"website": "String",
		"location": "String",
		"logoUrl": "String",
		"pageVisibility": "Enum",
		"pageVisibility_idx": "Integer",
		"createdByUserId": "ID",
		"description": "Text",
		"industry": "String",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Delete Company API

Deletes (soft-delete) a company page. Only current admin may delete.

Rest Route

The deleteCompany API REST controller can be triggered via the following route:

/v1/companies/:companyId

Rest Request Parameters

The deleteCompany api has got 1 regular request parameter

Parameter Type Required Population
companyId ID true request.params?.[“companyId”]
companyId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/companies/:companyId

  axios({
    method: 'DELETE',
    url: `/v1/companies/${companyId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "company",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"company": {
		"id": "ID",
		"name": "String",
		"website": "String",
		"location": "String",
		"logoUrl": "String",
		"pageVisibility": "Enum",
		"pageVisibility_idx": "Integer",
		"createdByUserId": "ID",
		"description": "Text",
		"industry": "String",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Assign Companyadmin API

Assigns a user as company admin. Must be called by an existing admin. Records assigning user and timestamp for audit.

Rest Route

The assignCompanyAdmin API REST controller can be triggered via the following route:

/v1/assigncompanyadmin

Rest Request Parameters

The assignCompanyAdmin api has got 4 regular request parameters

Parameter Type Required Population
assignedAt Date true request.body?.[“assignedAt”]
userId ID true request.body?.[“userId”]
companyId ID true request.body?.[“companyId”]
assignedBy ID true request.body?.[“assignedBy”]
assignedAt :
userId :
companyId :
assignedBy :

REST Request To access the api you can use the REST controller with the path POST /v1/assigncompanyadmin

  axios({
    method: 'POST',
    url: '/v1/assigncompanyadmin',
    data: {
            assignedAt:"Date",  
            userId:"ID",  
            companyId:"ID",  
            assignedBy:"ID",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "companyAdmin",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"companyAdmin": {
		"id": "ID",
		"assignedAt": "Date",
		"userId": "ID",
		"companyId": "ID",
		"assignedBy": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Companyadmins API

List all current admins for a given company. Only admins can query their company admin list.

Rest Route

The listCompanyAdmins API REST controller can be triggered via the following route:

/v1/companyadmins

Rest Request Parameters

Filter Parameters

The listCompanyAdmins api supports 1 optional filter parameter for filtering list results:

userId (ID): Filter by userId

REST Request To access the api you can use the REST controller with the path GET /v1/companyadmins

  axios({
    method: 'GET',
    url: '/v1/companyadmins',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // userId: '<value>' // Filter by userId
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "companyAdmins",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"companyAdmins": [
		{
			"id": "ID",
			"assignedAt": "Date",
			"userId": "ID",
			"companyId": "ID",
			"assignedBy": "ID",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Get Companyupdate API

Get a company update/news post. Only public posts are visible to all, private are visible to company followers and company admins.

Rest Route

The getCompanyUpdate API REST controller can be triggered via the following route:

/v1/companyupdates/:companyUpdateId

Rest Request Parameters

The getCompanyUpdate api has got 1 regular request parameter

Parameter Type Required Population
companyUpdateId ID true request.params?.[“companyUpdateId”]
companyUpdateId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/companyupdates/:companyUpdateId

  axios({
    method: 'GET',
    url: `/v1/companyupdates/${companyUpdateId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "companyUpdate",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"companyUpdate": {
		"id": "ID",
		"companyId": "ID",
		"content": "Text",
		"authorUserId": "ID",
		"attachmentUrls": "String",
		"visibility": "Enum",
		"visibility_idx": "Integer",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Unfollow Company API

Unfollow a company. Deletes companyFollower entry. Only current follower may unfollow.

Rest Route

The unfollowCompany API REST controller can be triggered via the following route:

/v1/unfollowcompany/:companyFollowerId

Rest Request Parameters

The unfollowCompany api has got 1 regular request parameter

Parameter Type Required Population
companyFollowerId ID true request.params?.[“companyFollowerId”]
companyFollowerId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/unfollowcompany/:companyFollowerId

  axios({
    method: 'DELETE',
    url: `/v1/unfollowcompany/${companyFollowerId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "companyFollower",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"companyFollower": {
		"id": "ID",
		"userId": "ID",
		"companyId": "ID",
		"followedAt": "Date",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Companyfollowers API

List all followers of a company. Only company admin can see list of all followers.

Rest Route

The listCompanyFollowers API REST controller can be triggered via the following route:

/v1/companyfollowers

Rest Request Parameters

Filter Parameters

The listCompanyFollowers api supports 1 optional filter parameter for filtering list results:

userId (ID): Filter by userId

REST Request To access the api you can use the REST controller with the path GET /v1/companyfollowers

  axios({
    method: 'GET',
    url: '/v1/companyfollowers',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // userId: '<value>' // Filter by userId
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "companyFollowers",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"companyFollowers": [
		{
			"id": "ID",
			"userId": "ID",
			"companyId": "ID",
			"followedAt": "Date",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Create Companyupdate API

Posts a company update/news. Only active admin of company may post on that company’s behalf.

Rest Route

The createCompanyUpdate API REST controller can be triggered via the following route:

/v1/companyupdates

Rest Request Parameters

The createCompanyUpdate api has got 5 regular request parameters

Parameter Type Required Population
companyId ID true request.body?.[“companyId”]
content Text true request.body?.[“content”]
authorUserId ID true request.body?.[“authorUserId”]
attachmentUrls String false request.body?.[“attachmentUrls”]
visibility Enum true request.body?.[“visibility”]
companyId :
content :
authorUserId :
attachmentUrls :
visibility :

REST Request To access the api you can use the REST controller with the path POST /v1/companyupdates

  axios({
    method: 'POST',
    url: '/v1/companyupdates',
    data: {
            companyId:"ID",  
            content:"Text",  
            authorUserId:"ID",  
            attachmentUrls:"String",  
            visibility:"Enum",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "companyUpdate",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"companyUpdate": {
		"id": "ID",
		"companyId": "ID",
		"content": "Text",
		"authorUserId": "ID",
		"attachmentUrls": "String",
		"visibility": "Enum",
		"visibility_idx": "Integer",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Update Companyupdate API

Update company update post/news. Only author or company admins may update.

Rest Route

The updateCompanyUpdate API REST controller can be triggered via the following route:

/v1/companyupdates/:companyUpdateId

Rest Request Parameters

The updateCompanyUpdate api has got 4 regular request parameters

Parameter Type Required Population
companyUpdateId ID true request.params?.[“companyUpdateId”]
content Text false request.body?.[“content”]
attachmentUrls String false request.body?.[“attachmentUrls”]
visibility Enum false request.body?.[“visibility”]
companyUpdateId : This id paremeter is used to select the required data object that will be updated
content :
attachmentUrls :
visibility :

REST Request To access the api you can use the REST controller with the path PATCH /v1/companyupdates/:companyUpdateId

  axios({
    method: 'PATCH',
    url: `/v1/companyupdates/${companyUpdateId}`,
    data: {
            content:"Text",  
            attachmentUrls:"String",  
            visibility:"Enum",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "companyUpdate",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"companyUpdate": {
		"id": "ID",
		"companyId": "ID",
		"content": "Text",
		"authorUserId": "ID",
		"attachmentUrls": "String",
		"visibility": "Enum",
		"visibility_idx": "Integer",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Get Companyfollower API

Get a companyFollower record (for audit/profile/follower listing). Only follower/userId or company admin can get record.

Rest Route

The getCompanyFollower API REST controller can be triggered via the following route:

/v1/companyfollowers/:companyFollowerId

Rest Request Parameters

The getCompanyFollower api has got 1 regular request parameter

Parameter Type Required Population
companyFollowerId ID true request.params?.[“companyFollowerId”]
companyFollowerId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/companyfollowers/:companyFollowerId

  axios({
    method: 'GET',
    url: `/v1/companyfollowers/${companyFollowerId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "companyFollower",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"companyFollower": {
		"id": "ID",
		"userId": "ID",
		"companyId": "ID",
		"followedAt": "Date",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Delete Companyupdate API

Delete (soft delete) a company update/news. Only author or current admin may delete.

Rest Route

The deleteCompanyUpdate API REST controller can be triggered via the following route:

/v1/companyupdates/:companyUpdateId

Rest Request Parameters

The deleteCompanyUpdate api has got 1 regular request parameter

Parameter Type Required Population
companyUpdateId ID true request.params?.[“companyUpdateId”]
companyUpdateId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/companyupdates/:companyUpdateId

  axios({
    method: 'DELETE',
    url: `/v1/companyupdates/${companyUpdateId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "companyUpdate",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"companyUpdate": {
		"id": "ID",
		"companyId": "ID",
		"content": "Text",
		"authorUserId": "ID",
		"attachmentUrls": "String",
		"visibility": "Enum",
		"visibility_idx": "Integer",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Companyupdates API

List company updates/news for a company. Public updates are visible to all, private to followers/admins.

Rest Route

The listCompanyUpdates API REST controller can be triggered via the following route:

/v1/companyupdates

Rest Request Parameters

Filter Parameters

The listCompanyUpdates api supports 1 optional filter parameter for filtering list results:

visibility (Enum): Filter by visibility

REST Request To access the api you can use the REST controller with the path GET /v1/companyupdates

  axios({
    method: 'GET',
    url: '/v1/companyupdates',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // visibility: '<value>' // Filter by visibility
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "companyUpdates",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"companyUpdates": [
		{
			"id": "ID",
			"companyId": "ID",
			"content": "Text",
			"authorUserId": "ID",
			"attachmentUrls": "String",
			"visibility": "Enum",
			"visibility_idx": "Integer",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

After this prompt, the user may give you new instructions to update the output of this prompt or provide subsequent prompts about the project.