# HTTP 500 Error creating Invoices

**URL:** <https://api-discuss.freeagent.com/t/http-500-error-creating-invoices/3665>\
**Category:** Uncategorized\
**Created:** [13 June 2024 09:54 UTC](https://api-discuss.freeagent.com/t/http-500-error-creating-invoices/3665 "2024-06-13T09:54:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![glenavontech](https://api-discuss.freeagent.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@glenavontech](https://api-discuss.freeagent.com/u/glenavontech)\
**Post date:** [13 June 2024 09:54 UTC](https://api-discuss.freeagent.com/t/http-500-error-creating-invoices/3665/1 "2024-06-13T09:54:19Z")

</div>

I’ve been using a custom written API integration to send invoices to Freeagent for years. It’s always worked fine.  
This morning, the calls to Create Invoice stoped working. Only result I get in the HTTP header is this:

```auto
HTTP/1.1 500 Internal Server Error
Date: Thu, 13 Jun 2024 09:51:30 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Server: nginx
Cache-Control: no-store
Pragma: no-cache
X-Request-Id: 1-666ac122-57834f4802207cb2448e1108
X-Rev: cefb506815ed0d726a04a4e228958b1f2e862dbc
X-Host: ip-10-132-213-28
X-Runtime: 0.206036
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Referrer-Policy: strict-origin-when-cross-origin
vary: Origin
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff

```

Payload JSON example is:

```auto
{
	"invoice" : 
	{
		"bank_account" : "https://api.freeagent.com/v2/bank_accounts/381770",
		"comments" : "",
		"contact" : "https://api.freeagent.com/v2/contacts/4484381",
		"currency" : "GBP",
		"dated_on" : "2024-6-13",
		"ec_status" : "",
		"invoice_items" : 
		[
			{
				"description" : "13/06/2024\rline 1",
				"price" : "1",
				"quantity" : 1,
				"sales_tax_rate" : 20
			}
		],
		"payment_terms_in_days" : 28,
		"reference" : "GTECH2624"
	}
}

```

Nothing has changed at my end - is this a Freeagent side issue?

---

<div class="post-metadata">

**Author:** ![James\_Green](https://api-discuss.freeagent.com/user_avatar/api-discuss.freeagent.com/james_green/32/554_2.png) [@James\_Green](https://api-discuss.freeagent.com/u/James_Green)\
**Post date:** [13 June 2024 10:41 UTC](https://api-discuss.freeagent.com/t/http-500-error-creating-invoices/3665/2 "2024-06-13T10:41:52Z")

</div>

Hi there 👋 James from FreeAgent here.

Thanks for getting in contact.

We noticed some issues earlier and have now deployed a fix. The timeframe of this incident was between 10:33 and 10:57.

We have a Status page [https://status.freeagent.com/](https://status.freeagent.com/) for any further updates, this particular incident though has now been marked as resolved.

Please do let us know if you require any further help, we’ll be happy to take a look for you.

Best regards,  
James
