REST Products API

Highlighted
Shopify Partner
1 0 0

We are using this API to get shopify product updates for a timeline

https://store-name/admin/api/2019-07/products.json?updated_at_min=2020-05-11T16:24:58+00:00&updated_at_max=2020-05-12T10:32:13+00:00

 

The API sometimes does not return all the expected products within a time range 

 

When tried to investigate it further noticed that product updated_at is reflecting old value while one of the variant has latest date

Ex Response - 

{

    "products": [

        {

            "id": ....id....,

            "title": ".....Title....",

            "body_html": "....body....",

            "vendor": "....vendor....",

            "product_type": "Typography",

            "created_at": "2020-03-15T20:47:39+00:00",

            "handle": ".....handle.....",

            "updated_at": "2020-04-25T14:02:57+01:00",

            "published_at": "2020-03-15T20:47:39+00:00",

            "template_suffix": "",

            "published_scope": "global",

            "tags": "beige, beige prints, light beige, stone colour, TYPOGRAPHY PRINTS",

            "admin_graphql_api_id": ".....apiid....",

            "variants": [

                {

                    "id":....id....,,

                    "product_id":....id....,,

                    "title": "6 x 4\"",

                    "price": "3.50",

                    "sku": "",

                    "position": 1,

                    "inventory_policy": "deny",

                    "compare_at_price": null,

                    "fulfillment_service": "manual",

                    "inventory_management": null,

                    "option1": "6 x 4\"",

                    "option2": null,

                    "option3": null,

                    "created_at": "2020-03-15T20:47:39+00:00",

                    "updated_at": "2020-05-03T19:19:40+01:00",

                    "taxable": false,

                    "barcode": "",

                    "grams": 1000,

                    "image_id": null,

                    "weight": 1,

                    "weight_unit": "kg",

                    "inventory_item_id":....id....,,

                    "inventory_quantity": -6,

                    "old_inventory_quantity": -6,

                    "requires_shipping": true,

                    "admin_graphql_api_id": "....apiid....,"

                }

            ],

           .........

        }

    ]

}

 

 

updated_at of product is 2020-04-25T14:02:57+01:00 while the updated of the variant is 2020-05-03T19:19:40+01:00 hence it;s not listed in products API

 

Could someone tell me how products API is supposed to work? and is it reliable to be used for product updates?

0 Likes