500 Error for Create Bill With Lowercase Currency

When I try to create a bill with a POST request to /v2/bills and a body like this:

  "bill": {
    "contact": "https://api.freeagent.com/v2/contacts/123",
    "reference": "Joe Bloggs",
    "dated_on": "2022-9-27",
    "due_on": "2022-9-27",
    "currency": "gbp",
    "bill_items": [
        "category": "https://api.freeagent.com/v2/categories/456",
        "total_value": "400.0"

I receive a 500 response with an empty body.

If the currency is changed to uppercase, it works fine.

My expectation is one of these behavious:

  • the request should succeed
  • the response should be 400 with a helpful error message

FYI, I noticed that the POST /v2/invoices request does accept lowercase currency.

Many thanks!

Thanks for the report Tom - we’re having a look and will also sort out the errors accessing bills on your account, which is being caused by the same issue.

Kind regards,

Hi Tom,

We’ve released a fix for this now, copying the same behaviour you saw on invoices to accept lower case currencies.

Thanks for letting us know!