The caller's awards earned from one document
GET
/api/v1/documents/{documentId}/achievements
const url = 'https://api.yggy.tech/api/v1/documents/example/achievements';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.yggy.tech/api/v1/documents/example/achievements \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” documentId
required
string
Header Parameters
Section titled “Header Parameters ” host
string | null
x-yggy-organization-id
string | null
Responses
Section titled “ Responses ”Awards from the document
Media type application/json
object
awards
required
Array<object>
object
id
required
string
rarity
required
string
earnedAt
required
string
sourceDocumentId
required
string | null
Example
{ "awards": [ { "rarity": "common" } ]}Document not found or achievements are not enabled