The Google Enterprise License Manager API lets you manage Google Workspace and related licenses for all users of a customer that you manage.
curl \
-H "Authorization: Bearer $ACCESS_TOKEN" \
https://licensing.googleapis.com/apps/licensing/v1/product/{productId}/userscurl \
-H "Authorization: Bearer $ACCESS_TOKEN" \
https://licensing.googleapis.com/apps/licensing/v1/product/{productId}/sku/{skuId}/userscurl \
-H "Authorization: Bearer $ACCESS_TOKEN" \
https://licensing.googleapis.com/apps/licensing/v1/product/{productId}/sku/{skuId}/user/{userId}