staffMembers
query
Enterprise
Requires read_store_staff access scope.
An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Query information for all staff members in the store.
Arguments
Returns elements following the specified cursor. The
first argument must also be specified when using this argument.Returns elements preceding the specified cursor. The
last argument must also be specified when using this argument.Returns the first n elements in the list.
Returns the last n elements in the list.
Whether to reverse the order of the list.
● true: reverse
● false: do not reverse
Default value: false
Return
A list of cursor and node information for the current page data.
The information used for pagination.
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Query all store staff members
Code
query StaffMembers {
staffMembers(first: 1, reverse: false) {
edges {
node {
uid
phone
name
active
isShopOwner
email
}
}
pageInfo {
hasNextPage
endCursor
startCursor
}
}
}
Response
{
"data": {
"staffmembers": {
"edges": [
{
"cursor": "eyJyZXNvdXJjZUlkIjoiMTYwNjU4ODE0NTU5Njc5MjA2NTk1MzE5NTAifQ==",
"node": {
"active": true,
"email": "test@163.com",
"isShopOwner": true,
"name": "test",
"phone": "13000000000",
"uid": "111"
}
}
],
"pageInfo": {
"endCursor": "eyJyZXNvdXJjZUlkIjoiMTYwNjU4ODE0NTU5Njc5MjA2NTk1MzE5NTAifQ==",
"hasNextPage": "true",
"startCursor": "eyJyZXNvdXJjZUlkIjoiMTYwNjU4ODE0NTU5Njc5MjA2NTk1MzE5NTAifQ=="
}
}
}
}
Was this article helpful to you?