Я пытаюсь создать свой собственный python скрипт, который отправляет запросы в Zuora REST API:
d = {"format": "csv", "version": "1.2", "name": "AbderrahmenM", "encrypted": "none", "useQueryLabels": "true",
"dateTimeUtc": "true", "queries": [{"name": "Product", "query": "select * from AccountingCode", "type": "zoqlexport"}]}
req = requests.post("https://rest.sandbox.eu.zuora.com/v1/batch-query/", headers={
"Content-Type": "application/json", "Authorization": "Bearer "+access_token}, data=d)
print(req.text)
Вывод:
{"Error":"Could not read JSON: Unrecognized token 'format': was expecting 'null', 'true', 'false' or NaN\n at [Source: org.apache.catalina.connector.CoyoteInputStream@2dfeedc4; line: 1, column: 8]; nested
exception is org.codehaus.jackson.JsonParseException: Unrecognized token 'format': was expecting 'null', 'true', 'false' or NaN\n at [Source: org.apache.catalina.connector.CoyoteInputStream@2dfeedc4; line: 1, column: 8]"}
Проблема в формате данных? Ват, я делаю не так? Спасибо