Latest From The Blog
Service announcements and product updates from the Mad Capsule team
Ok so after having a couple of debug issues with a PHP script that was calling on the Brightpearl API, one of our guys was continually getting :
[code] => CMNC-009 [message] => The request body could not be read while attempting to parse it as JSON
nyhow after overlooking something really obvious for far too long, it was realised that it was being caused by double encoding json encoding.
So the postdata was being encoded then sent to a controller which was encoding the postdata into json ! Anyhow a real simple one, but something that was easy to over look, hopefully this will save somebody some time if they get the same issue, just dump your postdata json data just before it is used in your API call and check it matches the required structure.