Memberships
Memberships represent the relationship between user and organization like members.
Find Organization By UserID
GET "https://account.ezeep.com/partner/v1/users/<user_id>/memberships/?expand=organization"
Attribute | Type | Parameter | Required | Description |
---|---|---|---|---|
user_id | str | path | Yes | User UUID |
limit | int | query | No | Number of results to return per page. |
offset | int | query | No | The initial index from which to return the results. |
expand | str | query | No | Expand the field to its fully serialised counterpart. If available, multiple fields can be expanded. |
Example Request
curl --location 'https://account.ezeep.com/partner/v1/users/7bb660df-6ef7-4654-cd38-89583f2f5bca/memberships/?expand=organization' \
--header 'Authorization: Bearer eyJ0eXAiOiJKX1QwLWDhbDciOiJAUzI1NiJ9...'
Example Response
{
"count": 1,
"next": null,
"previous": null,
"results":
[
{
"organization":
{
"id": "b568feca-f8ad-11ed-be56-0242ac120002",
"name": "Example Organization & Co.",
"azure_profile": null,
"owner": "321c5b21-6124-450d-s233-7e5fb2e14367",
"roles": null
},
"roles":
[
"admin"
]
}
]
}
Find Membership Role
GET "https://account.ezeep.com/partner/v1/users/<user_id>/memberships/<organization_id>/?expand=organization"
Attribute | Type | Parameter | Required | Description |
---|---|---|---|---|
user_id | str | path | Yes | User UUID |
organization_id | str | query | Yes | Organization UUID |
expand | str | query | No | Expand the field to its fully serialised counterpart. If available, multiple fields can be expanded. |
Example Request
curl --location 'https://account.ezeep.com/partner/v1/users/7bb660df-6ef7-4654-cd38-89583f2f5bca/memberships/b568feca-f8ad-11ed-be56-0242ac120002/?expand=organization' \
--header 'Authorization: Bearer eyJ0eXAiOiJKX1QwLWDhbDciOiJAUzI1NiJ9...'
Example Response
{
"organization":
{
"id": "b568feca-f8ad-11ed-be56-0242ac120002",
"name": "Example Organization & Co.",
"azure_profile": null,
"owner": "321c5b21-6124-450d-s233-7e5fb2e14367",
"roles": null
},
"roles":
[
"admin"
]
}