gpt4 book ai didi

api - Snapchat API 错误 : "The start time should be start of a Local Time Zone day for DAY query."

转载 作者:行者123 更新时间:2023-12-05 05:13:38 28 4
gpt4 key购买 nike

我正在为 Snapchat API 发出以下请求:

GET https://adsapi.snapchat.com/v1/ads/7e4ebe9a-f903-4849-bd46-c590dbb4345e/stats?
granularity=DAY
&fields=android_installs,attachment_avg_view_time_millis,attachment_impressions,attachment_quartile_1,attachment_quartile_2,attachment_quartile_3,attachment_total_view_time_millis,attachment_view_completion,avg_screen_time_millis,avg_view_time_millis,impressions,ios_installs,quartile_1,quartile_2,quartile_3,screen_time_millis,spend,swipe_up_percent,swipes,total_installs,video_views,view_completion,view_time_millis,conversion_purchases,conversion_purchases_value,conversion_save,conversion_start_checkout,conversion_add_cart,conversion_view_content,conversion_add_billing,conversion_searches,conversion_level_completes,conversion_app_opens,conversion_page_views,attachment_frequency,attachment_uniques,frequency,uniques,story_opens,story_completes,conversion_sign_ups,total_installs_swipe_up,android_installs_swipe_up,ios_installs_swipe_up,conversion_purchases_swipe_up,conversion_purchases_value_swipe_up,conversion_save_swipe_up,conversion_start_checkout_swipe_up,conversion_add_cart_swipe_up,conversion_view_content_swipe_up,conversion_add_billing_swipe_up,conversion_sign_ups_swipe_up,conversion_searches_swipe_up,conversion_level_completes_swipe_up,conversion_app_opens_swipe_up,conversion_page_views_swipe_up,total_installs_view,android_installs_view,ios_installs_view,conversion_purchases_view,conversion_purchases_value_view,conversion_save_view,conversion_start_checkout_view,conversion_add_cart_view,conversion_view_content_view,conversion_add_billing_view,conversion_sign_ups_view,conversion_searches_view,conversion_level_completes_view,conversion_app_opens_view,conversion_page_views_view
&swipe_up_attribution_window=28_DAY
&view_attribution_window=1_DAY
&start_time=2018-10-05T00:00:00.000-08:00
&end_time=2018-10-19T00:00:00.000-08:00

出现以下错误:

 {
"request_status": "ERROR",
"request_id": "5bf3f47e00ff060ab0faf7f4330001737e616473617069736300016275696c642d30666635373463642d312d3232302d350001010c",
"debug_message": "The start time should be start of a Local Time Zone day for DAY query.",
"display_message": "We're sorry, but the data provided in the request is incomplete or incorrect",
"error_code": "E1008"
}

某些日期范围可以使用,而其他日期范围则不行。我使用的时区偏移量(欧洲/伦敦 +00:00,洛杉矶,-08:00)或我如何格式化请求日期(2018-10-01T00:00:00Z,2018-10- 01T00:00:00.000、2018-10-01T00:00:00.000-08:00 等)对于广告统计信息请求日期范围,错误将相同。该错误有一个代码,但在 Snapchat 的文档中没有详细说明。他们只说“这是一个糟糕的请求”。

例如,一则广告可以让我查询 29/10/2018 至今,甚至 29/10/2018 至 30/10/2018,但一旦我将其更改为 28/10/2018,它就会失败并显示同样的错误。

广告上没有明显的开始/结束时间,我认为这可能与此有关。在我们测试的这个案例中,它也与事件开始/结束时间无关。

API 文档:https://developers.snapchat.com/api/docs/?shell#overview

最佳答案

解决了上述错误的问题。我在传递时区偏移量时忘记考虑夏令时。

例如我们需要检查 start_time 或 end_time 是否有夏令时,并相应地调整该时区的偏移量。

关于api - Snapchat API 错误 : "The start time should be start of a Local Time Zone day for DAY query.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53392834/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com