temi Posted April 7 Share Posted April 7 (edited) Hello, I have been working with the WHMCS api and am having an issue updating an invoice via the api. The goal is to add a new line item to a specific invoice, but even though the api returns a successful response, the new line item has not been added. I am coding in python, and have formatted the request like this: data = { "identifier": self.identifier, "secret": self.secret, "action": "UpdateInvoice", "invoiceid": invoiceid, "newitemdescription": ["Test Item"], "newitemamount": [10.00], "newitemtaxed": [False], "responsetype": "json" } r = requests.post(url, data, verify=False) I've tried doing a dictionary like {"0": "Test Item"} a list of dictionaries [{"0": "Test Item"}] and using the next available invoice item id, but nothing has worked so far. Any suggestions to where I may be going wrong? Thanks in advance Edited April 7 by temi formatting 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.