An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Query the points information of a single customer, including the name of the points in the store and the number of points remaining for the customer.
Arguments
customerId ● String
customer Id
Return
historyEarned ● UnsignedInt64
The total number of points accumulately earned by the customer
historyRedeemed ● UnsignedInt64
The total number of points accumulately redeemed by the customer
pointName ● String
Points name
pointsBalance ● UnsignedInt64
Remaining available points
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
query points info
query {
pointsInfo(customerId: "gid://shopline/Customer/4602226680") {
historyEarned
pointsBalance
pointName
historyRedeemed
}
}
Response
{
"data": {
"pointsInfo": {
"pointName": "Points",
"pointsBalance": "100",
"historyEarned": "234",
"historyRedeemed": "134"
}
}
}
Was this article helpful to you?