Skip to main content
GET
https://api.privetag.com
/
api
/
b2a
/
inventory
Inventory
curl --request GET \
  --url https://api.privetag.com/api/b2a/inventory \
  --header 'x-api-key: <api-key>'
{
  "success": true,
  "data": {
    "inventory": [
      {
        "activity_id": "<string>",
        "title": "<string>",
        "category": "<string>",
        "available_slots": 123,
        "price": 123,
        "original_price": 123,
        "currency": "<string>",
        "is_flash_deal": true,
        "flash_deal_expires": "<string>",
        "discount_percent": 123,
        "operating_hours": "<string>",
        "last_updated": "<string>"
      }
    ],
    "metadata": {
      "total_results": 123,
      "flash_deals_count": 123,
      "query_date": "<string>",
      "city": "<string>"
    }
  }
}

Check Inventory

Real-time inventory sync with venues. Use this to check availability before booking or to find flash deals.

Use This Endpoint When

Availability check

  • “Is this available tomorrow?”
  • “Any slots left for Saturday?”
  • “Can we book for 6 people?”

Deal hunting

  • “Any deals today?”
  • “What’s on sale?”
  • “Cheapest options available”

Request Parameters

city
string
required
City name (e.g., Bangkok, Phuket, Bali)
date
string
ISO 8601 date format. Defaults to today.
activity_id
string
Check specific activity availability
category
string
Filter by category: spa, dinner, theme-park, zoo, aquarium, adventure, cultural, nightlife
flash_deals_only
boolean
default:"false"
Only return activities with active flash deals (30-50% off)
min_slots
number
default:"1"
Minimum available slots required
max_price
number
Maximum price filter
limit
number
default:"20"
Maximum results (1-50)

Response

success
boolean
Whether the request was successful
data
object

Examples

Check City Inventory

curl -X GET "https://api.privetag.com/api/b2a/inventory?city=Bangkok&date=2025-12-15" \
  -H "x-api-key: pk_a1b2c3..."

Flash Deals Only

curl -X GET "https://api.privetag.com/api/b2a/inventory?city=Phuket&flash_deals_only=true" \
  -H "x-api-key: pk_a1b2c3..."

Specific Activity Availability

curl -X GET "https://api.privetag.com/api/b2a/inventory?activity_id=act_abc123&date=2025-12-15" \
  -H "x-api-key: pk_a1b2c3..."

Category Filter with Price Cap

curl -X GET "https://api.privetag.com/api/b2a/inventory?city=Bangkok&category=spa&max_price=2000" \
  -H "x-api-key: pk_a1b2c3..."

Response Example

{
  "success": true,
  "data": {
    "inventory": [
      {
        "activity_id": "act_abc123",
        "title": "Safari World Bangkok",
        "category": "zoo",
        "available_slots": 45,
        "price": 1500,
        "currency": "THB",
        "is_flash_deal": false,
        "operating_hours": "09:00 - 17:00",
        "last_updated": "2025-12-10T08:00:00Z"
      },
      {
        "activity_id": "act_def456",
        "title": "Oasis Spa - Signature Package",
        "category": "spa",
        "available_slots": 8,
        "price": 1800,
        "original_price": 3000,
        "currency": "THB",
        "is_flash_deal": true,
        "flash_deal_expires": "2025-12-10T18:00:00Z",
        "discount_percent": 40,
        "operating_hours": "10:00 - 22:00",
        "last_updated": "2025-12-10T08:00:00Z"
      }
    ],
    "metadata": {
      "total_results": 42,
      "flash_deals_count": 7,
      "query_date": "2025-12-10",
      "city": "Bangkok"
    }
  }
}

Flash Deals

Flash Deals are same-day discounts (30-50% off) offered by venues to fill remaining capacity. These are exclusive to AI agent bookings and expire at a specific time.

How Flash Deals Work

Flash Deal Response Fields

FieldDescription
is_flash_dealtrue if currently discounted
original_pricePrice before discount
priceCurrent discounted price
discount_percentPercentage off (30-50)
flash_deal_expiresWhen deal ends

Inventory Sync

Our inventory is synced with venues in real-time:
Sync TypeFrequencyDescription
Real-timeInstantWhen bookings are made
PeriodicEvery 15 minFull inventory refresh
On-demandOn requestWhen you call this endpoint
Low Availability Warning: When available_slots is low (< 5), book quickly as slots can sell out between checking and booking.

Use Cases

Use this endpoint to show users what’s available before they decide. Better than /recommend when the user wants to browse all options.
Set flash_deals_only=true to find discounted activities for same-day booking. Great for spontaneous travelers.
Always check availability before calling /execute_booking to ensure a smooth booking experience.
Use category filter to compare prices across similar activities.

Error Responses

CodeDescription
INVALID_CITYCity not found in our service area
INVALID_DATEDate format incorrect or in the past
ACTIVITY_NOT_FOUNDSpecified activity_id doesn’t exist
NO_INVENTORYNo activities available matching criteria

Supported Cities

Currently available in Southeast Asia:
CountryCities
🇹🇭 ThailandBangkok, Phuket, Chiang Mai, Pattaya, Krabi
🇻🇳 VietnamHo Chi Minh, Hanoi, Da Nang, Nha Trang
🇮🇩 IndonesiaBali, Jakarta, Yogyakarta
🇲🇾 MalaysiaKuala Lumpur, Penang, Langkawi
🇸🇬 SingaporeSingapore

Next Steps