Check Stocks

Check Stocks if available and get the stock details. This endpoint checks stock availability using Redis Sorted Sets with key pattern `stock:${ownerId}:${game}:${groupId}`. Each check verifies that sufficient quantities exist in the sorted sets before reserving them. The response indicates availability status and details about missing stock if any.

POST
/stock/check
/stock/check

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

In: header

Request Body

application/jsonRequired

game
Required
string

Game type to check

Value in: "FREE_FIRE" | "FREE_FIRE_SHELL" | "FREE_FIRE_SG" | "FREE_FIRE_ID"

combination
Required
array<number>

Array of combination numbers

quantitynumber

Quantity to check

curl -X POST "https://api.t4b.top/stock/check" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "game": "FREE_FIRE",
    "combination": [
      1,
      2,
      3
    ],
    "quantity": 1
  }'

Ok

{
  "data": {
    "schema": {
      "available": true,
      "missing": {
        "property1": 0,
        "property2": 0
      }
    }
  },
  "statusCode": 200
}