# Hide subscriptions in bulk Hides multiple subscription contracts from customer view in bulk. This operation allows merchants to quickly hide subscriptions from appearing in the customer portal without canceling or deleting them. What Does 'Hide' Mean? Hiding a subscription makes it invisible to customers in their customer portal while keeping the subscription data intact. The subscription is not deleted or canceled - it's simply hidden from the customer's view. This is useful for: - Temporarily removing subscriptions from customer access - Managing test or dummy subscriptions - Handling subscription disputes or issues - Preparing subscriptions for migration or cleanup Key Features: - Bulk Operation: Process multiple subscriptions in a single request - Non-Destructive: Subscriptions are hidden, not deleted - Reversible: Hidden subscriptions can be unhidden later - Asynchronous Processing: Large batches are processed in the background - Conflict Detection: Prevents multiple simultaneous bulk operations Operation Modes: 1. Specific Subscriptions: Provide a list of subscription contract IDs to hide 2. All Subscriptions: Set allSubscriptions=true to hide all active subscriptions (use with caution) How It Works: 1. Submit a request with subscription IDs or allSubscriptions flag 2. System validates the subscription IDs belong to your shop 3. A bulk automation task is created and queued 4. Each subscription is marked as hidden 5. Subscriptions disappear from customer portal immediately 6. Subscriptions remain in merchant admin for management Request Body Structure: json { "subscriptionIds": [ "gid://shopify/SubscriptionContract/123456", "gid://shopify/SubscriptionContract/123457", "gid://shopify/SubscriptionContract/123458" ] } Use Cases: - Subscription Cleanup: Hide test or duplicate subscriptions created during setup - Customer Service: Temporarily hide problematic subscriptions while resolving issues - Migration Preparation: Hide old subscriptions before migrating to new plans - Dispute Management: Hide subscriptions involved in billing disputes - Seasonal Management: Hide seasonal subscriptions during off-season - Batch Processing: Clean up subscriptions that meet certain criteria Important Notes: - Only one bulk operation can run at a time per shop - If a bulk operation is already in progress, the request will fail with 400 error - Subscription IDs must be in Shopify GraphQL ID format (gid://shopify/SubscriptionContract/xxxxx) - Hidden subscriptions stop appearing in customer portal but remain active for billing - You can unhide subscriptions later through the admin interface - Using allSubscriptions=true will hide ALL subscriptions - use with extreme caution Processing Time: - Small batches (1000): May take several minutes to hours - Progress can be tracked through the bulk automation status endpoint Best Practices: - Always specify exact subscription IDs rather than using allSubscriptions=true - Test with a small batch first before processing large numbers - Keep track of hidden subscription IDs for future reference - Document the reason for hiding subscriptions for audit purposes - Monitor bulk operation status to ensure completion - Consider notifying customers before hiding their subscriptions Workflow Example: 1. Identify subscriptions to hide (e.g., test subscriptions with specific tags) 2. Extract their subscription contract IDs 3. Call this endpoint with the list of IDs 4. Verify 204 No Content response indicating successful queue 5. Monitor processing status through admin or status endpoint 6. Confirm subscriptions are hidden from customer portal Error Scenarios: - Another bulk operation is running: 400 error with message about operation in progress - Invalid subscription IDs: Silently skips invalid IDs, processes valid ones - Unauthorized subscription access: Only subscriptions belonging to your shop are processed - Empty subscription list: Operation completes successfully with no action Authentication: Requires valid api_key parameter (X-API-Key header support coming soon) Endpoint: POST /api/external/v2/bulk-automations/hide-subscriptions Version: 0.0.1 ## Query parameters: - `api_key` (string, required) Your API Key - `allSubscriptions` (boolean) allSubscriptions ## Request fields (application/json): - `subscriptionIds` (string) ## Response 204 fields ## Response 400 fields ## Response 401 fields ## Response 403 fields ## Response 500 fields