Posting new bill fails with "Invalid JSON"


#1

Hi there,
I’m trying to POST the following new bill through the API and receive the error “Invalid JSON” from the server:
{
“bill” : {
“category” : “https://api.freeagent.com/v2/categories/200”,
“contact” : “https://api.freeagent.com/v2/contacts/5262821”,
“dated_on” : “2019-09-02”,
“due_on” : “2019-09-02”,
“reference” : “2019-09-02”,
“sales_tax_rate” : “0”,
“total_value” : “87”
}
}

I can’t for the life of me find anything wrong with it…?

Any help would be much appreciated!

Alex


#2

Ok, found the problem. The Google API client library (java) sends content gzipped by default. Disabling this makes everything work!