我需要按日期过滤请求以从 Commercetools 中提取一些数据。我目前有以下内容,但没有过滤
response = requests.get('https://api.<addresshere>?limit=500&filter=results.createdAt=2021-10-10T21:31:31.231Z', headers={'Authorization': 'Bearer <token>'}, stream=True)
json结构为:
'offset': 0,
'count': 0,
'total': 0,
'results': [{'id': 'test',
'version': 1,
'lastMessageSequenceNumber': 1,
'createdAt': '2021-10-04T22:37:38.238Z',
'lastModifiedAt': '2021-10-04T22:37:38.238Z',
'lastModifiedBy': {'clientId': 'test',
'isPlatformClient': test},
'createdBy': {'clientId': 'test',
'isPlatformClient': test},
'key': 'test',
'amountPlanned': {'type': 'test',
'currencyCode': 'GBP',
'centAmount': 0,
'fractionDigits': 2},
'paymentMethodInfo': {'paymentInterface': 'test', 'method': 'test'},
'paymentStatus': {'interfaceCode': 'test',
'interfaceText': 'test',
'state': {'typeId': 'test',
'id': 'test'}},
'transactions': [{'id': 'test',
'timestamp': '2021-10-04T22:37:38.199Z',
'type': 'test',
'amount': {'type': 'test',
'currencyCode': 'NZD',
'centAmount': 0,
'fractionDigits': 2},
'interactionId': '1',
'state': 'test'}],
'interfaceInteractions': []}
}```