List rental folders
Reconstructed — official concepts (rentalFoldersPaginated).
- GraphQL
- Node.js
- curl
query ListRentalFolders($page: Int!, $pageSize: Int!) {
rentalFoldersPaginated(page: $page, pageSize: $pageSize) {
data {
id
reference
comment
}
meta {
currentPage
hasNextPage
totalCount
}
}
}
const { rentalFoldersPaginated } = await ublo(
`query ($page: Int!, $pageSize: Int!) {
rentalFoldersPaginated(page: $page, pageSize: $pageSize) {
data { id reference }
meta { totalCount hasNextPage }
}
}`,
{ page: 1, pageSize: 20 },
);
- Bearer
- Cookie session
curl -sS -X POST "$UBLO_GRAPHQL_URL" \
-H "Authorization: Bearer $UBLO_API_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"query":"query { rentalFoldersPaginated(page: 1, pageSize: 20) { data { id reference } meta { totalCount } } }"}'
curl -sS -X POST "$UBLO_GRAPHQL_URL" \
-H 'Content-Type: application/json' \
-b cookies.txt \
-d '{"query":"query { rentalFoldersPaginated(page: 1, pageSize: 20) { data { id reference } meta { totalCount } } }"}'
Then select the business fields you need (units, profiles, states) via the schema’s RentalFolder type.