Skip to main content

Overview

The company registration endpoint allows property management companies to onboard themselves to the Arqqin platform. This creates a company record in the system and is typically the first step before you can start managing locations and vehicle whitelists.
Company registration requires an API key for authentication. Contact [email protected] to obtain a registration API key.

Registration Process

Step 1: Prepare Company Information

Gather the following required information:
  • Company details: Name, slug, business address
  • Optional details: External company ID, description, contact information, logo
  • Settings: Company-specific configuration (optional)

Step 2: Register Your Company

curl -X POST "https://apistg.arqq.in/api/register/company" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Downtown Property Management",
    "slug": "downtown-pm",
    "externalCompanyId": "EXT_12345",
    "description": "Premium property management services",
    "address": "123 Business Street, Dubai",
    "phone": "+1234567890",
    "email": "[email protected]",
    "website": "https://downtownpm.com",
    "logo": "https://storage.example.com/logo.png",
    "settings": {}
  }'

Step 3: Registration Complete

After successful registration, you’ll receive confirmation with your company details:
{
  "success": true,
  "message": "Company created successfully",
  "data": {
    "companyId": "k17abc123def456ghi789jkl012mno345"
  }
}
After registration, you can use the /companies endpoint to list your registered companies and begin adding locations.

Required Fields

name
string
required
Your company’s display name (1-100 characters, alphanumeric with spaces and common symbols)
slug
string
required
URL-friendly company identifier (lowercase letters, numbers, hyphens only, 1-50 characters)
address
string
required
Your company’s business address (1-200 characters)

Optional Fields

externalCompanyId
string
External system reference ID (max 50 characters)
description
string
Company description (max 500 characters)
phone
string
Company phone number (max 20 characters)
email
string
Company email address (must be valid email format or empty string)
website
string
Company website URL (must be valid URL or empty string)
Company logo URL (must be valid URL or empty string)
settings
object
Company-specific settings (optional object)

Validation Rules

Company Name Format

  • Must contain only alphanumeric characters, spaces, and common symbols: -&.,()
  • Must be between 1-100 characters
  • Cannot be empty or only whitespace

Company Slug Format

  • Must contain only lowercase letters, numbers, and hyphens
  • Cannot start or end with a hyphen
  • Cannot contain consecutive hyphens (--)
  • Must be between 1-50 characters
  • Must be unique across all companies

Address Requirements

  • Must be between 1-200 characters
  • Cannot be empty or only whitespace

Optional Field Validation

  • Email: Must be valid email format or empty string
  • Website/Logo: Must be valid URL format or empty string
  • Phone: Maximum 20 characters
  • Description: Maximum 500 characters
  • External Company ID: Maximum 50 characters

Common Errors

Company Slug Already Exists

{
  "success": false,
  "error": {
    "code": "CONFLICT_ERROR",
    "message": "Company slug already exists"
  }
}
Solution: Choose a different company slug that’s unique.

Invalid Company Name

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Company name contains invalid characters"
  }
}
Solution: Ensure the company name only contains alphanumeric characters, spaces, and allowed symbols.

Invalid Address

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Business address is required"
  }
}
Solution: Provide a valid business address between 1-200 characters.

Invalid Slug Format

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Company slug must contain only lowercase letters, numbers, and hyphens"
  }
}
Solution: Ensure your slug follows the format requirements (lowercase, alphanumeric, hyphens only).

Error Handling Best Practices

async function registerCompanyWithErrorHandling(companyData) {
  try {
    const response = await fetch('https://apistg.arqq.in/api/register/company', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify(companyData)
    });

    const result = await response.json();

    if (!response.ok) {
      // Handle specific error cases
      if (result.error?.code === 'CONFLICT') {
        if (result.error.message.includes('slug')) {
          throw new Error('Company slug already taken. Please choose a different one.');
        }
        if (result.error.message.includes('email')) {
          throw new Error('Email already registered. Please use a different email.');
        }
      }

      if (result.error?.code === 'VALIDATION_ERROR') {
        throw new Error(`Invalid input: ${result.error.message}`);
      }

      throw new Error(result.error?.message || 'Registration failed');
    }

    return result;
  } catch (error) {
    console.error('Company registration error:', error.message);
    throw error;
  }
}

Next Steps

After successful company registration:
  1. Add your first location - Use the Location Management guide
  2. Set up vehicle whitelists - Follow the Whitelist Management guide
  3. Integrate with your system - Check out Integration Examples

Testing Your Registration

You can test the registration process using the staging environment:
  • Staging URL: https://apistg.arqq.in/api/register/company
  • Use test data during development
  • The staging environment is isolated from production data
During development, use obviously fake company names and email addresses to avoid confusion with real data.