Goal
Automate Shopify hosting through the same guarded project service used by the dashboard.Prerequisites
- An authenticated StackShift session
- Access to the target project
- An active subscription
Workflow
1
Create or read the project’s Shopify connection.
2
Save target configuration and credentials with PUT requests.
3
Queue connect and verification work and poll their operation IDs until succeeded or failed.
4
Read releases, webhook observations, analytics, or submit guarded retries and promotions.
Authentication, authorization, and envelopes
- Every route is under an authenticated project context and requires an active, non-paused subscription.
- Reads require project access; writes require project mutation permission. An inaccessible project is concealed as not found by the project context.
- Success responses use the standard StackShift envelope with
success,status,status_code,message, anddata. - JSON bodies are limited to 64 KiB, reject unknown fields, and must contain exactly one JSON value.
- Connect and verification return HTTP 202 operations. Supply
Idempotency-Keyto control replay identity; reusing a key with different input returns a conflict. - Connect accepts optional
settings, but only the documented storefront/settings keys are valid and credential-shaped keys are always rejected.
Endpoints
Core request bodies
Promote preview
States and secret semantics
- Connection/verification:
pending,ready,invalid, ordisabled. Operation:queued,running,succeeded, orfailed. - Release:
queued,running,healthy,failed,degraded, orcancelled. - Stored secrets are write-only. Environment responses expose only
has_client_secret,has_automation_token,has_public_storefront_token,has_private_storefront_token,has_customer_account_secret, andhas_session_secret. - Omit or send an empty replacement secret to keep the existing stored value. There is no secret-read endpoint.
- A queued verification is bound to the environment update timestamp and fails if credentials change before execution.
Analytics range values
- Use
1h,24h,7d, or30d. An omitted or unrecognized range currently falls back to seven days. - One-hour data uses minute buckets, 24-hour data uses hour buckets, and 30-day data uses day buckets. Seven-day/default summaries use day buckets while the timeseries uses hour buckets.
Stable Shopify error codes
SHOPIFY_DISABLEDandSHOPIFY_NOT_FOUND: HTTP 404.SHOPIFY_INVALID_CONFIGURATION,SHOPIFY_INVALID_CREDENTIALS,SHOPIFY_CONFIG_MISMATCH,SHOPIFY_INCOMPATIBLE_DATABASE, andSHOPIFY_UNSUPPORTED_HYDROGEN_RUNTIME: HTTP 422.SHOPIFY_FAILED_HEALTH_GATEandSHOPIFY_IDEMPOTENCY_CONFLICT: HTTP 409.SHOPIFY_RATE_LIMITED: HTTP 503.SHOPIFY_OPERATION_FAILED: HTTP 500.- Asynchronous operation failures also persist an
error_codeand redactederror_messageon the operation object.
Expected result
API clients can safely repeat durable mutations, never receive stored secret values, and branch on stable Shopify error codes.
Common failures
Related guides
Shopify hosting overview
What StackShift hosts, what remains in Shopify, who supplies credentials, and how app and storefront hosting differ.
Configure Shopify app hosting
Prepare supported app source, separate Shopify app targets, committed TOML files, credentials, managed databases, and verification.
Configure Shopify storefront hosting
Connect Hydrogen or a confirmed Node storefront, obtain Storefront API credentials, isolate targets, and verify Shopify access.