Webhook for product/create doesn't retrieve images

Alessio1
Shopify Partner
4 0 0

Hi,

I'm trying to get data from products creation through webhooks.

I successfully created and authenticated the "Create product" webhook with my PHP backend but, when I receive the json, it misses the images info.

If I register the webhook for the "Edit product" it gives me correctly the images info.

Here is an example of what i get from the create product webhook:

{
    "id": XXXXXXXXXXXXXXXX,
    "title": "Title",
    "body_html": "",
    "vendor": "Vendor",
    "product_type": "",
    "created_at": "2018-10-15T12:27:57+02:00",
    "handle": "handle",
    "updated_at": "2018-10-15T12:27:58+02:00",
    "published_at": "2018-04-16T14:14:24+02:00",
    "template_suffix": null,
    "tags": "tags",
    "published_scope": "web",
    "variants": [
    {
        "id": XXXXXXXXXXXXXXXX,
        "product_id": XXXXXXXXXXXXXXXX,
        "title": "Default Title",
        "price": "98.00",
        "sku": null,
        "position": 1,
        "inventory_policy": "continue",
        "compare_at_price": "0.00",
        "fulfillment_service": "manual",
        "inventory_management": null,
        "option1": "Default Title",
        "option2": null,
        "option3": null,
        "created_at": "2018-10-15T12:27:57+02:00",
        "updated_at": "2018-10-15T12:27:57+02:00",
        "taxable": true,
        "barcode": "barcode",
        "grams": 17000,
        "image_id": null,
        "inventory_quantity": 0,
        "weight": 17.0,
        "weight_unit": "kg",
        "inventory_item_id": XXXXXXXXXXXXX,
        "old_inventory_quantity": 0,
        "requires_shipping": true
    }],
    "options": [
    {
        "id": XXXXXXXXXXXXXXXX,
        "product_id": XXXXXXXXXXXXXXXX,
        "name": "Title",
        "position": 1,
        "values": ["Default Title"]
    }],
    "images": [],
    "image": null
}

 

I atleast need to know the urls of the images...

Can anyone help me?

Thank you

 

 

 

 

Replies 9 (9)

Zameer
Shopify Staff
297 31 90

Hey there,

Thanks for bringing this to our attention. It looks as though this is a bug with the products/create webhook that our platform engineers are now investigating. 

I will keep you updated with any fixes that get implemented!

To learn more visit the Shopify Help Center or the Community Blog.

HamBash
Tourist
3 0 3

Its 2024 and still facing this issue! What is the solution to this problem?

Alessio1
Shopify Partner
4 0 0

Thank you for your quick response!

I hope the resolution will also be this quick because I'm stuck for my project...

Zameer
Shopify Staff
297 31 90

Hey @Alessio1,

 

Just wanted to circle back on this. The reason the `products/create` webhook sometimes doesn't include the product images info is because it takes longer for the image data to process than it does for the webhook to fire.

 

To remedy this, you should also subscribe to the `products/update` webhook which will fire when the product images have processed and have been properly tied to the Product object.

To learn more visit the Shopify Help Center or the Community Blog.

vjson
Visitor
2 0 0

Hi, I'm having the same problem, and the suggested solution of subscribing to products/update only works sometimes. Just as often that doesn't work either, i.e. the products/update webhook sometimes never fires after the product creation. When it works it usually fires just a few seconds after the products/create webhook, and includes the images data. But other times it never fires at all, even though the newly created product definitely has the images.

 

Is there anything more one can do to guarantee getting the images using these webhooks?

nbalkandzhiyski
Visitor
3 0 1

This continues happening at the end of 2020!

This post is opened in 2018 and this is still not resolved!

Such behavior is unacceptable for an API in 2020...

Jujuba
Shopify Partner
23 0 6

Hi @Zameer, are there any updates to this issue?
Images are still not be send with the webhook... Best, Nils

VanusAI
Shopify Partner
1 0 2

2023 still no fix 5 years later

Jujuba
Shopify Partner
23 0 6

I still see that behaviour as well. 

When will there be a fix?!