ShopIQ API Documentation
A comprehensive guide for integrating with the ShopIQ API — account management, third-party integrations, website deployment, AI image generation, and more.
Overview
The ShopIQ API is a RESTful JSON API that allows third-party partners to programmatically manage accounts, connect integrations, generate auto-login URLs, deploy AI-powered e-commerce websites, and generate/enhance product images using AI on the ShopIQ platform.
Key Concepts
Partner API Key
Each partner receives a unique API key for authentication. All requests must include this key.
Account (Admin)
Represents a ShopIQ user account. Partners can create, read, update, and delete accounts.
Integration
A connection between a ShopIQ account and a third-party service (e.g., your platform).
Webhooks
Asynchronous notifications sent to your server when long-running operations (like website deployment) complete.
Image API
AI-powered image generation and enhancement. Create product images from text prompts or enhance existing images.
Points & Billing
Image API operations consume points from your balance. Cost varies by plan tier and processing mode.
Base URLs
| Environment | Base URL |
|---|---|
Development | https://api-development.shopiq.dev |
Production | https://api.shopiq.app |
Partner Image API | https://api.shopiq.app/partner/v1 |
Content Type
All request and response bodies use JSON. Set the Content-Type header to application/json for all requests with a body.
Authentication
All API requests require authentication via an API key. Your API key is issued when your partner account is created. Include it in every request using one of the following methods:
Option 1: x-api-key Header (Recommended)
Option 2: Authorization Bearer Header
Image API Authentication
The Image API uses dedicated partner API keys with the prefix sq_live_ for production or sq_test_ for testing. These keys are managed through the Partner Dashboard and are separate from the account management API key.
| Header | Description | Required |
|---|---|---|
x-api-key | Your partner API key. | Yes (or use Authorization) |
Authorization | Bearer token format: Bearer | Yes (or use x-api-key) |
Content-Type | Must be application/json for POST/PUT/DELETE requests. | Yes |
X-API-Key | Partner Image API key (sq_live_* or sq_test_*) for /partner/v1/* endpoints. | Yes (Image API only) |
Authentication Errors
Rate Limiting
API requests are rate-limited per partner to ensure fair usage and platform stability. Limits are configured per partner account.
| Limit | Default | Description |
|---|---|---|
Requests per minute | 60 | Maximum number of requests allowed within a 60-second window. |
Requests per day | 10,000 | Maximum number of requests allowed within a 24-hour window. |
Rate Limit Error Response
Rate limits are applied per API key for the Image API. Each key has its own per-minute and per-day counters.
Error Handling
The API uses standard HTTP status codes. All error responses follow a consistent JSON structure.
Error Response Format
HTTP Status Codes
| Code | Meaning | When It Occurs |
|---|---|---|
200 | OK | Request succeeded. Response body contains the result. |
201 | Created | Resource successfully created (e.g., new account). |
202 | Accepted | Request accepted for async processing (e.g., website deployment). Result delivered via webhook. |
400 | Bad Request | Missing or invalid parameters in the request. |
401 | Unauthorized | Missing or invalid API key. |
402 | Payment Required | Insufficient points balance for the requested operation. |
403 | Forbidden | API key is valid but lacks permission for this endpoint, or partner is deactivated. |
404 | Not Found | The requested resource (account, integration) does not exist. |
409 | Conflict | Resource already exists (e.g., duplicate account, website already built). |
422 | Unprocessable Entity | Image generation blocked by safety filters. |
429 | Too Many Requests | Rate limit exceeded. Check retryAfter field. |
500 | Internal Server Error | Unexpected server error. Contact support if persistent. |
503 | Service Unavailable | AI service temporarily unavailable due to high demand. Retry shortly. |
Account Model
The Account (Admin) model represents a user on the ShopIQ platform. This is the data structure used by the Create Account and Update Account endpoints.
Personal Details
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email address of the account holder. Must be unique across the platform. |
mobileNumber | object | Yes | Phone number object. Must be unique across the platform. |
mobileNumber.value | string | Yes | The phone number digits (e.g., "9876543210"). |
mobileNumber.countryCode | number | Yes | Country calling code (e.g., 91 for India). |
firstName | string | No | User's first name. |
lastName | string | No | User's last name. |
profilePicture | string | No | URL of the user's profile picture. |
currency | string | No | Default currency symbol. Defaults to "₹". |
domains | string[] | No | List of custom domains associated with the account. |
legalName | string | No | User's full legal name. |
about | string | No | Short description or bio. |
socialMedia | object[] | No | Array of social media profiles. Each object: { name: string, url: string }. |
Business Details
| Field | Type | Required | Description |
|---|---|---|---|
businessName | string | No | Name of the business. |
typeOfBusiness | string | No | Primary type of business. |
businessCategory | string | No | Main business category. |
businessSubCategory | string[] | No | List of business sub-categories. |
address | object | No | Business address object. |
address.addLineOne | string | No | Address line 1. |
address.addLineTwo | string | No | Address line 2. |
address.city | string | No | City name. |
address.state | string | No | State or province. |
address.country | string | No | Country name. |
address.pincode | string | No | Postal / ZIP code. |
logoUrl | string | No | URL of the business logo. |
favicon | string | No | URL of the website favicon. |
Example Request Body
API Endpoints
1. Create Account
/api/v2/third-party/createAccountCreates a new user account on the ShopIQ platform. The email and mobile number must be unique — if either already exists, a 409 Conflict error is returned.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email address. Must be unique. |
mobileNumber | object | Yes | Object with value (string) and countryCode (number). Must be unique. |
firstName | string | No | User's first name. |
lastName | string | No | User's last name. |
businessName | string | No | Name of the business. |
... | — | No | All other Account Model fields are accepted. |
Example Request
Success Response — 201 Created
Error Responses
2. Delete Account
/api/v2/third-party/deleteAccountPermanently deletes a ShopIQ account. This action is irreversible. The account ID can be passed as a query parameter or in the request body.
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
accountId | query or body | string | Yes | The unique identifier of the account to delete. |
Example Request
Success Response — 200 OK
Error Responses
3. Update Account
/api/v2/third-party/updateAccountUpdates an existing ShopIQ account. Only the fields included in the request body will be modified — all other fields remain unchanged. If email or mobile number is updated, the new values are re-encrypted and re-hashed automatically.
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
accountId | query or body | string | Yes | The unique identifier of the account to update. |
... | body | — | No | Any Account Model field to update. |
Example Request
Success Response — 200 OK
Error Responses
4. Get Account by ID
/api/v2/third-party/getAccount/{accountId}Retrieves the full details of a specific ShopIQ account. Encrypted fields (email, phone) are automatically decrypted in the response.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | Yes | The unique identifier of the account. |
Example Request
Success Response — 200 OK
Error Responses
5. Check if Account Exists
/api/v2/third-party/isAccountCreatedChecks whether an account with the given email or phone number already exists on ShopIQ. At least one of email or phone must be provided. Both can be provided to check either.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Conditional | Email address to check. Required if phone is not provided. |
phone | string | Conditional | Phone number to check. Required if email is not provided. |
Example Request
Success Response — 200 OK
Error Responses
6. Connect Integration
/api/v2/third-party/connectIntegrationLinks a ShopIQ account to a supported third-party integration. Each integration has its own set of required credentials. All credentials are encrypted at rest on ShopIQ servers. If the integration already exists on the account, it will be updated with the new credentials.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
shopIQAccountId | string | Yes | The ShopIQ account ID to connect. |
integrationName | string | Yes | Name of the integration (see supported integrations below). |
credentials | object | Yes | Key-value pairs of the required credentials for the integration. |
Supported Integrations
Each integration requires specific credentials. The table below lists all currently supported integrations and their required credential fields.
| Integration Name | Display Name | Required Credentials |
|---|---|---|
yourIntegration | Your Integration | apiKey (string), userId (string) |
Contact the ShopIQ team to register your platform as a supported integration.
Example Request
Success Response — 200 OK
Error Responses
7. Disconnect Integration
/api/v2/third-party/disconnectIntegrationDisconnects a third-party integration from a ShopIQ account. This is a soft-disable — the integration record is preserved for history but access is revoked. The integration can be reconnected at any time using the Connect Integration endpoint.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
shopIQAccountId | string | Yes | The ShopIQ account ID. |
integrationName | string | Yes | Name of the integration to disconnect. |
Example Request
Success Response — 200 OK
Error Responses
8. Get Integration Status
/api/v2/third-party/integrationStatusRetrieves the connection status of integrations for a ShopIQ account. You can query a specific integration by name or omit the name to list all connected integrations.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
shopIQAccountId | string | Yes | The ShopIQ account ID. |
integrationName | string | No | Specific integration to check. If omitted, returns all integrations. |
Example — Check Specific Integration
Response — Specific Integration (Connected)
Response — Specific Integration (Not Connected)
Example — List All Integrations
Response — All Integrations
Error Responses
9. Generate Auto-Login URL
/api/v2/third-party/generateAutoLoginUrlGenerates a one-click login URL for a ShopIQ account. The URL contains a signed JWT token valid for 7 days. The user can be identified by account ID, email, or phone number — provide at least one.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | Conditional | ShopIQ account ID. Required if email and phone are not provided. |
email | string | Conditional | Account email. Required if accountId and phone are not provided. |
phone | string | Conditional | Account phone number. Required if accountId and email are not provided. |
At least one identifier must be provided. If multiple are provided, priority order is: accountId > email > phone.
Example Request
Success Response — 200 OK
Error Responses
10. Create & Deploy Website
/api/v2/third-party/createAndDeployTriggers the AI-powered website creation and deployment pipeline for a ShopIQ account. This is an asynchronous operation — the API responds immediately with a 202 status, and progress updates are delivered to your webhook URL as the build progresses.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | Yes | The ShopIQ account ID. |
businessCategory | string[] | Yes | Array of product categories (1–5). See Supported Categories section. |
brandName | string | Yes | The brand name for the store. |
webhookUrl | string | Yes | URL to receive deployment status webhooks. |
brandLogo | string | No | URL of the brand logo. If omitted, a text-based logo is generated. |
websiteType | string | No | Type of website. Only "ecommerce" is supported currently. |
webhookSecret | string | No | Secret for HMAC-SHA256 webhook signature verification. |
Example Request
Success Response — 202 Accepted
Error Responses
Supported E-Commerce Categories
The following categories are valid for the businessCategory field in the /createAndDeploy endpoint. You may select 1 to 5 categories per store. Values are case-sensitive and must match exactly.
Webhook Events
When using the /createAndDeploy endpoint, ShopIQ sends webhook notifications to your specified URL as the deployment progresses. If you provided a webhookSecret, each webhook includes an HMAC-SHA256 signature in the x-shopiq-signature header for verification.
Webhook Signature Verification
Event Types
| Event | Description | When |
|---|---|---|
website.building | AI has started building the website. | Immediately after pipeline starts. |
website.created | Website generated successfully. Deploying to production. | After AI generation completes. |
deployment.success | Website is live and accessible at the production URL. | After successful deployment. |
deployment.failed | Deployment failed. Check the error field for details. | If any step in the pipeline fails. |
Webhook Payload Examples
Image API
The Image API enables partners to generate new images from text prompts and enhance existing images using AI.
Key Features
Image Create
Generate product images, lifestyle shots, logos, and more from text prompts. Supports multiple aspect ratios and resolutions.
Image Enhance
Improve existing images — fix lighting, remove backgrounds, upscale quality, or apply specific edits using natural language.
Two Processing Modes
'Fast' mode for quick generation with template prompts. 'Thinking' mode uses AI to craft optimal prompts before generation.
Multiple Resolutions
Output images at 1K (1024px), 2K (2048px), or 4K (4096px) resolution. Higher resolutions produce sharper, more detailed results.
Authentication
The Image API uses dedicated partner API keys (prefixed with sq_live_ or sq_test_). These are managed through the Partner Dashboard. Include the key in the X-API-Key header or as a Bearer token in the Authorization header.
Supported Parameters
| Parameter | Values | Description |
|---|---|---|
aspectRatio | 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 | Output image aspect ratio. Default: 1:1 |
mode | fast, thinking | Processing mode. 'fast' uses template prompts, 'thinking' uses AI for prompt optimization. Default: fast |
resolution | 1k, 2k, 4k | Output resolution. 1k=1024px, 2k=2048px, 4k=4096px. Default: 1k |
Response Format
All Image API responses follow the standard ShopIQ response format with additional fields for points usage and processing metrics.
11. Image Create
/partner/v1/image/createGenerate a new image from a text prompt. The prompt is processed either directly (fast mode) or enhanced by AI (thinking mode) before being sent to the image generation model. The generated image is uploaded to S3 and a public URL is returned.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Text description of the image to generate. Min 3 characters, max 4000 characters. |
aspectRatio | string | No | Output aspect ratio. One of: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3. Default: 1:1 |
mode | string | No | Processing mode. 'fast' (direct generation) or 'thinking' (AI-enhanced prompt). Default: fast |
resolution | string | No | Output resolution. '1k' (1024px), '2k' (2048px), or '4k' (4096px). Default: 1k |
Processing Modes Explained
| Mode | How It Works | Best For | Cost |
|---|---|---|---|
fast | Your prompt is lightly wrapped with quality markers and sent directly to image model for generation. | Quick iterations, simple prompts, when you already have a detailed prompt. | 6–8 points (varies by tier) |
thinking | Your prompt is first sent to AI which analyzes it and generates a highly-detailed, optimized prompt. That enhanced prompt is then sent to image model. | Complex scenes, when you want the best possible output, short/vague prompts that need expansion. | 11–15 points (varies by tier) |
Example Request — Fast Mode
Example Request — Thinking Mode
Success Response — 200 OK
Error Responses
Notes
- Points are automatically refunded if image generation fails after deduction.
- Request timeout is 2 minutes. Complex prompts in thinking mode may take 30–60 seconds.
- Generated images are stored permanently on S3 with public-read access and 1-year cache headers.
- If AI fails in thinking mode, the system automatically falls back to fast mode.
12. Image Enhance
/partner/v1/image/enhanceEnhance one or more existing images using AI. Provide image URLs and an optional natural language request describing the desired improvements. The images are downloaded, processed through the AI pipeline, and the enhanced results are uploaded to S3.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
images | string[] | Yes | Array of image URLs to enhance. Must be valid HTTP/HTTPS URLs. Min 1, max 4 images. |
userRequest | string | No | Natural language description of desired enhancements. Max 2000 characters. If omitted, general quality enhancement is applied. |
aspectRatio | string | No | Output aspect ratio. One of: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3. Default: 1:1 |
mode | string | No | Processing mode. 'fast' (template-based) or 'thinking' (AI analyzes images and crafts prompt). Default: fast |
resolution | string | No | Output resolution. '1k' (1024px), '2k' (2048px), or '4k' (4096px). Default: 1k |
Processing Modes for Enhancement
| Mode | How It Works | Best For |
|---|---|---|
fast | A template-based enhancement prompt is generated from your userRequest and sent to image model along with the images. | Quick quality improvements, batch processing, when you have specific instructions. |
thinking | AI analyzes the actual images, identifies issues, and crafts a detailed enhancement prompt tailored to the specific content. That prompt is then sent to Image model. | Complex edits, when you want AI to determine the best approach, product photography cleanup. |
Example Request — Fast Mode
Example Request — Thinking Mode with Multiple Images
Example Request — No User Request (Auto-Enhance)
Success Response — 200 OK
Error Responses
Notes
- Images are downloaded from the provided URLs. Ensure they are publicly accessible.
- Maximum image download size is 50MB per image.
- Supported input formats: JPEG, PNG, GIF, WebP.
- Output is always PNG format for maximum quality.
- Points are automatically refunded if enhancement fails after deduction.
- The number of output images may differ from input — the model may combine or produce additional variations.
- If AI fails in thinking mode, the system automatically falls back to fast mode.
13. Image Usage Stats
/partner/v1/image/usageRetrieve usage statistics for the Image API, including call counts, points balance, current pricing tier, and active point buckets. This endpoint does not consume any points.
Request
Success Response — 200 OK
Response Fields
| Field | Type | Description |
|---|---|---|
last30Days.imageCreations | number | Number of image create calls in the last 30 days. |
last30Days.imageEnhancements | number | Number of image enhance calls in the last 30 days. |
points.balance | number | Current total points balance across all buckets. |
points.totalUsed | number | Total points consumed since account creation. |
points.monthlyUsage | object | Points used in the current calendar month. |
currentPricing | object | null | Pricing for the current active bucket. Null if no active buckets. |
activeBuckets | array | List of point buckets with remaining balance, ordered by purchase date (FIFO). |
allTierPricing | object | Complete pricing table for all tiers for reference. |
Image API Pricing Tiers
The Image API uses a points-based billing system. Points are purchased in packages (buckets), and each package corresponds to a pricing tier. The cost per operation depends on which tier your points come from. Points are consumed in FIFO order — the oldest bucket is used first.
Available Packages
| Package | Points | Price | Tier |
|---|---|---|---|
Starter | 5,000 | ₹5,000 | starter |
Growth | 25,000 | ₹25,000 | growth |
Scale | 1,00,000 | ₹1,00,000 | scale |
Cost Per Operation by Tier
| Operation | Starter (₹5K) | Growth (₹25K) | Scale (₹1L) |
|---|---|---|---|
Image Create — Fast | 8 points | 7.25 points | 6 points |
Image Create — Thinking | 15 points | 14 points | 11 points |
Image Enhance — Fast | 8 points | 7.25 points | 6 points |
Image Enhance — Thinking | 15 points | 14 points | 11 points |
How Billing Works
- FIFO Bucket System: Points are deducted from the oldest active bucket first. The cost is determined by the tier of the bucket being deducted from.
- Multiple Buckets: You can have multiple active buckets from different tiers. If your oldest bucket runs out mid-operation, the remaining cost is deducted from the next bucket.
- Automatic Refunds: If an operation fails after points are deducted, the points are automatically refunded to your account.
- No Expiry: Purchased points do not expire. Use them at your own pace.
Example: Cost Calculation
Image API Test Mode
When using a test API key (prefixed with sq_test_), the Image API operates in test mode. In this mode:
- No AI models are triggered — responses are instant.
- No points are deducted from your balance.
- Static placeholder images are returned instead of generated images.
- All validation rules still apply (prompt length, aspect ratio, etc.).
- Rate limiting still applies to prevent abuse.
- Responses include a
testMode: trueflag.
Test Mode Response Example
When to Use Test Mode
| Use Case | Key Type |
|---|---|
Integration development & testing | sq_test_* (test key) |
Verifying request/response format | sq_test_* (test key) |
CI/CD pipeline tests | sq_test_* (test key) |
Production image generation | sq_live_* (live key) |
Actual image enhancement | sq_live_* (live key) |
Creating API Keys
API keys are managed through the Partner Dashboard. You can create up to 10 active keys per account. Each key can be designated as either "live" or "test" environment. Keys can be revoked at any time from the dashboard.
Changelog
- Added
/partner/v1/image/createendpoint for AI image generation from text prompts. - Added
/partner/v1/image/enhanceendpoint for AI-powered image enhancement. - Added
/partner/v1/image/usageendpoint for usage statistics and pricing info. - Introduced plan-based pricing tiers (Starter, Growth, Scale) with FIFO bucket system.
- Added "thinking" mode with AI prompt enhancement for superior image quality.
- Added multi-resolution support (1K, 2K, 4K output).
- Added test mode with
sq_test_*keys for development without consuming points. - Added automatic point refunds on failed operations.
- Added generic
/connectIntegrationendpoint supporting any registered partner. - Added
/disconnectIntegrationendpoint for soft-disabling integrations. - Added
/integrationStatusendpoint for checking connection status. - Added partner-level API key authentication with per-endpoint permissions.
- Added rate limiting (per-minute and per-day).
- Added
/generateAutoLoginUrlendpoint. - Added
/createAndDeployendpoint with webhook-based async deployment. - Initial release of third-party API.
