Answer the question
In order to leave comments, you need to log in
How to unload balances using the ozon API?
Good afternoon.
Please tell me what I'm doing wrong.
I want to get transaction data via api ozon (from a test account).
But I get a 400 error in response.
Link to documentation https://api-seller.ozon.ru/apiref/ru/#t-title_post...
import requests
url = 'https://cb-api.ozonru.me/v2/finance/transaction/list'
data ={"client-id": "836",
"api-key": "0296d4f2-70a1-4c09-b507-904fd05567b9",
"content-type": "application/json",
"filter": {
"date": {
"from": "2020-10-01T07:14:11.897Z",
"to": "2020-10-31T07:14:11.897Z"
},
"transaction_type": "all"
},
"page": "1",
"page_size": "10"
}
r = requests.post(url, data)
Answer the question
In order to leave comments, you need to log in
client-id and api-key are request headers, not body
import requests
url = 'https://cb-api.ozonru.me/v2/finance/transaction/list'
headers = {'client-id': '836', 'api-key': '0296d4f2-70a1-4c09-b507-904fd05567b9'}
data ={"filter": {
"date": {
"from": "2020-10-01T07:14:11.897Z",
"to": "2020-10-31T07:14:11.897Z"
},
"transaction_type": "all"
},
"page": "1",
"page_size": "10"
}
r = requests.post(url, json=data, headers=headers)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question