-
Hi, I use the following code to call the sales end point: SellingApiBadRequestException: [{'code': 'InvalidInput', 'message': '{getOrderMetrics.arg1=must match "[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{3})?(([+-]\d\d:\d\d)|Z)(\[[a-zA-Z/]+\])?--[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{3})?(([+-]\d\d:\d\d)|Z)(\[[a-zA-Z/]+\])?"}', 'details': ''}] I copy the sample interval format from documentation and I understand the errors may be caused by the bad input of interval but I cannot figure out the correct format. Can anyone help to solve this problem? Many thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
the api takes the interval as a tuple: def get_order_metrics(self, interval: tuple, granularity: Granularity, granularityTimeZone: str = None, **kwargs) -> ApiResponse: and later will process it as required in your example:
so your code should be:
Let me know if it works for you, in my end it gets the right payload. |
Beta Was this translation helpful? Give feedback.
the api takes the interval as a tuple:
def get_order_metrics(self, interval: tuple, granularity: Granularity, granularityTimeZone: str = None, **kwargs) -> ApiResponse:
and later will process it as required in your example:
so your code should be:
Let me know if it works for you, in my end it gets the…