API - list users by package


#1

Hello Raphael,

I´m trying to sort some members by their active package, but I don´t see anythink what can help me in backend of FM or in API. I also exported CSV file with all our members, but there are no ID of packages which I can use to sort them out.

Could you help me or is it possible to implement to API something like “GET /packages/{id}/member”?

Many thanks for your help.

Miroslav


#2

Hi Miro,

interesting idea. You are right; there’s currently no way to sort members by their packages.

But you can filter the list of members by package. For example:

https://fabman.io/api/v1/members?packages=<package1>&packages=<package2>

This query returns all members that currently have both package1 and package2. If you repeat this for ever package you’re interested in, you should get the information you wanted.

But this might be not ideal. Can you tell me a bit more about what you’re trying to accomplish? What’s the problem you’re trying to solve?

Best regards,
Raphael


#3

This is not in API or is it? I did not see that, and this is exactly what I need. I want display members with specific package to find out who is late with payment for our locker fee.

Is it chance that you will add this to live API so I don´t have to parse result every time? I can just scroll through result in browser and this would help us a lot.

Many thanks

Miroslav


#4

Sure it is: go to https://fabman.io/api/v1/documentation#!/members/getMembers and look at the packages parameter. (The parameter description isn’t great, sorry. We’ll improve that with the next release.) If there’s a parameter for an API endpoint, it will always and automatically be available on the live API page.


#5

You could assign a package fee to the locker package, use Fabman to automatically generate the charges for these locker fees, and use your BizBox integration to invoice your members for it.