Issues with promotions API

102 views
Skip to first unread message

Pratik Thorat

unread,
May 28, 2024, 6:00:43 AMMay 28
to Google Content API for Shopping
Hi,
I have around 13 promotions Ids live/under review on my GMC account. But promotions.list API returns only nextPageToken and not any promotion data. 
If I use promotions.get API for a particular promotionId, it returns internal server error from Google's side.
Can you please help me to figure out the issue? I am using nodejs-api-client.

Sample Response: 
{
    "config": {
        "url": "https://shoppingcontent.googleapis.com/content/v2.1/${merchantId}/promotions",
        "method": "GET",
        "userAgentDirectives": [
            {
                "product": "google-api-nodejs-client",
                "version": "7.1.0",
                "comment": "gzip"
            }
        ],
        "headers": {
            "x-goog-api-client": "gdcl/7.1.0 gl-node/21.7.1",
            "Accept-Encoding": "gzip",
            "User-Agent": "google-api-nodejs-client/7.1.0 (gzip)",
            "Authorization": "Bearer xxxxxx"
        },
        "params": {},
        "retry": true,
        "responseType": "unknown"
    },
    "data": {
        "nextPageToken": "token"
    },
    "headers": {
    },
    "status": 200,
    "statusText": "OK",
    "request": {
        "responseURL": "https://shoppingcontent.googleapis.com/content/v2.1/${merchantId}/promotions"
    }
}

Best Regards,
Pratik. 

Shopping API Forum Advisor

unread,
May 28, 2024, 12:16:06 PMMay 28
to google-content-...@googlegroups.com
Hi,

Thank you for contacting the Content API support team.

I understand that you are getting an internal server error when trying to fetch using the "promotions.get" method.  But from the shared logs, I cannot see any such error. Can you provide us with the Merchant Center ID and the latest JSON request and response logs.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJ6dd:ref" (ADR-00236800)

Thanks,
 
Google Logo Content API for Shopping Team


Pratik Thorat

unread,
May 29, 2024, 3:18:43 PMMay 29
to Google Content API for Shopping

Hi,
Here are the details

Merchant Center ID: 654254634

Response for promotions.get API: 

{
    "config": {
        "url": "https://shoppingcontent.googleapis.com/content/v2.1/654254634/promotions/online%3Aen%3AIN%3AHYLF_12",

        "method": "GET",
        "userAgentDirectives": [
            {
                "product": "google-api-nodejs-client",
                "version": "7.1.0",
                "comment": "gzip"
            }
        ],
        "headers": {
            "x-goog-api-client": "gdcl/7.1.0 gl-node/21.7.1",
            "Accept-Encoding": "gzip",
            "User-Agent": "google-api-nodejs-client/7.1.0 (gzip)",
            "Authorization": "xxxxxx"

        },
        "params": {},
        "retry": true,
        "responseType": "unknown",
        "retryConfig": {
            "currentRetryAttempt": 3,
            "retry": 3,
            "httpMethodsToRetry": [
                "GET",
                "HEAD",
                "PUT",
                "OPTIONS",
                "DELETE"
            ],
            "noResponseRetries": 2,
            "statusCodesToRetry": [
                [
                    100,
                    199
                ],
                [
                    408,
                    408
                ],
                [
                    429,
                    429
                ],
                [
                    500,
                    599
                ]
            ]
        }
    },
    "response": {
        "config": {
            "url": "https://shoppingcontent.googleapis.com/content/v2.1/654254634/promotions/online%3Aen%3AIN%3AHYLF_12",

            "method": "GET",
            "userAgentDirectives": [
                {
                    "product": "google-api-nodejs-client",
                    "version": "7.1.0",
                    "comment": "gzip"
                }
            ],
            "headers": {
                "x-goog-api-client": "gdcl/7.1.0 gl-node/21.7.1",
                "Accept-Encoding": "gzip",
                "User-Agent": "google-api-nodejs-client/7.1.0 (gzip)",
                "Authorization": "xxxxxxxx."

            },
            "params": {},
            "retry": true,
            "responseType": "unknown",
            "retryConfig": {
                "currentRetryAttempt": 3,
                "retry": 3,
                "httpMethodsToRetry": [
                    "GET",
                    "HEAD",
                    "PUT",
                    "OPTIONS",
                    "DELETE"
                ],
                "noResponseRetries": 2,
                "statusCodesToRetry": [
                    [
                        100,
                        199
                    ],
                    [
                        408,
                        408
                    ],
                    [
                        429,
                        429
                    ],
                    [
                        500,
                        599
                    ]
                ]
            }
        },
        "data": {
            "error": {
                "code": 500,
                "message": "Internal error",
                "errors": [
                    {
                        "message": "Internal error",
                        "domain": "global",
                        "reason": "backendError"
                    }
                ],
                "status": "INTERNAL",
                "details": [
                    {
                        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
                        "reason": "internalError",
                        "domain": "global"
                    }
                ]
            }
        },
        "headers": {
            "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
            "cache-control": "private",
            "content-encoding": "gzip",
            "content-type": "application/json; charset=UTF-8",
            "date": "Wed, 29 May 2024 19:09:56 GMT",
            "server": "ESF",
            "transfer-encoding": "chunked",
            "vary": "Origin, X-Origin, Referer",
            "x-content-type-options": "nosniff",
            "x-frame-options": "SAMEORIGIN",
            "x-xss-protection": "0"
        },
        "status": 500,
        "statusText": "Internal Server Error",
        "request": {
            "responseURL": "https://shoppingcontent.googleapis.com/content/v2.1/654254634/promotions/online%3Aen%3AIN%3AHYLF_12"
        }
    },
    "status": 500,
    "code": 500,
    "errors": [
        {
            "message": "Internal error",
            "domain": "global",
            "reason": "backendError"
        }
    ]
}

Regards,
Pratik.




Shopping API Forum Advisor

unread,
May 29, 2024, 5:36:33 PMMay 29
to google-content-...@googlegroups.com
Hi,

Thanks for providing the logs. Upon checking, I noticed there are internal error calls for the "promotions.get" method in the response. The "internalError" issues are typically transient in nature, and retrying the request should work. For more information, you can refer to this document.

Pratik Thorat

unread,
May 30, 2024, 8:21:28 AMMay 30
to Google Content API for Shopping
Hi,
I don't think this issue is transient in nature. I have retried many time, still received the same response. 

Thanks,
Pratik

Shopping API Forum Advisor

unread,
May 30, 2024, 1:44:34 PMMay 30
to google-content-...@googlegroups.com
Hi,

To assist you better, please confirm if you are using any third party ecommerce platform for uploading/syncing the products for further investigation.

Pratik Thorat

unread,
May 31, 2024, 6:22:42 AMMay 31
to Google Content API for Shopping
Hi,
Not using any third party platform. 

Regards,
Pratik.

Shopping API Forum Advisor

unread,
May 31, 2024, 11:30:01 AMMay 31
to google-content-...@googlegroups.com
Hi,

I will check with our team regarding your issue and one of my team members will reach out to you once we have an update on this.

Shopping API Forum Advisor

unread,
Jun 4, 2024, 6:43:55 AMJun 4
to google-content-...@googlegroups.com
Hello,

Thank you for getting back to us.

Upon checking with our team, I would like to inform you that for MC 453563228, you tried to update a product and it didn't work. For this query, it looks like the title is updated in the MC UI. You have sent 'title': 'NEW TITLE', and that's what I'm seeing in the UI. It is suggested to make a single update call which is from the API / UI so that you may not face any issue. Perhaps there was a delay in it updating in the UI, because in the old screenshot you shared, it was another title.

And regarding the internal server error for promotions.get method, can you please confirm that you are still facing the same error. If yes then, kindly share the latest JSON request and response logs to investigate further.
Reply all
Reply to author
Forward
0 new messages