Developers

Flat
Access To User's Receipts
User: LordAshes
Date: 1/21/2016 11:12 am
Views: 1675
Rating: 0

I am working on a Windows 10 Cortana app which would summarize my shop status (i.e. if any new games have been sold since I last asked). I just started playing with the API modifying slightly the provided C# code (that gets a session, get user details, uploads a file and gets a game list).

According to the API documentation, Receipts are listed under User Relationships. The API documentation for the Receipts indicates that receipt details are feteched using the receipt id.

How can I enumerate (list) all the receipts associated with a user so that I can look up the details?

Re: Access To User's Receipts
JT
User: JT
Date: 1/21/2016 12:56 pm
Views: 827
Rating: 0

When you call the user object make sure you include a property for _include_relationships : 1

If you do that, then you'll have a node in the returned JSON called "_relationships", and inside that you'll have one called "receipts". If you use that relationship you can fetch the receipts for that user.

Alternatively, you can just use the user id like this (if you wish to hard code it):

https://www.thegamecrafter.com/api/user/USERID/receipts

Let me know if I can be of further assistance.

PreviousNext