CSV Cleaner

API Reference

Programmatic access to the Shopify CSV Cleaner. Requires a Pro subscription.

Authentication

Pass your API key in the X-Api-Key request header, or use a JWT Bearer token via the Authorization header. Both require an active Pro subscription.

X-Api-Key: YOUR_API_KEY\n# or\nAuthorization: Bearer YOUR_JWT

Endpoints

POST/api/process
API key or JWT

Upload a CSV file and receive a cleaned version. Multipart form data.

curl -X POST https://shopifycsvclean.com/api/process \
  -H "X-Api-Key: YOUR_API_KEY" \
  -F "file=@products.csv" \
  -F 'options={"fix_encoding":true,"generate_handles":true}'

Response

{
  "status": "success",
  "rows": 120,
  "total_errors": 4,
  "error_count": 2,
  "warning_count": 2,
  "download": "https://...",
  "filename": "cleaned_products.csv",
  "diff_url": "/api/diff/diff_cleaned_products.csv.json",
  "source_detected": "shopify",
  "issues": [ ... ],
  "error_previews": { ... }
}

Options (all default true):

  • fix_encodingRepair UTF-8 byte sequences
  • generate_handlesSlugify titles into Handle column
  • generate_skusBuild unique SKUs from handle + options
  • fix_image_urlsPrepend https:// to bare image URLs
  • normalize_variantsPropagate Option names across rows
  • fix_priceStrip symbols, fix comma decimals
GET/api/templates

Return the list of blank Shopify CSV templates.

curl https://shopifycsvclean.com/api/templates
GET/api/templates/{id}

Download a blank template CSV by ID (general, apparel, digital-downloads, food-beverage, electronics).

GET/api/history
JWT

Return the processing history for the authenticated Pro user (last 50 jobs).

curl https://shopifycsvclean.com/api/history \
  -H "Authorization: Bearer YOUR_JWT"
POST/api/auth/generate-api-key
JWT

Generate or rotate the API key for the authenticated Pro account.

curl -X POST https://shopifycsvclean.com/api/auth/generate-api-key \
  -H "Authorization: Bearer YOUR_JWT"

Error responses

All errors return JSON with a detail key.

{
  "detail": "File too large. Maximum size is 10 MB."
}
StatusMeaning
400Bad request — invalid file or parameters
401Missing or invalid credentials
402Payment required — Pro subscription needed
413File too large (max 10 MB)
429Rate limit exceeded
500Internal server error

Rate limits

Pro/API-key requests: 60 req/min per IP. Unauthenticated requests: 10 req/min per IP. Exceeded requests receive a 429 with a Retry-After: 60 header.