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.

Introduction

The Ecomdrop IA Connector provides a set of internal API endpoints for managing product synchronization, order processing, and integration workflows between Shopify stores and Ecomdrop/Dropi platforms. All API endpoints are built using Remix/React Router conventions and require proper Shopify authentication except where explicitly noted.

Base URL

https://your-app-domain.com
The base URL is configured via the SHOPIFY_APP_URL environment variable during app installation.

API Architecture

Authentication Patterns

The API uses three authentication methods depending on the endpoint type:
  1. Shopify Admin API Authentication - For admin-facing endpoints (/api/*)
  2. Webhook Authentication - For Shopify webhook handlers (/webhooks/*)
  3. External API Key Authentication - For callback endpoints (/api/ecomdrop/callback)
See the Authentication page for detailed implementation.

Request/Response Format

Content Type

All API endpoints accept and return JSON unless specified otherwise:
Content-Type: application/json
Some endpoints accept multipart/form-data for product import operations.

Standard Response Structure

Successful responses follow this pattern:
{
  "success": true,
  "data": { ... },
  "message": "Operation completed successfully"
}
Error responses:
{
  "success": false,
  "error": "Error message describing what went wrong"
}

API Endpoints

Product Management

/api/shopify/products
Fetch all products from the authenticated Shopify store.Authentication: Shopify Admin APIResponse:
{
  "success": true,
  "products": [
    {
      "id": "gid://shopify/Product/123",
      "title": "Product Name",
      "handle": "product-handle",
      "status": "ACTIVE",
      "featuredImage": {
        "url": "https://...",
        "altText": "..."
      },
      "variants": [...]
    }
  ]
}
/api/dropi/products
Fetch products from Dropi marketplace.Authentication: Shopify Admin API + Dropi TokenQuery Parameters:
  • pageSize (number): Items per page (default: 50)
  • startData (number): Pagination offset (default: 0)
  • keywords (string): Search query
  • privated_product (boolean): Show private products
  • favorite (boolean): Show favorited products
Response:
{
  "products": [...],
  "total": 150,
  "pageSize": 50,
  "startData": 0
}
/api/products/import
Link a Dropi product with a Shopify product.Authentication: Shopify Admin APIRequest Body (FormData):
  • dropiProductId: Dropi product identifier
  • dropiProductData: JSON string of product data
  • shopifyProductId: Shopify product GID
  • dropiVariations: JSON array of variations
  • variantAssociations: JSON array of mappings
  • saveDropiName: Boolean to sync name
  • saveDropiDescription: Boolean to sync description
  • useSuggestedBarcode: Boolean for barcode handling
  • saveDropiImages: Boolean to import images
Response:
{
  "success": true,
  "association": {
    "id": "...",
    "dropiProductId": "...",
    "shopifyProductId": "...",
    "importType": "link"
  },
  "message": "Producto sincronizado exitosamente"
}
/api/products/association/delete
Remove a product association between Dropi and Shopify.Request Body (FormData):
  • associationId: Association record ID
Response:
{
  "success": true,
  "message": "Asociación eliminada exitosamente",
  "associationId": "..."
}

Order Management

/api/orders/poll
Retrieve recent orders from Shopify for manual polling.Authentication: Shopify Admin APIResponse:
{
  "success": true,
  "orders": [...],
  "count": 10
}
Returns the 10 most recent orders with full line items, customer, and shipping information.

Integration Configuration

/api/integrations/dropi/save
Save or update Dropi integration settings.Request Body (FormData):
  • store_name: Dropi store name
  • country: Country code (CO, EC, CL, GT, MX, PA, PE, PY)
  • dropi_token: Dropi API integration token
Response:
{
  "success": true,
  "configuration": {
    "shop": "store.myshopify.com",
    "dropiStoreName": "...",
    "dropiCountry": "CO",
    "dropiToken": "..."
  }
}

Webhook Callbacks

/api/ecomdrop/callback
Receive order processing completion notifications from Ecomdrop.Authentication: API Key (X-ACCESS-TOKEN or in payload)Request Body:
{
  "apiKey": "ecomdrop_api_key",
  "orderName": "#1014",
  "orderId": "gid://shopify/Order/123",
  "shop": "store.myshopify.com",
  "status": "success",
  "tag": "ecomdrop-processed"
}
Response:
{
  "success": true,
  "message": "Tags added successfully: ecomdrop-processed",
  "orderId": "gid://shopify/Order/123",
  "tags": ["ecomdrop-processed"]
}

Error Handling

HTTP Status Codes

CodeDescription
200Success
400Bad Request - Invalid parameters
401Unauthorized - Missing or invalid authentication
403Forbidden - Valid auth but insufficient permissions
404Not Found - Resource does not exist
405Method Not Allowed
500Internal Server Error

Common Error Scenarios

Session Errors: All authenticated endpoints return 401 with "No shop session found" if the Shopify session is invalid or expired.
Missing Configuration: Integration endpoints return 400 when required API keys or tokens are not configured.
Protected Data Access: Some endpoints may return 403 if the app hasn’t been approved for accessing protected customer data by Shopify.

Rate Limiting

The app implements caching mechanisms to prevent rate limiting:
  • Ecomdrop Flows: Cached for 60 seconds
  • Shopify API: Subject to Shopify’s native rate limits (2 requests/second for REST, 1000 points/second for GraphQL)

Versioning

The API uses Shopify API version 2025-10 (October 2025). This is configured in shopify.server.ts:
apiVersion: ApiVersion.October25
API version updates should be coordinated with Shopify’s release schedule and deprecation notices.

GraphQL vs REST

The app primarily uses Shopify’s GraphQL Admin API for all operations:
  • Product queries and mutations
  • Order queries
  • Customer data access
  • Variant management
REST API is only used for:
  • Legacy webhook processing (if configured)
  • Specific endpoints not yet available in GraphQL

Data Flow

Next Steps

Authentication

Learn about OAuth flow and session management

Webhooks

Configure webhook handlers for events