The Theme API provides endpoints for installing themes from remote URLs and serving temporary theme files.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Mercaline2024/Ecomdrop-ia-connector-2/llms.txt
Use this file to discover all available pages before exploring further.
Install Theme
Installs a theme from a URL to the authenticated Shopify store. Supports public URLs and private GitHub repositories.Request Body (Form Data)
URL of the theme ZIP file or GitHub API URL for private repositoriesFormats:
- Public URL:
https://example.com/theme.zip - Private GitHub:
github-api://owner/repo/branch?token=YOUR_TOKEN
Name for the installed theme
Response
Whether the theme was installed successfully
Success message
Installed theme information from Shopify
Error message (if success is false)
Example Request
Example Response
Themes are installed as unpublished by default. Users must activate them manually from the Shopify admin.
GitHub Private Repository Setup
To install themes from private GitHub repositories:- Create a GitHub personal access token with
reposcope - Use the special URL format:
github-api://owner/repo/branch?token=YOUR_TOKEN - The app will:
- Verify token access to the repository
- Download the ZIP archive from GitHub
- Create a temporary public URL for Shopify to download from
- Install the theme via Shopify REST API
Process Flow
- URL Validation: Verifies the theme URL is accessible
- Download (for private repos): Downloads the theme ZIP from GitHub
- Temporary Storage: Stores the ZIP in memory cache (5-minute expiration)
- Public URL: Creates a temporary public endpoint for Shopify
- Installation: Shopify downloads and installs the theme
- Cleanup: Removes temporary files after 10 minutes
Download Theme File
Serves a temporary theme ZIP file for Shopify to download during installation. This endpoint is used internally by the install process.Path Parameters
Temporary file ID generated during the install process
Response
Returns the theme ZIP file with appropriate headers for download.Response Headers
Content-Type: application/zipContent-Disposition: attachment; filename=“ecomdrop-theme-2.5.zip”Content-Length: File size in bytesCache-Control: no-cache, no-store, must-revalidateAccess-Control-Allow-Origin: * (allows Shopify to download)
Example Response
This endpoint is called automatically by Shopify during theme installation. You don’t need to call it directly.
Security Notes
- Files are stored in memory cache, not on disk
- Each file has a unique random ID
- Files expire after 5 minutes
- Expired files are automatically cleaned up
- CORS is enabled to allow Shopify access