Skip to main content

User Account Summary

Overview

Requests to this endpoint will retrieve a summary of a users PlayStation Stars profile. It includes their enrollment status, their progress through the reward tiers, their points balance and the first 3 items on their collectibles display case.

The endpoint can query the authenticating account, or it can query another user account (providing that the privacy settings on the other account allow it).

https://m.np.playstation.com/api/graphql/v1/op?operationName=metGetAccount
info

If you query an account (other than the authenticating account) which has either not enrolled with PlayStation Stars or has not given the authenticating account permission to view their PlayStation Stars Level or Display Case then the API will return a successful response with an error object contained within.

Click to view full error response
{
"errors": [
{
"message": "User not found",
"type": "NimbusNormalizedError",
"error": {
"reason": "NotFound",
"code": -1,
"source": "-1",
"message": "User not found",
"referenceId": "cc04c1d0-e8c5-4ca2-93a2-a339f0d66f8f"
},
"statusCode": 404,
"errorCode": -1,
"humanReadableCode": "",
"humanReadableValidationErrors": [],
"apiName": "getAccount"
}
],
"data": {
"loyaltyAccountRetrieve": null
}
}

Input Parameters

ParameterValue
operationNamemetGetAccount
variables{"accountId":"me"}
extensions{"persistedQuery":{"version":1,"sha256Hash":"743c32289cdd6fbdead3b34ea80b48d63f8ddab34581469c4dda4ea412e6cf6b"}}
PropertyParent ParameterTypeExample ValuesDescriptionRequired
accountIdvariablesStringme
12340..
The Id of the account to be queried
Use me for the authenticating account
Yes

Output JSON Response

A JSON response is returned. The following are returned under the data attribute.

AttributeTypeExample ValueDescription
loyaltyAccountRetrieveJSON object
LoyaltyAccount
Contains a collection of objects for the user including their enrollment status, progress through reward tiers, points balance and their collectibles display case

LoyaltyAccount JSON object

AttributeTypeExample ResponseDescription
__typenameStringLoyaltyAccount
collectibleSceneJSON object
LoyaltyCollectibleScene
Users collectibles display case (images only)
collectiblesJSON objects
LoyaltyCollectibleDisplayItem
First 3 collectibles in the users display case
enrollStatusJSON object
LoyaltyEnrollStatus
Users enrollment status
pointsBalanceJSON object
LoyaltyPointBalance
Users reward points balance
Authenticating account only Returns as null for other account
requiresTosAcceptanceBooleanfalseTrue if the user has not completed the sign up process
Authenticating account only Returns as null for other account
statusLevelJSON object
LoyaltyStatusLevel
Users reward tier progress

LoyaltyCollectibleScene JSON object

AttributeTypeExample ResponseDescription
__typenameStringLoyaltyCollectibleScene
assetsJSON object
Media
Media associated with the collectibles display case (scene)
idStringa68f1a18-de00-429d-b4dc-d0bc66b748c7GUID for the scene

Media (Scene) JSON object

AttributeTypeExample ResponseDescription
__typenameStringMedia
roleStringBACKGROUND
TILE
PREVIEW
What the media is used for
urlStringhttps://sky-assets.api.playstation.com/sky/p1-np/collectibleScene/image/ice_background.pngURL for the media

LoyaltyCollectibleDisplayItem JSON object

AttributeTypeExample ResponseDescription
__typenameStringLoyaltyCollectibleDisplayItem
assetsJSON object
Media
Media associated with the collectible (images, video)
idStringempty-slot-0
4aaf72d0-ceeb-57ab-ad13-09e4ee36ae2e
GUID for the displayed collectible
empty-slot-x if the user has not set a collectible in this display position
isEmptyBooleantrueTrue if the user has not set a collectible in this display position

Media (Collectible) JSON object

AttributeTypeExample ResponseDescription
__typenameStringMedia
typeStringIMAGE
VIDEO
The media type
urlStringhttps://sky-assets.api.playstation.com/sky/p1-np/collectible/image/masterImage_png_408_1664306310803.png
https://sky-assets.api.playstation.com/sky/p1-np/collectible/video/video_mp4_408_1662591675454.mp4
URL for the media

LoyaltyEnrollStatus JSON object

AttributeTypeExample ResponseDescription
__typenameStringLoyaltyEnrollStatus
enrolledDateTimeDate (UTC)2022-09-29T08:00:40.758043ZDate the user enrolled into PlayStation Stars
isUserEligibleToEnrollBooleantrueTrue if the user is eligible to enroll
isUserEnrolledBooleantrueTrue if the user is enrolled
statusStringENROLLEDAdditional enrollment status indicator

LoyaltyPointBalance JSON object

AttributeTypeExample ResponseDescription
__typenameStringLoyaltyPointBalance
displayTotalPointsBalanceString"0"Total reward points balance (string formatted)
totalCampaignsCompletedNumeric0Total campaigns (challenges) completed
totalPointsBalanceNumeric0Total reward points balance

LoyaltyStatusLevel JSON object

AttributeTypeExample ResponseDescription
__typenameStringLoyaltyStatusLevel
currentStatusLevelStringSapphireName of the current reward tier
expiryDateDate (UTC)null
2023-09-29T08:00:40.758043Z
Likely the date that the current tier will be downgraded
But could be date points balance expires
nextStatusProgressNumeric0Progress to next reward tier
statusLevelNumberNumeric1Current reward tier
totalPurchaseEarnedNumeric0Number of "full game" purchases made towards next reward tier
totalPurchaseNeededNumeric1Number of "full game" purchases required for next reward tier
totalTrophiesEarnedNumeric0Number of trophies earned towards next reward tier
totalTrophiesNeededNumeric1Number of trophies required for next reward tier

Examples with Responses

Example 1 - Retrieve summary for the authenticating account

See using a Web Browser to query the API

https://m.np.playstation.com/api/graphql/v1/op?operationName=metGetAccount&variables=%7B%22accountId%22%3A%22me%22%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%22743c32289cdd6fbdead3b34ea80b48d63f8ddab34581469c4dda4ea412e6cf6b%22%7D%7D
Click to view full JSON response
{
"data": {
"loyaltyAccountRetrieve": {
"__typename": "LoyaltyAccount",
"collectibleScene": {
"__typename": "LoyaltyCollectibleScene",
"assets": [
{
"__typename": "Media",
"role": "BACKGROUND",
"url": "https://sky-assets.api.playstation.com/sky/p1-np/collectibleScene/image/ice_background.png"
},
{
"__typename": "Media",
"role": "TILE",
"url": "https://sky-assets.api.playstation.com/sky/p1-np/collectibleScene/image/Ice_Tile.png"
},
{
"__typename": "Media",
"role": "PREVIEW",
"url": "https://sky-assets.api.playstation.com/sky/p1-np/collectibleScene/image/Ice_Preview.png"
}
],
"id": "a68f1a18-de00-429d-b4dc-d0bc66b748c7"
},
"collectibles": [
{
"__typename": "LoyaltyCollectibleDisplayItem",
"assets": null,
"id": "empty-slot-0",
"isEmpty": true
},
{
"__typename": "LoyaltyCollectibleDisplayItem",
"assets": null,
"id": "empty-slot-1",
"isEmpty": true
},
{
"__typename": "LoyaltyCollectibleDisplayItem",
"assets": null,
"id": "empty-slot-2",
"isEmpty": true
}
],
"enrollStatus": {
"__typename": "LoyaltyEnrollStatus",
"enrolledDateTime": "2022-09-29T08:00:40.758043Z",
"isUserEligibleToEnroll": true,
"isUserEnrolled": true,
"status": "ENROLLED"
},
"pointsBalance": {
"__typename": "LoyaltyPointBalance",
"displayTotalPointsBalance": "0",
"totalCampaignsCompleted": 0,
"totalPointsBalance": 0
},
"requiresTosAcceptance": false,
"statusLevel": {
"__typename": "LoyaltyStatusLevel",
"currentStatusLevel": "Sapphire",
"expiryDate": null,
"nextStatusProgress": 0,
"statusLevelNumber": 1,
"totalPurchaseEarned": 0,
"totalPurchaseNeeded": 1,
"totalTrophiesEarned": 0,
"totalTrophiesNeeded": 1
}
}
}
}

Example 2 - Retrieve summary for user account with accountId 0000000000000000000

See using a Web Browser to query the API

https://m.np.playstation.com/api/graphql/v1/op?operationName=metGetAccount&variables=%7B%22accountId%22%3A%220000000000000000000%22%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%22743c32289cdd6fbdead3b34ea80b48d63f8ddab34581469c4dda4ea412e6cf6b%22%7D%7D
Click to view full JSON response
{
"data": {
"loyaltyAccountRetrieve": {
"__typename": "LoyaltyAccount",
"collectibleScene": {
"__typename": "LoyaltyCollectibleScene",
"assets": [
{
"__typename": "Media",
"role": "BACKGROUND",
"url": "https://sky-assets.api.playstation.com/sky/p1-np/collectibleScene/image/ice_background.png"
},
{
"__typename": "Media",
"role": "TILE",
"url": "https://sky-assets.api.playstation.com/sky/p1-np/collectibleScene/image/Ice_Tile.png"
},
{
"__typename": "Media",
"role": "PREVIEW",
"url": "https://sky-assets.api.playstation.com/sky/p1-np/collectibleScene/image/Ice_Preview.png"
}
],
"id": "a68f1a18-de00-429d-b4dc-d0bc66b748c7"
},
"collectibles": [
{
"__typename": "LoyaltyCollectibleDisplayItem",
"assets": null,
"id": "empty-slot-0",
"isEmpty": true
},
{
"__typename": "LoyaltyCollectibleDisplayItem",
"assets": null,
"id": "empty-slot-1",
"isEmpty": true
},
{
"__typename": "LoyaltyCollectibleDisplayItem",
"assets": null,
"id": "empty-slot-2",
"isEmpty": true
}
],
"enrollStatus": {
"__typename": "LoyaltyEnrollStatus",
"enrolledDateTime": "2022-09-29T19:15:18.293261Z",
"isUserEligibleToEnroll": true,
"isUserEnrolled": true,
"status": "ENROLLED"
},
"pointsBalance": null,
"requiresTosAcceptance": null,
"statusLevel": {
"__typename": "LoyaltyStatusLevel",
"currentStatusLevel": "Sapphire",
"expiryDate": null,
"nextStatusProgress": 0,
"statusLevelNumber": 1,
"totalPurchaseEarned": 0,
"totalPurchaseNeeded": 1,
"totalTrophiesEarned": 0,
"totalTrophiesNeeded": 1
}
}
}
}

Example 3 - Retrieve summary for an authenticating account which has not enrolled in the service

See using a Web Browser to query the API

https://m.np.playstation.com/api/graphql/v1/op?operationName=metGetAccount&variables=%7B%22accountId%22%3A%22me%22%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%22743c32289cdd6fbdead3b34ea80b48d63f8ddab34581469c4dda4ea412e6cf6b%22%7D%7D
Click to view full JSON response
{
"data": {
"loyaltyAccountRetrieve": {
"__typename": "LoyaltyAccount",
"collectibleScene": {
"__typename": "LoyaltyCollectibleScene",
"assets": null,
"id": null
},
"collectibles": null,
"enrollStatus": {
"__typename": "LoyaltyEnrollStatus",
"enrolledDateTime": null,
"isUserEligibleToEnroll": false,
"isUserEnrolled": false,
"status": "NOT_ENROLLED"
},
"pointsBalance": null,
"requiresTosAcceptance": true,
"statusLevel": {
"__typename": "LoyaltyStatusLevel",
"currentStatusLevel": null,
"expiryDate": null,
"nextStatusProgress": null,
"statusLevelNumber": null,
"totalPurchaseEarned": null,
"totalPurchaseNeeded": null,
"totalTrophiesEarned": null,
"totalTrophiesNeeded": null
}
}
}
}