API Reference

Complete reference documentation for all GulfTaxes API endpoints, parameters, and response formats.

Authentication

POST/api/auth/login

Authenticate user and return access token.

Request Body

{
  "email": "user@example.com",
  "password": "password123"
}

Response

{
  "success": true,
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "user": {
    "id": "123",
    "email": "user@example.com",
    "role": "user"
  }
}

VAT Calculator

GET/tools/vat/settings

Get VAT settings for all countries or specific country.

Query Parameters

  • country (optional) - Country code (uae, saudi, qatar, etc.)

Response

{
  "countries": [
    {
      "code": "uae",
      "name": "United Arab Emirates",
      "vatRate": 5,
      "currency": "AED",
      "threshold": 375000,
      "filingPeriod": "quarterly"
    }
  ]
}
POST/tools/vat/calc

Calculate VAT for a transaction.

Request Body

{
  "country": "uae",
  "amount": 1000,
  "vatType": "standard",
  "includesVat": false,
  "description": "Professional services"
}

Response

{
  "country": "uae",
  "baseAmount": 1000,
  "vatRate": 5,
  "vatAmount": 50,
  "totalAmount": 1050,
  "currency": "AED",
  "formatted": {
    "base": "AED 1,000.00",
    "vat": "AED 50.00",
    "total": "AED 1,050.00"
  }
}

Corporate Tax

POST/tools/ct/calc

Calculate corporate tax liability with deductions and adjustments.

Request Body

{
  "country": "uae",
  "revenue": 5000000,
  "expenses": [
    {
      "category": "salaries",
      "amount": 1000000,
      "description": "Employee costs"
    },
    {
      "category": "rent",
      "amount": 200000,
      "description": "Office rent"
    }
  ],
  "adjustments": []
}

Response

{
  "country": "uae",
  "grossRevenue": 5000000,
  "totalDeductions": 1200000,
  "taxableIncome": 3800000,
  "taxRate": 9,
  "taxLiability": 342000,
  "currency": "AED",
  "breakdown": {
    "allowedDeductions": 1200000,
    "disallowedDeductions": 0,
    "netAdjustments": 0
  }
}

Country Data

GET/country/content

Get comprehensive country-specific tax information.

Query Parameters

  • country (required) - Country code

Response

{
  "country": "uae",
  "capabilities": {
    "hasVat": true,
    "hasCorporateTax": true,
    "hasExciseTax": true,
    "hasWithholdingTax": true
  },
  "facts": [
    {
      "label": "VAT Rate",
      "value": "5%"
    }
  ],
  "pricing": {
    "currency": "AED",
    "symbol": "د.إ",
    "decimals": 2
  }
}

Export

POST/export/pdf

Export calculation results as PDF report.

Request Body

{
  "type": "vat",
  "data": {
    "country": "uae",
    "amount": 1000,
    "vatAmount": 50,
    "totalAmount": 1050
  },
  "format": "detailed"
}

Response

{
  "success": true,
  "downloadUrl": "https://api.gulftaxes.com/files/report_123.pdf",
  "expiresAt": "2025-01-15T10:30:00Z",
  "fileSize": 245760,
  "hash": "sha256:abc123..."
}

Admin Management

GET/admin/countries/capabilities

Get country tax capabilities and regime settings.

Response

{
  "countries": [
    {
      "country_slug": "uae",
      "has_vat": true,
      "has_corporate_tax": true,
      "has_excise_tax": true,
      "has_withholding_tax": true,
      "has_einvoicing": true
    }
  ]
}
POST/admin/countries/content

Create or update country-specific content.

Request Body

{
  "country_slug": "uae",
  "content_type": "facts",
  "data": {
    "label": "VAT Rate",
    "value": "5%",
    "description": "Standard VAT rate"
  }
}

Response

{
  "success": true,
  "id": "fact_123",
  "message": "Content created successfully"
}

Corporate Tax Advanced

GET/ct/natures

Get available expense natures for corporate tax calculations.

Response

{
  "natures": [
    {
      "id": "salaries",
      "name": "Salaries and Wages",
      "category": "personnel",
      "deductible": true
    },
    {
      "id": "rent",
      "name": "Office Rent",
      "category": "operational",
      "deductible": true
    }
  ]
}
POST/ct/rules

Process corporate tax rules and deductions.

Request Body

{
  "country": "uae",
  "expenses": [
    {
      "nature": "meals",
      "amount": 10000,
      "description": "Business meals"
    }
  ]
}

Response

{
  "processed_expenses": [
    {
      "nature": "meals",
      "original_amount": 10000,
      "allowable_amount": 5000,
      "rule_applied": "50% limitation",
      "citation": "UAE CT Law Article 15"
    }
  ]
}
POST/ct/scenario/save

Save corporate tax calculation scenario for future reference.

Request Body

{
  "name": "Q4 2024 Calculation",
  "country": "uae",
  "revenue": 5000000,
  "expenses": [...],
  "user_id": "user_123"
}

Response

{
  "success": true,
  "scenario_id": "scenario_456",
  "share_url": "/ct/scenario/scenario_456"
}

Excise Tax & E-invoicing

POST/tools/excise/calc

Calculate excise tax for tobacco, carbonated drinks, and energy drinks.

Request Body

{
  "country": "uae",
  "products": [
    {
      "category": "tobacco",
      "quantity": 1000,
      "unit": "pack",
      "price_per_unit": 25
    }
  ]
}

Response

{
  "country": "uae",
  "total_excise_tax": 25000,
  "products": [
    {
      "category": "tobacco",
      "excise_rate": "100%",
      "excise_amount": 25000,
      "total_with_excise": 50000
    }
  ]
}
POST/tools/einvoice/get

Get e-invoicing requirements and compliance status by country.

Request Body

{
  "country": "saudi",
  "business_type": "b2b",
  "annual_revenue": 5000000
}

Response

{
  "country": "saudi",
  "einvoice_required": true,
  "implementation_phase": "Phase 2",
  "compliance_deadline": "2024-01-01",
  "portal_url": "https://zatca.gov.sa",
  "requirements": [
    "Real-time integration",
    "Digital signatures",
    "QR code generation"
  ]
}

Analytics & SEO

GET/analytics/overview

Get platform usage analytics and calculation statistics.

Response

{
  "total_calculations": 15420,
  "active_users": 1250,
  "popular_tools": [
    {"tool": "vat_calculator", "usage": 8500},
    {"tool": "ct_calculator", "usage": 4200},
    {"tool": "excise_calculator", "usage": 2720}
  ],
  "country_breakdown": {
    "uae": 6500,
    "saudi": 4200,
    "qatar": 2100,
    "oman": 1500,
    "bahrain": 800,
    "kuwait": 320
  }
}
POST/seo/get

Get SEO metadata and structured data for country pages.

Request Body

{
  "country": "uae",
  "page_type": "country_landing"
}

Response

{
  "title": "UAE Tax Advisory Services | GulfTaxes",
  "description": "Expert UAE tax advisory...",
  "canonical": "https://gulftaxes.com/countries/uae",
  "structured_data": {
    "@type": "Organization",
    "name": "GulfTaxes UAE",
    "serviceArea": "United Arab Emirates"
  },
  "hreflang": [
    {"lang": "en", "url": "/countries/uae"},
    {"lang": "ar", "url": "/ar/countries/uae"}
  ]
}