Tiquo
API and AuthenticationClient API

Companies

Retrieve company memberships and colleagues for the authenticated customer

Companies

The Client API company endpoints return companies connected to the authenticated customer.

These endpoints are designed for customer-facing portals and account areas where a customer needs to see their company memberships or, if authorised, colleagues in the same company.

Endpoints

MethodEndpointDescription
GET/companiesList companies the authenticated customer belongs to
GET/companies/colleaguesList colleagues in a company, for company admins

Authentication

Requires a valid JWT access token.

Authorization: Bearer eyJhbGciOiJSUzI1NiJ9...

List Companies

GET /companies

Returns an empty list when the authenticated customer does not belong to any companies.

Example Request

curl "https://edge.tiquo.app/api/client/v1/companies" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9..."

Response

{
  "success": true,
  "data": {
    "companies": [
      {
        "id": "company_123",
        "name": "Acme Corp",
        "displayName": "Acme",
        "companyNumber": "COMP-000001",
        "status": "active",
        "membership": {
          "relationship": "employee",
          "title": "Operations Manager",
          "department": "Operations",
          "isPrimaryContact": false,
          "isCompanyAdmin": true
        }
      }
    ]
  }
}

Each company includes the authenticated customer's membership details for that company.

List Company Colleagues

GET /companies/colleagues

This endpoint is restricted to customers who are company admins for the requested company.

Query Parameters

ParameterTypeRequiredDescription
companyIdstringYesCompany document ID

Example Request

curl "https://edge.tiquo.app/api/client/v1/companies/colleagues?companyId=company_123" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9..."

Response

{
  "success": true,
  "data": {
    "company": {
      "id": "company_123",
      "name": "Acme Corp"
    },
    "colleagues": [
      {
        "id": "cust_456",
        "displayName": "John Smith",
        "email": "john@example.com",
        "relationship": "employee",
        "title": "Operations Manager",
        "department": "Operations",
        "isPrimaryContact": false,
        "isCompanyAdmin": true,
        "isSelf": true
      }
    ]
  }
}

The colleagues response contains basic contact-card information. It does not expose CRM analytics, financial history, private notes, or other staff-only company data.

Errors

StatusDescription
400Missing companyId for colleagues request
401Invalid or expired access token
403The authenticated customer is not a company admin for the requested company
404No customer profile is linked to the authenticated user
500Internal server error

DOM Package

const { companies } = await auth.getCompanies();
const company = companies.find((item) => item.membership.isCompanyAdmin);

if (company) {
  const { colleagues } = await auth.getCompanyColleagues(company.id);
}

En esta página