Use this API documentation hub to guide developers through authentication, REST endpoints, AI Commerce execution, subscription access, license validation, webhooks, error handling, versioning and production integration best practices. Use these cards as entry points for developer documentation, module-specific API references and integration guides. Execute AI features, route providers, track credits, validate quota and return module responses. Read plans, check subscription status, handle trials, upgrades, renewals and customer access. Validate license keys, domain access, module downloads, plan entitlements and customer permissions. Document payloads for payment changes, subscription updates, quota alerts and AI execution events. Describe helper classes, service contracts, client wrappers, DTOs, retries and response mapping. Use AI Search endpoints for query understanding, suggestions, product matching and no-result recovery. Generate product copy, category content, metadata, SEO text, prompts and approval workflow data. Expose usage, quota, subscription, AI module performance, error logs and conversion signals. Use this section to explain the standard developer workflow before connecting MageHQ APIs to Magento modules, storefront components or external systems. Generate an integration token or module API key, assign the correct ACL permissions and store credentials securely. Choose the correct store view, customer context, plan access, AI feature key, provider route and quota behavior. Use JSON payloads, idempotency keys for write operations, retry-safe design and clear error handling. Check response status, quota usage, provider metadata, execution logs, fallback behavior and customer-facing output. Replace these placeholder routes with your exact Magento REST paths as your product API contracts become final. Run an AI module through AI Commerce OS with plan, quota and provider routing. Return active plan, allowed modules, trial status, renewal status and entitlement metadata. Return available credits, used credits, current period, feature limits and reset date. Validate module access, license key, domain, plan entitlement and download eligibility. Handle billing, quota, license, AI execution or plan access changes from MageHQ services. Return the correct download package for a plan instead of forcing customers to download each module separately. Keep API documentation consistent so developers know how to build integrations, handle failures and debug production issues. Define required fields, optional fields, store context, customer context, feature keys and validation rules. Return normalized output, usage details, module metadata, provider details and trace identifiers. Use predictable error codes for authentication, quota, validation, provider failures and permission issues. Use these topic cards to build deeper documentation pages for each technical concern. Document security expectations clearly before allowing integrations to access customer, order, payment, subscription or AI provider data. Use this checklist to harden API integrations before production launch. Make API failures recoverable and visible to developers without breaking customer journeys. Use these support cards to guide developers and merchants to the right next action. Get help connecting MageHQ APIs to Magento, ERP, CRM, SaaS platforms or custom applications. Create custom endpoints, service contracts, webhooks, admin tools and integration workflows for your store. Keep integrations stable with monitoring, release notes, version updates, compatibility checks and troubleshooting. Tell MageHQ what you need to connect: AI Commerce OS, AI modules, subscriptions, licenses, payments, plan downloads, customer access, webhooks or external systems. We will help you define the right API documentation and implementation roadmap.API documentation for connecting Magento, AI Commerce and external systems with reliable developer workflows
Connect MageHQ modules to Magento workflows and external platforms
Choose the API area you need
AI Commerce API
Subscription API
License API
Webhook Events
Developer SDK
Search API
Content API
Reporting API
API integration flow for Magento developers
Create API credentials
Authorization: Bearer <access_token>
Content-Type: application/json
Accept: application/jsonSelect the API scope
Send the request
{
"store_id": 1,
"feature": "ai_search",
"input": {
"query": "black running shoes",
"customer_group_id": 1
}
}Validate response and logs
Example API endpoints for MageHQ documentation pages
Execute AI feature
{
"feature": "ai_content",
"store_id": 1,
"input": {
"entity_type": "product",
"entity_id": 123
}
}Get subscription access
{
"customer_id": 25,
"plan": "AI Growth",
"status": "active",
"modules": ["ai_search", "ai_chatbot"]
}Check AI quota
{
"credits_total": 100000,
"credits_used": 24880,
"credits_remaining": 75120,
"reset_at": "2026-07-01T00:00:00Z"
}Validate license
{
"license_key": "XXXX-XXXX-XXXX",
"domain": "example.com",
"module": "Magehq_AISearch"
}Receive webhook event
{
"event": "subscription.updated",
"id": "evt_123",
"created_at": "2026-06-16T10:00:00Z",
"data": {}
}Get module download package
{
"plan_id": 3,
"download_type": "plan",
"package": "magehq-ai-growth-suite.zip"
}Document request schemas, response models and error formats
Request schema
{
"store_id": 1,
"customer_id": 25,
"feature": "ai_search",
"input": {}
}Success response
{
"success": true,
"result": {},
"usage": {
"credits": 120,
"provider": "openai"
},
"trace_id": "api_abc123"
}Error response
{
"success": false,
"error": {
"code": "quota_exceeded",
"message": "AI quota has been exceeded."
},
"trace_id": "api_err_123"
}Quick links for common API documentation needs
Build API integrations that are safe for Magento production stores
API security requirements
Production error strategy
Move from API documentation to real integration work
API implementation support
Custom API development
API maintenance
Need help designing or documenting a MageHQ API?