Repair below python script to generate response 200
import requests
import json
# Replace 'your_token_here' with your actual JWT token
headers = {
'Content': 'application/json',
'Authorization': 'authkey_here_will_do_ourself'
}
# Replace the following payload with your actual data
payload = {
"Shipper": {
"OriginArea": "Example",
"CustomerCode": "XXXXXX",
# Add more shipper details as required
},
"Consignee": {
# Add consignee details
},
"Services": {
# Add service details
},
# Include other fields as necessary
}
response = [login to view URL]('[login to view URL]', headers=headers, data=[login to view URL](payload))
if response.status_code == 200:
print("AWB Generated Successfully")
print([login to view URL]())
else:
print(f"Failed to generate AWB. Status code: {response.status_code}")
print([login to view URL])
Greetings, I have read the project description but haven't found any details requirements open a chat to discuss requirements in details.
Regards
Sourabh
Hello ,I'm Python developer & hv 8 yr exp, I feel very much interested to work with you.
I can assure you that I will do my best to do your job.
Regards
Hey there! I can easily fix your script and solve the problem, I just need you to provide a few details about it. I have a lot of experience when it comes to coding in python, please do check my github profile under the name Sxvxgee. Thank you!
Hello you are handling the API wrongly as this is a SOAP request and request library does not support this request type, I have used this api couple times to track import export shipments and I can fix your script ASAP. Pls contact me for further details so I can show you 200 responses with data.