Hi Ben,
I’m not sure what’s going wrong for you. The following works for me:
curl -H “Authorization: Bearer XXXXX” -H “Accept: application/xml” -H
“Content-type: application/json” api.lvh.me:3000/v2/invoices -X POST
-d ‘{
“invoice”:{
“reference”:XX46,
“contact”:“https://api.freeagent.com/v2/contacts\/XXX”,
“status”:“Sent”,
“dated_on”:“2012-10-16T00:00:00+00:00”,
“due_on”:“2012-10-30T00:00:00+00:00”,
“payment_terms_in_days”:14,
“invoice_items”:[
{
“item_type”:“Services”,
“price”:“600.00”,
“description”:“XXXXXXXXX (30/10/2012 - 29/11/2012)”
}
]
}
}’
The “Resource not found” message is usually displayed if you’re
hitting the wrong API path. Can you double check you’re hitting
https://api.freeagent.com/v2/invoices?
Kind regards,
GraemeOn 18 October 2012 03:11, Ben Harris ben@primexeon.com wrote:
Hi All,
I keep getting the response “Resource not found” when posting the following
to https://api.freeagent.com/v2/invoicesCan anyone see where I’m going wrong?
Cheers
Ben
{
“invoice”:{
“reference”:XX46,
“contact”:“https://api.freeagent.com/v2/contacts/XXXXX79”,
“status”:“Sent”,
“dated_on”:“2012-10-16T00:00:00+00:00”,
“due_on”:“2012-10-30T00:00:00+00:00”,
“payment_terms_in_days”:14,
“invoice_items”:[
{
“item_type”:“Services”,
“price”:“600.00”,
“description”:“XXXXXXXXX (30/10/2012 - 29/11/2012)”
}
]
}
}–
You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To view this discussion on the web visit
https://groups.google.com/d/msg/freeagent_api/-/GzODM6IrD0cJ.
To post to this group, send email to freeagent_api@googlegroups.com.
To unsubscribe from this group, send email to
freeagent_api+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/freeagent_api?hl=en.
Graeme Boyd
Senior Software Engineer
Web. freeagent.com Blog. The FreeAgent Blog - FreeAgent
Twitter. @freeagent Facebook. FreeAgent | Edinburgh
40 Torphichen Street, Edinburgh, EH3 8JB
FreeAgent Central Ltd. Registered in sunny Scotland SC316774