Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invoiceitems array empty when invoice has items #68

Open
bu6n opened this issue May 29, 2024 · 3 comments
Open

invoiceitems array empty when invoice has items #68

bu6n opened this issue May 29, 2024 · 3 comments

Comments

@bu6n
Copy link

bu6n commented May 29, 2024

Hi there,
I'm trying to export our invoices from Paymo and a lot of them have empty invoiceitems arrays whereas the invoice as shown in paymo has items. Could that be a bug?

The request I'm doing is:

curl -u <token>: -H 'Accept: application/json' "https://app.paymoapp.com/api/invoices?include=invoiceitems"

I've done the same request with our estimates and it seems to always work.

I can provide an example per e-mail if needed.

@paymoapp
Copy link
Owner

Hi,

It looks like the issue is due to our limit of 2500 items per ResourceType. Since your company has more than 2500 invoice items, it's best to paginate the responses. Please paginate your requests with 100 items per page. You can do this with the following curl command:

curl -u api_key:random -H 'Accept: application/json' "https://app.paymoapp.com/api/invoices?include=invoiceitems&page=0&page_size=100"

@bu6n
Copy link
Author

bu6n commented May 29, 2024

Hi, thanks for your fast answer. It's good to know there is a way! In the past, I have searched for a pagination feature in the doc but I had not found it. It would be nice if it was documented :)

@paymoapp
Copy link
Owner

We will add documentation for pagination in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants