cannot POST xmlData via the request body to create or update records (414 Request-URI Too Large error)

cannot POST xmlData via the request body to create or update records (414 Request-URI Too Large error)

Hello,

I use the API insertRecords and updateRecords methods to create and update entries (contacts, accounts, products, sales orders...) in ZohoCRM. I encounter "414 Request-URI Too Large" errors when the value for the xmlData parameter is too big, which happens when creating or updating sales orders which embed many products. Indeed, the calls I make are as follows (I stripped out the auth token, the item id and the url-encoded  serialized   XML for safety and concision):
  1. POST crm.zoho.com/crm/private/json/SalesOrders/updateRecords?authtoken=[token]&scope=crmapi&id=[sales order id]&version=2&newFormat=2&xmlData=[url-encoded XML representation of a sales order with its ordered products]
  2. Content-Length: 0 (meaning that the content of the body request is empty)
Which causes the following error when the xmlData value is too big:
  1. <html><head><title>414 Request-URI Too Large</title></head>
  2. <body bgcolor="white"><center><h1>414 Request-URI Too Large</h1></center></body></html>
To shorten the URL, I tried to move the request parameters in the request body in different ways:
  • all the parameters
  1. POST crm.zoho.com/crm/private/json/SalesOrders/updateRecords
  2. Content: authtoken=[token]&scope=crmapi&id=[sales order id]&version=2&newFormat=2&xmlData=[url-encoded XML representation of a sales order with its ordered products]
  • only the xmlData parameter
  • POST crm.zoho.com/crm/private/json/SalesOrders/updateRecords?authtoken=[token]&scope=crmapi&id=[sales order id]&version=2&newFormat=2
  • Content: xmlData=[url-encoded XML representation of a sales order with its ordered products]

  • But all these attempts cause an  Unable to process your request. Please verify if the name and value is appropriate for the "xmlData" parameter error response which makes me think that the body of POST requests is ignored although request bodies are made to exchange data. The XML content is already minified (no indentation, no line return) so I cannot shorten the URL more than that.

    I am really stuck with this issue. If it is actually possible to POST xmlData in the request body, how should I do it, please?

    Luc Sorel, PhD - R&D at www.podbox.com/#!/Zoho CRM