Skip to main content

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.

The Theme API provides endpoints for installing themes from remote URLs and serving temporary theme files.

Install Theme

Installs a theme from a URL to the authenticated Shopify store. Supports public URLs and private GitHub repositories.
POST /api/theme/install

Request Body (Form Data)

themeUrl
string
required
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
themeName
string
default:"Ecomdrop Theme 2.5"
Name for the installed theme

Response

success
boolean
Whether the theme was installed successfully
message
string
Success message
theme
object
Installed theme information from Shopify
error
string
Error message (if success is false)

Example Request

curl -X POST https://your-app.com/api/theme/install \
  -F "themeUrl=https://example.com/theme.zip" \
  -F "themeName=My Custom Theme"

Example Response

{
  "success": true,
  "message": "Tema instalado exitosamente. Puedes activarlo desde Temas > Personalizar.",
  "theme": {
    "id": 123456789,
    "name": "Ecomdrop Theme 2.5",
    "role": "unpublished",
    "created_at": "2026-03-04T10:30:00-05:00"
  }
}
Themes are installed as unpublished by default. Users must activate them manually from the Shopify admin.
For private GitHub repositories, ensure your personal access token has the repo scope and access to the repository.

GitHub Private Repository Setup

To install themes from private GitHub repositories:
  1. Create a GitHub personal access token with repo scope
  2. Use the special URL format: github-api://owner/repo/branch?token=YOUR_TOKEN
  3. 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

  1. URL Validation: Verifies the theme URL is accessible
  2. Download (for private repos): Downloads the theme ZIP from GitHub
  3. Temporary Storage: Stores the ZIP in memory cache (5-minute expiration)
  4. Public URL: Creates a temporary public endpoint for Shopify
  5. Installation: Shopify downloads and installs the theme
  6. 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.
GET /api/theme/download/:id

Path Parameters

id
string
required
Temporary file ID generated during the install process

Response

Returns the theme ZIP file with appropriate headers for download.

Response Headers

  • Content-Type: application/zip
  • Content-Disposition: attachment; filename=“ecomdrop-theme-2.5.zip”
  • Content-Length: File size in bytes
  • Cache-Control: no-cache, no-store, must-revalidate
  • Access-Control-Allow-Origin: * (allows Shopify to download)

Example Response

Content-Type: application/zip
Content-Disposition: attachment; filename="ecomdrop-theme-2.5.zip"
Content-Length: 2458624

[Binary ZIP data]
This endpoint does not require authentication to allow Shopify servers to download the file. Files automatically expire after 5 minutes for security.
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

Build docs developers (and LLMs) love