API Create Product {"errors":{"product":"Required parameter missing or invalid"}}

Topic summary

Issue: Creating a product via the Shopify Admin API (2024-07) succeeds on one store but fails on another with HTTP 400 and error: {“errors”:{“product”:“Required parameter missing or invalid”}}.

Request details: POST [store]/admin/api/2024-07/products.json with a product payload including title, product_type, status: “active”, published_scope: “global”, published: true, empty metafields, images, and one variant (inventory_management: “shopify”, inventory_policy: “continue”, presentment_prices, etc.). A code snippet is central to understanding the request.

Discussion: One reply suggested the image URL is incomplete (“images”:[{“src”:“https:”}]). The author tested three variants: removing the images field, removing just “https:”, and providing a full URL. All attempts still return the same 400 error.

Current status: Root cause remains unknown; the error message does not indicate which parameter is invalid or missing. No resolution yet; the thread is open with an outstanding question about which field is causing validation to fail.

Summarized with AI on December 20. AI used: gpt-5.

Hello,

I’m trying to create products on stores using the shopify API.

It’s working fine on one store but not in the other.

Here is the request :

POST : [store_url]/admin/api/2024-07/products.json
Content-type : application/json

Body

{
    "product": {
        "title": "TEST SHOPIFY - NE PAS EFFACER",
        "body_html": "",
        "vendor": "SHOPIFY",
        "product_type": "Antivol à code",
        "status": "active",
		"published_scope": "global",
		"published": true,
		"metafields": [],
"images":[{"src":"https:"}],
        "variants": [
            {
                "title": "Default Title",
                "price": "20",
                "sku": "",
                "position": 1,
                "inventory_policy": "continue",
                "fulfillment_service": "manual",
                "inventory_management": "shopify",
                "option1": "Default Title",
"metafields": [],
                "option2": null,
                "option3": null,
                "taxable": true,
                "barcode": "",
                "weight": 2,
                "inventory_quantity": 1,
                "old_inventory_quantity": 0,			
                "presentment_prices": [
                    {
                        "price": {
                            "amount": "20",
                            "currency_code": "EUR"
                        },
                        "compare_at_price": null
                    }
                ],
                "requires_shipping": true
            }
        ]
    }
}

On one store the product is successfully created.
On the other a status code 400 with the error message

{"errors":{"product":"Required parameter missing or invalid"}}

The error message does not tel me what parameter is missing.

Hello, the image url in your request seems to be incomplete. Could that be the issue?

Hey @gojiberry-des

Thanks for the reply,
I tried :

  • removing the
"images":[{"src":"https:"}],
  • Removing https:
  • Adding a complete url

Still getting the error 400.