Hi Core, I followed what you suggested and wrote the following code
url = 'https://www.lendingclub.com/foliofn/repriceSelectedNotes.action';
data = 'expire_date_loan_listing=05/09/2014&json=[{"noteId":"1234","loanId":"1235","orderId":"1237","askingPrice":"5.00"}]';
headers = {'content-type': 'application/x-www-form-urlencoded',
'referer': 'https://www.lendingclub.com/foliofn/selectNotesToReprice.action'};
response = requests.Session().post(url=url, data=data, headers=headers, allow_redirects=True)
The noteId, loanId, and orderId that I used were just made-up numbers. You of course have to supply the real ones in your code.
When you say the response.text is the same one as you get when you manually click the reprice button, do you mean it's the form where it asks you for the prices, or the page where it says that the notes have been repriced? And does it show the
proper noteId on that page? I don't see how it possibly could, if you were sending bogus 1234 numbers.
I believe the real problem though is the way you're passing the post data. I've never written any python code in my life but I believe it needs to look something more like this:
data = {'expire_date_loan_listing': '05/09/2014', 'json': '[{"noteId":"1234","loanId":"1235","orderId":"1237","askingPrice":"5.00"}]'};
The way you had it would be fine only if the Requests post() call can handle a single raw string for all the post data. I don't know if it can. I suppose that makes sense though... maybe your way is fine.
Either way, look more closely at your response.text. If you didn't get the note IDs right or got the format wrong, then it's
impossible for that response.txt to mention the proper note but just have the wrong price. Not possible. If the note it mentions is correct but the price is wrong then there is likely another issue. Either way I don't think response.txt would give you a rosy success message if it didn't see the proper price data. Are you sure you're not just seeing the price entry form again in the response?
You can post snippets of your response.txt if you'd like, after you've tried a few things and still can't figure it out. My wild guess is that you are just seeing the price entry form because LC didn't see any proper post data. The page you get back should say
"Your offer will remain valid until..." blah blah. If you're seeing anything else then you're not even getting the right page back.