Get Only overdue invoices

Hi Guys,

I am trying to list overdue invoices for each customer, but it seems I can’t return only the overdue.

Also noticed that if I try to list only Unpaid invoices, it returns me the same data as if I make the call as Sent invoices.

Can you please help?

Regards

Hi @APereira

Am I correct in thinking you’re trying to do this via the API?

If so, are you using JSON or XML?

Sorry, yes over the API.

I am doing this over XML.

I don’t believe this is actually possible over the API, but I’ll ask my colleague and I’ll confirm this for you.

That would be correct. I believe the ‘Unpaid’ status isn’t actually used. These mimic the status’ on the invoice management screen - all invoices are DRAFT until sent, and then they’re SENT. And then they’re SENT until they’re marked as PAID (either partially or fully)

Hi @QFMathew,

That doesn’t sound very good.

So the only way I have to check if an invoice is Overdue is by calculating what date it should have been paid?

As far as I can see, there is the option of status for Paid Part, which I believe it should return me invoices part paid.

Is that correct?

Regards

I agree this could be useful, so I’ve asked our development team to take a look to see if there’s a way we could incorporate this into our API

That’s correct. I’ve just tried this with:

		<Body>
			<SearchParameters>
				<ReturnCount>10</ReturnCount>
				<Offset>0</Offset>
				<OrderResultsBy>InvoiceNumber</OrderResultsBy>
				<OrderDirection>ASC</OrderDirection>
				<InvoiceType>INVOICE</InvoiceType>
				<ShowDeleted>false</ShowDeleted>
				<Status>PAIDPART</Status>
			</SearchParameters>
		</Body>

And this has returned only the part paid invoices (shown as ‘PARTIAL’ in your invoice listing)

Hi @QFMathew,

Great, thanks for considering my suggestion.

Do you know if this will be something quick to introduce to the API or it will take some time?

Regards

This isn’t something I’m able to advise on I’m afraid. They’ll take a look, and hopefully we can advise of something a bit more solid within the next day or so. All I can suggest for the moment is watch this space

Thanks for your quick reply.

@APereira - I have some good news for you - this is now live! :slight_smile:

You can now do a search for invoices with the status of ‘AGED’, like this:

		<Body>
			<SearchParameters>
				...
				<Status>AGED</Status>
				...
			</SearchParameters>
		</Body>

This will return any overdue invoices matching the criteria of your search. As of tomorrow, we will also include 2 additional parameters in the results set if the status was set to ‘AGED’. These would be similar to the following:

<Record>
    ...
    <DueDate>2017-03-15</DueDate>
    <OverdueDays>34</OverdueDays>
    ...
</Record>
1 Like

Hi @QFMathew

Thanks for your quick reply.

I’ve just checked, and if I go to the web interface we have some Overdue invoices, but when searching for them using the API it is not returning them.

Can you please confirm this is now life or should I wait for tomorrow and test again?

Regards

P.S - Really appreciated by your work and help.

Apologies for the delay in coming back to you. When I tested this myself last night there was an issue, but this has now been fixed. We’ve also released the DueDate and OverdueDays addition too, so a typical result would now look like this:

			<Record>
				<IssueDate>2016-03-01</IssueDate>
				<DueDate>2016-03-01</DueDate>
				<OverdueDays>414</OverdueDays>
				<InvoiceID>5983462</InvoiceID>
				<ClientID>1650576</ClientID>
				<ClientCompanyName>Smith's Locksmith</ClientCompanyName>
				<ClientContactName>Jim Smith</ClientContactName>
				<InvoiceNumber>000001</InvoiceNumber>
				<Description>Consultancy</Description>
				<Currency>GBP</Currency>
				<Amount>250.00</Amount>
				<PaidToDate>125.00</PaidToDate>
				<Status>PAIDPART</Status>
				<ViewHref>Link to View goes here</ViewHref>
			</Record>

I hope that helps :slight_smile:

1 Like

No worries,

Thank you very much for your update.

I’ve tested and it is now working.

Regards,

1 Like