New accounts not present through API
Hey,
I'm having trouble accessing newly created accounts. I fetched my company data using a standard query and originally all the accounts came through - including custom ones I had created.
However, I later added a few more accounts, and these do not appear when using the same fetch-all query. I've tried creating other accounts of types similar to those that have appeared (eg credit card/loan) but these accounts don't appear either. I also tried simpler names, waiting a day etc, but no dice.
Thinking it may be a caching issue, I tried manually setting an ID
on the newly created account, but when sending a mutation with my manual ID set on for the anchor it reports "Account not found".
Is there some kind of delay after creating an account for it to accessible in the API?
(the account part of) My query is:
accounts { edges { node { id name description displayId type { name normalBalanceType value } subtype { name description } normalBalanceType balance } } }
Comments
Hello @FrozenKiwi ,
The
accounts
list is paginated with a defaultpageSize
of 45. Have you tried increasing thepageSize
, like this?You could also fetch the 2nd page with the
page
parameter, or filter down the list withtypes
,subtypes
, etc. The full list of options is in the API Reference underaccounts
.Let me know if this works.
Thanks,
Daniel
Oh gosh, yes of course that's it.
Many thanks, that's all I need!