API Call to pull item purchases and price paid | API Developme…
API Call to pull item purchases and price paid
    • jchawk [2745769]
    • Role: Civilian
    • Level: 40
    • Posts: 7
    • Karma: 38
    • Last Action: 13 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Thread created on 21:19:43 - 29/07/22 (5 months ago)
    |
    Last replied 16:00:08 - 13/08/22 (5 months ago)
    I’m trying to learn the API but haven’t come across a specification for what options are available.

    I’d like to pull item purchases that I’ve made. Item type, quantity and price paid.

    Also is there a way to select a range based on date/time?

    Thanks in advance for any help.
    • Zer0CooL [298394]
    • Role: Civilian
    • Level: 100
    • Posts: 846
    • Karma: 89
    • Last Action: 37 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 12:41:15 - 03/08/22 (5 months ago)
    Post link copied to clipboard Copy post link
    as far as I know the only way to do this is to use the log API : 

    https://api.torn.com/user/?selections=log&key=

    pawnhub

    • Aithril [2676577]
    • Role: Civilian
    • Level: 45
    • Posts: 53
    • Karma: 8
    • Last Action: 1 day
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 00:25:32 - 04/08/22 (5 months ago)
    Post link copied to clipboard Copy post link
    Something like this:
    https://api.torn.com/user/log/data?selections=log&log=4201&from=1659160799&key=<your key here>

    Where "from" is a unixtimestamp of the earliest you want to go back (or leave it off).

    You can find the log category id (4201) by looking at your log:
    https://www.torn.com/page.php?sid=log

    Choosing "Item abroad Buy" changes the URL to https://www.torn.com/page.php?sid=log&log=4201 so your log ID is 4201.
    • LouBaker [1162207]
    • Role: Civilian
    • Level: 100
    • Posts: 2841
    • Karma: 1714
    • Last Action: 6 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 16:00:08 - 13/08/22 (5 months ago)
    Post link copied to clipboard Copy post link
    I'll just add this because you didn't mention it above

    you can get a list of the log types with this link

    https://api.torn.com/torn/?selections=logtypes&key=


Reply
Thread Title: