Tiquo
API and AuthenticationAdmin APICompanies

Companies

Admin API endpoints for listing, retrieving, and updating companies

Companies

The Companies endpoints let you list, retrieve, and update companies (B2B accounts) within your organization through the Admin API.

Endpoints

MethodEndpointDescription
GET/companiesList companies with filtering
GET/companies/{companyId}Get a single company
PATCH/companies/{companyId}Update a company

Authentication

All requests require a valid Admin API key:

Authorization: Bearer your_api_key_here

List Companies

GET /companies

Query Parameters

ParameterTypeRequiredDescription
limitintegerNoMax results (1 to 100, default 50)
statusstringNoFilter by status: active, inactive, or archived

Example Request

curl "https://api.tiquo.app/api/v1/companies?status=active&limit=25" \
  -H "Authorization: Bearer your_api_key_here"

Response

{
  "success": true,
  "data": [
    {
      "id": "k1234567890abcdef",
      "companyNumber": "COMP-000001",
      "name": "Acme Corp",
      "displayName": "Acme",
      "email": "billing@acme.com",
      "phone": "+15554567890",
      "website": "https://acme.com",
      "websites": ["https://acme.com"],
      "emailDomains": ["acme.com"],
      "status": "active",
      "tags": ["enterprise"],
      "totalCustomers": 12,
      "totalOrders": 84,
      "totalRevenue": 18450.00,
      "lastOrderDate": 1640995200000,
      "lastActivityDate": 1640995200000,
      "createdAt": 1640995200000,
      "updatedAt": 1640995200000
    }
  ],
  "pagination": {
    "hasMore": false,
    "nextCursor": null,
    "pageSize": 25
  },
  "timestamp": "2025-01-15T10:30:00.000Z"
}

Get Company

GET /companies/{companyId}

Path Parameters

ParameterTypeRequiredDescription
companyIdstringYesA company number (COMP-000001), email address, document ID, or company name

Lookup Order

The endpoint resolves the identifier in this order:

  1. Company number pattern (COMP-NNNNNN)
  2. Email address (contains @)
  3. Document ID (lowercase alphanumeric)
  4. Company name (exact match)

Example Request

curl "https://api.tiquo.app/api/v1/companies/COMP-000001" \
  -H "Authorization: Bearer your_api_key_here"

Response

{
  "success": true,
  "data": {
    "id": "k1234567890abcdef",
    "companyNumber": "COMP-000001",
    "name": "Acme Corp",
    "displayName": "Acme",
    "description": "Industrial supplier headquartered in London.",
    "email": "billing@acme.com",
    "phone": "+15554567890",
    "website": "https://acme.com",
    "websites": ["https://acme.com"],
    "emailDomains": ["acme.com"],
    "logo": "https://example.com/acme-logo.png",
    "address": {
      "line1": "123 Industrial Way",
      "line2": "Suite 400",
      "city": "London",
      "state": null,
      "postalCode": "EC1A 1BB",
      "country": "GB"
    },
    "industry": "Manufacturing",
    "companySize": "200-500",
    "status": "active",
    "type": "customer",
    "tags": ["enterprise"],
    "notes": "Negotiated bulk pricing.",
    "totalCustomers": 12,
    "totalOrders": 84,
    "totalRevenue": 18450.00,
    "lastOrderDate": 1640995200000,
    "lastActivityDate": 1640995200000,
    "createdAt": 1640995200000,
    "updatedAt": 1640995200000
  },
  "timestamp": "2025-01-15T10:30:00.000Z"
}

Update Company

PATCH /companies/{companyId}

The companyId path parameter must be a document ID or company number. Email and name lookups are not supported on PATCH.

Request Body

Send any subset of the following fields. Omitted fields are left unchanged.

FieldTypeDescription
namestringCompany legal name
displayNamestringDisplay name
descriptionstringFree-text description
emailstringPrimary email
phonestringPrimary phone
websitestringPrimary website URL
websitesarray of stringsAll websites
emailDomainsarray of stringsCorporate email domains used to auto-link customers
industrystringIndustry
companySizestringCompany size band
statusstringactive, inactive, or archived
typestringCompany type
tagsarray of stringsTags
notesstringInternal notes
addressobjectAddress fields: line1, line2, city, state, postalCode, country

Logo Upload

To set the company logo, send one of:

  • { "logo": "https://example.com/logo.png" } — URL to download
  • { "logo": "data:image/png;base64,iVBOR..." } — data URI
  • { "logoBase64": "<raw base64>", "logoMimeType": "image/png" } — raw base64 with MIME type
  • { "logo": "" } — remove the logo

Accepted image formats: JPEG, PNG, GIF, WebP. Maximum size 5 MB.

Example Request

curl -X PATCH "https://api.tiquo.app/api/v1/companies/COMP-000001" \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "displayName": "Acme Industries",
    "tags": ["enterprise", "priority"],
    "address": {
      "city": "Manchester",
      "country": "GB"
    }
  }'

Response

Returns the updated company object in the same shape as Get Company.

Error Responses

400 Bad Request

{
  "success": false,
  "error": "Invalid JSON body",
  "timestamp": "2025-01-15T10:30:00.000Z"
}

404 Not Found

{
  "success": false,
  "error": "Company not found with company number: COMP-999999",
  "timestamp": "2025-01-15T10:30:00.000Z"
}

401 Unauthorized

{
  "success": false,
  "error": "Missing or invalid API key",
  "timestamp": "2025-01-15T10:30:00.000Z"
}

Sur cette page