# Problem creating invoice

**URL:** <https://api-discuss.freeagent.com/t/problem-creating-invoice/2192>\
**Category:** Uncategorized\
**Created:** [31 July 2020 07:25 UTC](https://api-discuss.freeagent.com/t/problem-creating-invoice/2192 "2020-07-31T07:25:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Stewart](https://api-discuss.freeagent.com/user_avatar/api-discuss.freeagent.com/andrew_stewart/32/149_2.png) [@Andrew\_Stewart](https://api-discuss.freeagent.com/u/Andrew_Stewart)\
**Post date:** [31 July 2020 07:25 UTC](https://api-discuss.freeagent.com/t/problem-creating-invoice/2192/1 "2020-07-31T07:25:39Z")

</div>

Hello!

This morning I’m seeing these errors trying to create a new invoice: “comparison of Date with String failed”. The request body looks like this:

```
{
  "invoice": {
    "dated_on":"2020-07-25",
    "payment_terms_in_days":0,
    "contact":"https://api.freeagent.com/v2/contacts/1234567",
    "currency":"GBP",
    "invoice_items":[
      {
        "description":"Blah blah",
        "quantity":1,
        "price":595.0,
        "category":"https://api.freeagent.com/v2/categories/001"
      }
    ],
    "reference":"123"
  }
}

```

The code which generated the request hasn’t changed recently. Has anything changed at FreeAgent’s end?

Many thanks in advance!

Yours,  
Andrew Stewart

---

<div class="post-metadata">

**Author:** ![Ewa\_Lipinska](https://api-discuss.freeagent.com/user_avatar/api-discuss.freeagent.com/ewa_lipinska/32/235_2.png) [@Ewa\_Lipinska](https://api-discuss.freeagent.com/u/Ewa_Lipinska)\
**Post date:** [31 July 2020 11:09 UTC](https://api-discuss.freeagent.com/t/problem-creating-invoice/2192/2 "2020-07-31T11:09:58Z")

</div>

Hi Andrew,

Thanks for flagging this, and for providing some additional details through a private message earlier – just posting here as well for public visibility to confirm that the issue with creating invoices for a handful of VAT Deregistered companies has been identified and fixed.

Best wishes,

Ewa
