Duplicate clients


We are working on connecting our online service payments with InvoiceNinja (Ninja will serve as automatic invoice generator) through API and so far so good but I have a question regarding clients - does InvoiceNinja have any way of blocking the creation of duplicate clients or must we somehow check via API everytime we send a new request to Ninja if the client already exists?


The app doesn’t block duplicate clients, maybe you can store the Invoice Ninja client id in your system?

Sorry for responding/re-opening such an old topic, but I got aware of the same situation.
So to prevent that a client is created multiple times via API, the only way is:

  1. API Call to find the client with the information (e.g. Company Name, Address, City) using GET /api/v1/clients.
  2. If a client was found, do not create a new client
  3. If no client was found in the response (total or count: 0), create a new client

However how do I search for a client using the company name or address? So far only “email” seems to work for lookups?

It isn’t supported in v4, just email and id_number are filterable


1 Like

What about v5? Does/will it support lookups on other fields?

Yes, the v5 API is much more flexible

1 Like