From 5b5c58a5cd067ff23867f6dad85a3bb3d1e299fe Mon Sep 17 00:00:00 2001 From: Adeel Ahmed <37113831+adeelsohailahmed@users.noreply.github.com> Date: Thu, 19 Feb 2026 22:43:26 +0500 Subject: [PATCH] Add Content-Type header to the Get Store Insights API request --- ad_api/api/stores.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ad_api/api/stores.py b/ad_api/api/stores.py index 630ad7d..3ff6c4b 100644 --- a/ad_api/api/stores.py +++ b/ad_api/api/stores.py @@ -23,10 +23,13 @@ def get_insights_for_store_api(self, brandEntityId, version: int = 1, **kwargs) """ content_type = 'application/vnd.GetInsightsForStoreRequest.v'+ str(version) +'+json' # accept = 'application/vnd.GetInsightsForStoreResponse.v'+ str(version) +'+json' - # headers = {'Content-Type': content_type, 'Accept': accept} - return self._request(fill_query_params(kwargs.pop('path'), brandEntityId), - data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs) - # return self._request(fill_query_params(kwargs.pop('path'), brandEntityId), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers) + headers = { + 'Content-Type': content_type, + # 'Accept': accept, + } + # return self._request(fill_query_params(kwargs.pop('path'), brandEntityId), + # data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs) + return self._request(fill_query_params(kwargs.pop('path'), brandEntityId), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)