Issue with collectionAddProducts in Shopify 2025-01 API

Topic summary

A developer is encountering an error when attempting to add a newly created product to a collection called “Home page” using the collectionAddProducts endpoint in Shopify’s 2025-01 API.

Error Details:

  • The API returns a generic error message without specific details
  • Error format: “Error adding [product_gid] to collection”

Troubleshooting Completed:

  • Verified product ID and collection ID are correct
  • Confirmed API parameters match a successful implementation in another store
  • Validated API permissions and access tokens

Key Observation:
The identical API call works successfully in a different Shopify store, suggesting the issue may be store-specific rather than code-related.

Status: The issue remains unresolved. The developer is seeking insights on potential store-specific settings or restrictions that could be blocking the collection assignment.

Summarized with AI on October 30. AI used: claude-sonnet-4-5-20250929.

Hi everyone,

I’m facing an issue while using the Shopify 2025-01 API and would really appreciate any insights or assistance.

Issue Description:

I created a product via the API and tried to add it to a collection named “Home page” using the collectionAddProducts endpoint. However, the API call returned the following error:

Error adding gid://shopify/Product/{product_id} to collection

No additional details or specific error messages were provided.

Interestingly, when I tested the same API call with identical parameters in another store, it worked smoothly, and the product was successfully added to the collection. However, in the current store, the issue persists despite multiple attempts.

What I’ve Tried So Far

  1. Verified that the product ID and collection ID are correct.

  2. Checked API call parameters to ensure they match the successful request in the other store.

  3. Confirmed that the API permissions and access tokens are valid.

Request for Help

Does anyone know what might be causing this issue? Could there be any store-specific settings or restrictions affecting this API call?

Additional Info:

Collection Name: “Home page” API Version: 2025-01

Any help would be greatly appreciated! Thanks in advance:)