I'm a newbie in python and I'm dealing with this problem, I want to make an API POST request by using Python but I can't send a request with this. Can anyone help me figure it out? This is what I have:
import requests
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
data =
{
"token": "TokenStaging",
"OrderCode": "23FNQY46"
}
r = requests.post('https://dev-online-gateway.ghn.vn/apiv3-api/api/v1/apiv3/OrderInfo',
headers=headers, data=data)
API document link: https://api.ghn.vn/home/docs/detail?id=29#parameter-examples-APIV3-OrderInfo-1_0_0-0