When seller accounts are created, they come with a primary user for basic management. This means the primary user can manage all aspects of the seller account. Larger organizations can have a secondary user to help manage the seller account.
Learn more in our API documentation.
Delete a user
To delete a user, you need to:
Note: Complete these steps in order.
Set up your API client
- Download, install, and open Postman.
- Go to File > New in the menu bar to open the New window.
- Select HTTP.
- Select POST in the request method dropdown.
- Enter your URL (https://[sellername].marketplacer.com/graphql) in the field next to POST.
- Go to the Authorization tab.
- Select API Key in the Type dropdown.
- Fill in the following values:
- Key: MARKETPLACER-API-KEY
- Value: Generate your API key and paste it here. Learn more.
- Add to: Header
- Go to the Headers tab.
- Fill in the following values in their respective columns:
- Key: Content-Type
- Value: application/json
Retrieve the User ID
- Go to the Body tab.
- Select GraphQL.
- Enter the following sellerSearch query to get the User ID (Don't forget to change "SELLERNAME" in the query to your seller name):
-
query{
sellerSearch(attributes: {businessName: "SELLERNAME"}){
sellers{
edges{
node{
businessName
users{
edges{
node{
firstName
userAccountName
username
surname
emailAddress
id
}
}
}
}
}
}
}
}
-
- Click Send.
In the response, look for the user's email address and take note of the User ID.
Delete the user using an API request
- In the Body tab, replace the query with the following (Don't forget to change "USER ID" in the query to the user ID of the user to be deleted):
-
mutation{
userDelete( input: {userId: "USER ID"}){
errors{
field
messages
}
status
}
}
-
- Click Send.
- The user is deleted with the following response: