Invalid boolean value using python requests -
i using python requests posting data in dpd api. if post data:
{ "job_id": null, "collectionondelivery": false, "invoice": null, "collectiondate": "2012-05-01t09:00:00", "consolidate": null, "consignment": [] }
using requests, getting response 200, error
{"errorcode":"1008","errortype":"validation","errormessage":"invalid boolean value","obj":"collectionondelivery"}
i modified value of collectionondelivery
0 , tried, got same error message. can in this?
i guess "null" , "false" aren't variable or type created. in python "none" instead of "null", need capitalize first letter of "false" try this:
{ "job_id": none, "collectionondelivery": false, "invoice": none, "collectiondate": "2012-05-01t09:00:00", "consolidate": none, "consignment": [] }
Comments
Post a Comment