Skip to main content

User Earned Collectibles

Overview

Requests to this endpoint will retrieve the collectibles that a user has earned.

The endpoint can query the authenticating account only.

The response from this endpoint can be parsed into a table format by using the Collectibles Parser.

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

If you query with an account which has not enrolled with PlayStation Stars then the API will return a successful but empty response.

Click to view full response
{
"data": {
"loyaltyUserCollectiblesRetrieve": []
}
}

Input Parameters

ParameterValue
operationNamemetGetUserCollectibles
variables{"includeDisplayItems":false}
extensions{"persistedQuery":{"version":1,"sha256Hash":"35e365310aa44393f6cdc5d6b53127e137a9a87749692ca3c4c3c49dca92c4ba"}}
PropertyParent ParameterTypeExample ValuesDescriptionRequired
includeDisplayItemsvariablesStringtrue
false
False excludes collectibles which are selected for display on the users display case
True returns all earned collectibles
Yes

Output JSON Response

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

AttributeTypeExample ValueDescription
loyaltyUserCollectiblesRetrieveJSON object
LoyaltyUserCollectible
Contains the users collectibles

LoyaltyUserCollectible JSON object

AttributeTypeExample ResponseDescription
__typenameStringLoyaltyUserCollectible
assetsJSON object
Media
Media associated with the collectible (images, video)
idString4aaf72d0-ceeb-57ab-ad13-09e4ee36ae2eGUID for the collectible
nameStringStar Gazer TelescopeName of the collectible
rarityStringCOMMON
UNCOMMON
RARE
HEROIC
LEGENDARY
MYTHIC
Rarity of the collectible

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

Examples with Responses

Example 1 - Retrieve all collectibles for the authenticating account

See using a Web Browser to query the API

https://m.np.playstation.com/api/graphql/v1/op?operationName=metGetUserCollectibles&variables=%7B%22includeDisplayItems%22%3Atrue%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%2235e365310aa44393f6cdc5d6b53127e137a9a87749692ca3c4c3c49dca92c4ba%22%7D%7D
Click to view full JSON response
{
"data": {
"loyaltyUserCollectiblesRetrieve": [
{
"__typename": "LoyaltyUserCollectible",
"assets": [
{
"__typename": "Media",
"type": "IMAGE",
"url": "https://sky-assets.api.playstation.com/sky/p1-np/collectible/image/masterImage_png_408_1664306310803.png"
},
{
"__typename": "Media",
"type": "VIDEO",
"url": "https://sky-assets.api.playstation.com/sky/p1-np/collectible/video/video_mp4_408_1662591675454.mp4"
}
],
"id": "4aaf72d0-ceeb-57ab-ad13-09e4ee36ae2e",
"name": "Star Gazer Telescope",
"rarity": "COMMON"
},
{
"__typename": "LoyaltyUserCollectible",
"assets": [
{
"__typename": "Media",
"type": "IMAGE",
"url": "https://sky-assets.api.playstation.com/sky/p1-np/collectible/image/masterImage_png_428_1663345652984.png"
},
{
"__typename": "Media",
"type": "VIDEO",
"url": "https://sky-assets.api.playstation.com/sky/p1-np/collectible/video/video_mp4_428_1663345660772.mp4"
}
],
"id": "88d25cfa-26ad-572a-9335-a32b9bcabe13",
"name": "PlayStation Tech Demo Tyrannosaurus Rex ",
"rarity": "UNCOMMON"
}
]
}
}

Example 2 - Retrieve collectibles excluding those on the display case for the authenticating account

See using a Web Browser to query the API

https://m.np.playstation.com/api/graphql/v1/op?operationName=metGetUserCollectibles&variables=%7B%22includeDisplayItems%22%3Afalse%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%2235e365310aa44393f6cdc5d6b53127e137a9a87749692ca3c4c3c49dca92c4ba%22%7D%7D
Click to view full JSON response
{
"data": {
"loyaltyUserCollectiblesRetrieve": []
}
}