Certain Bills not posting

Hi,

We have a Python script that posts Bills from Spendmap to Freeagent. This
works fine and as expected, however a tiny percentage of Bills (1 out of 77
in this case) fail to post to Freeagent. I don’t have any errors to
highlight the issue. It just isnt listed when we check Freeagent.

Heres the json generated by the script:

{“bill”: {“dated_on”: “2014-04-30”, “category”:
https://api.freeagent.com/v2/categories/001”, “contact”:
https://api.freeagent.com/v2/contacts/1095825”, “reference”:
“053-139251/003064\n”, “total_value”: “33.300”, “due_on”: “2014-06-30”,
“sales_tax_rate”: “20”, “project”:
https://api.freeagent.com/v2/projects/533073”, “comments”: “2014-05-02/P001319/AP
COMMENT”}}

Any ideas?

Thanks in advance.

Regards,
Karl

Hi Karl,

Looking at the code you’ve posted there, it seems that you’re trying to
assign an income category (Sales) to a bill, which is invalid.
Valid categories for bills are admin expenses, cost of sales and capital
asset or stock purchases.

I’ll make a note to update the documentation to clarify this.

Cheers,
Paul.On Wednesday, 11 June 2014 13:41:33 UTC+1, Karl Sayle wrote:

Hi,

We have a Python script that posts Bills from Spendmap to Freeagent. This
works fine and as expected, however a tiny percentage of Bills (1 out of 77
in this case) fail to post to Freeagent. I don’t have any errors to
highlight the issue. It just isnt listed when we check Freeagent.

Heres the json generated by the script:

{“bill”: {“dated_on”: “2014-04-30”, “category”: "
https://api.freeagent.com/v2/categories/001", “contact”: "
https://api.freeagent.com/v2/contacts/1095825", “reference”:
“053-139251/003064\n”, “total_value”: “33.300”, “due_on”: “2014-06-30”,
“sales_tax_rate”: “20”, “project”: "
https://api.freeagent.com/v2/projects/533073", “comments”: “2014-05-02/P001319/AP
COMMENT”}}

Any ideas?

Thanks in advance.

Regards,
Karl