API Quick Start
Organization members API helps manage membership with efficiency.
You can seamlessly manage membership with AfterShip's Member API and use AfterShip's organization services from the organization admin portal. And with Member API, you can invite a member to join your organization through an email verification flow.
This quickstart guide intends to walk you through 5 common scenarios to let you know how to use membership API to manage your membership.
1. What is a Members API?
Membership represents the relationship between an account and an organization. You can get the list of memberships under your organization through the API, and can add, update, and delete members.
Role permissions need to be configured by contacting the support team. We only support one role for one account and one organization at the moment.
2. API Endpoint
All endpoints are only accessible via HTTPS
.
3. Common scenarios
Scenario 1. Get roles list
Use GET API https://api.aftership.com/admin/2022-01/roles
preparing...
Scenario 2. Create membership
Use POST API https://api.aftership.com/admin/2022-01/memberships
preparing...
Scenario 3. Update membership
Use PATCH API https://api.aftership.com/admin/2022-01/memberships/:id
preparing...
Scenario 4. Delete membership
Use DELETE API https://api.aftership.com/admin/2022-01/memberships/:id
preparing...
Scenario 5. Get member list
Use GET API https://api.aftership.com/admin/2022-01/memberships
preparing...
Limitation
As the owner role is the default role and has the highest privilege of access rights to an organization. There are some limitations to the membership API.
- Doesn’t allow you to create an owner membership
- Doesn’t allow you to update an owner to another role
- Doesn’t allow you to remove an owner membership
- Doesn’t allow you to update a membership with the owner role