I’ve tried to create an invoice using your documentation and used the exact format being specified on this page:
https://dev.freeagent.com/docs/invoices
I’ve managed to successfully create a contact but so far no luck with invoices.
I’ve tried to create an invoice as follows (replacing the contact url with a valid one) and it’s exactly the same format as the one in the documentation but getting this returned:
{
“error”: “Invalid JSON”
}
Please kindly provide resolution.
{ “invoice”:
{
“contact”:“https://api.freeagent.com/v2/contacts/2”,
“dated_on”:“2019-01-01”,
“due_on”:“2019-02-01”,
“reference”:“003”,
“currency”:“GBP”,
“exchange_rate”:“1.0”,
“net_value”:“0.0”,
“total_value”: “200.0”,
“paid_value”: “0.0”,
“due_value”: “200.0”,
“status”:“Draft”,
“omit_header”:false,
“always_show_bic_and_iban”: false,
“send_thank_you_emails”:false,
“send_reminder_emails”:false,
“send_new_invoice_emails”: false,
“bank_account”: “https://api.freeagent.com/v2/bank_accounts/1”,
“payment_terms_in_days”:5,
“payment_methods”: {
“paypal”: false,
“stripe”: false,
},
“created_at”:“2011-08-29T00:00:00Z”,
“updated_at”:“2011-08-29T00:00:00Z”,
“invoice_items”:[
{
“description”:“Test InvoiceItem”,
“item_type”:“Hours”,
“price”:“0.0”,
“quantity”:“0.0”
}
]
}
}
Thanks