Skip to content
TORNLIFE More

API BAZZAR BUG

Started by Skarr02 [3462286] on in Bugs & Issues.

9 replies · 78 views · thread synced · 4 days ago · View on torn.com
About this thread

Posts archived: 10 / 10 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
10
Discussion span
→
People posting
5
Likes on archived posts
5
Posts by staff, officers and moderators
2
Authority score
57 / 100
Historical score
41 / 100
Story score
43 / 100
Engagement score
55 / 100

Most-liked replies

Skarr02 [3462286]

From my testing, the API appears to return the following:

User with no bazaar / no stock

{ "bazaar_timestamp": 1780834726, "bazaar_delay": 30, "bazaar_is_open": true, "bazaar": [] }

User with an active bazaar and stock

{ "bazaar_is_open": true, "bazaar": [ ... ] }

User with a closed bazaar

{ "bazaar_timestamp": 1780835051, "bazaar_delay": 30, "bazaar_is_open": false, "bazaar": [] }

What is confusing is that a user who has never owned a bazaar appears to return:

"bazaar_is_open": true

despite having an empty bazaar array.

 

Is this expected behaviour, where bazaar_is_open simply reflects an "open" state regardless of whether a bazaar exists or contains stock, or is this a bug in the API response?

At the moment, a user with no bazaar and a user with an open bazaar containing zero stock appear to return identical data, making it impossible to reliably distinguish between the two scenarios using bazaar_is_open alone.

IndyCision [2597200]

Behind the scenes everyone has a bazaar, which has the default state of open.

"Purchasing it" just gives you the ability to use it.

(This is why when you first go to use it after unlocking it is already "open")

 

I don't think there is a way to know if a player has unlocked the ability or not in-game.

What happens if you use the bazaar URL in-game for someone who doesn't have it?

Does it show the same thing there too as someone who has it unlocked (flying so cannot test myself)?

https://www.torn.com/profiles.php?XID=userid

 

IndyCision [2597200]

I know it isn't obtainable via API, was just making sure that the game itself would pull back that info (because it means Splent can look at changing the API results accordingly - if it didn't tell you they didn't own a bazaar the answer would be "it gives the same information the game does")

splent [2088243] Admin Staff

Hi, 


Thanks for the report!

I added a new boolean field to API v1 called `bazaar_exists` in the 'user' -> 'bazaar' selection. I hope this will provide the necessary missing information. 

Thanks!