Issue on Put method for creating a tracking option - Python
I want to create a tracking option ((i.e) Add tracking option) under the respective tracking category, using Xero tracking category API for my organisation. But while creating data using 'put' Requests method, it is not creating.
I am using the below condition in python:
response = requests.put(url=url, auth=oauth, data=xml_string)
I want to know, what is the format for the data to be updated in the requests, for both content type xml/text and application/json.
xml_string and url, I given is below:
xmlstring='<Option><Name>S11963</Name></Option>'
url = 'https://api.xero.com/api.xro/2.0/TrackingCategories/{TrackingCategory}/Options'
where Tracking_Category='620815a2-a7c6-4b85-8b01-ffb254ab34ad'
Error: <ApiException xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r\n <ErrorNumber>500</ErrorNumber>\r\n <Type>UnknownErrorException</Type>\r\n <Message>An error occurred in Xero. Check the API Status page http://status.developer.xero.com for current service status. Contact the API support team at api@xero.com for more assistance.</Message>\r\n</ApiException>
Thanks