Invoice API not sending any response when adding invalid category

Hi,

I am using freeagent API’s for creating customer invoices etc.

While creating invoices through API’s if I pass bank category code instead
of Sales category code it was failed that invoice to pass to package but it
was not send any response like “invalid category code” etc.

how should I get any response in this scenario because I need to send
proper error to my clients in this scenarios.

Hi there,

From your description of the problem, it sounds like you might be passing a
reference to an “Admin Expense” category or a “Cost of Sales” category,
rather than an “Income Category”.

I’ve just tested the API and for both of these errors, meaningful error
messages are returned:

“message”: “Income Category expected, got Admin Expenses Category”
“message”: “Income Category expected, got Cost Of Sales Category”

It’s possible I’m misunderstanding your query. Would you mind providing an
example of the parameters you’re sending to the /invoices end-point, please?

Thanks!
Dave JOn 16 April 2015 at 11:55, vikaskhairnar@commusoft.co.uk wrote:

Hi,

I am using freeagent API’s for creating customer invoices etc.

While creating invoices through API’s if I pass bank category code instead
of Sales category code it was failed that invoice to pass to package but it
was not send any response like “invalid category code” etc.

how should I get any response in this scenario because I need to send
proper error to my clients in this scenarios.


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.

David Jones
Senior Support Engineer

FreeAgent