API - Resolve relations for charges

It would be great, if the API for charges could also resolve relations like member, memberPackages and ResourceLogs, like it is the case for invoice and member.

Christoph from the grandgarage Team

Hey Christoph,

thanks for the suggestion. Yeah, I can see that this could be useful in some situations. But just so I understand your situation better: Which problem are you currently trying to solve and what API queries do you have to issue atm?

Best regards,

Hi Raphael,
thanks for the fast response. We had to build an custom invoice export page for our accountant which includes some additional informations about packages related to the invoice. Right now a lot processing happens in the background and we have to make these two requests for the additional informations:

Invoices + charges + member details = /invoices/{ID}?embed=member&embed=details&embed=payments

package = /members/{ID}/packages/{ID}?embed=packages

All combined details will be displayed directly in an excel-similar web table without pagination. It that takes time to load all invoices for a month. And for this use case it can not be outsourced in a in-memory processing job, because a direct response is necessary.

Anyway it would be cool, if there could be included deep relations from a charge like the package. But I’m not sure if thats realistic?

Hey Christoph,

we’ve just added the ability to resolve member, onBehalfOf and memberPackage when using GET /charges.

I hope that helps! Let me know if you run into any other issues.

1 Like

Awesome, thanks for the fast resolution. Could it also be integrated single charge route /charge/{id}, like you did it also for invoices.


1 Like