Inventory
curl --request GET \
--url https://api.privetag.com/api/b2a/inventory \
--header 'x-api-key: <api-key>'import requests
url = "https://api.privetag.com/api/b2a/inventory"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.privetag.com/api/b2a/inventory', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.privetag.com/api/b2a/inventory",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.privetag.com/api/b2a/inventory"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.privetag.com/api/b2a/inventory")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.privetag.com/api/b2a/inventory")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"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>"
}
}
}B2A API
Inventory
Check real-time availability and flash deals
GET
/
api
/
b2a
/
inventory
Inventory
curl --request GET \
--url https://api.privetag.com/api/b2a/inventory \
--header 'x-api-key: <api-key>'import requests
url = "https://api.privetag.com/api/b2a/inventory"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.privetag.com/api/b2a/inventory', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.privetag.com/api/b2a/inventory",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.privetag.com/api/b2a/inventory"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.privetag.com/api/b2a/inventory")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.privetag.com/api/b2a/inventory")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"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
string
required
City name (e.g.,
Bangkok, Phuket, Bali)string
ISO 8601 date format. Defaults to today.
string
Check specific activity availability
string
Filter by category:
spa, dinner, theme-park, zoo, aquarium, adventure, cultural, nightlifeboolean
default:"false"
Only return activities with active flash deals (30-50% off)
number
default:"1"
Minimum available slots required
number
Maximum price filter
number
default:"20"
Maximum results (1-50)
Response
boolean
Whether the request was successful
object
Show Properties
Show Properties
array
List of available activities
Show Inventory Item
Show Inventory Item
string
Activity identifier
string
Activity title
string
Activity category
number
Number of slots available
number
Current price
number
Original price (if flash deal)
string
Currency code
boolean
Whether this is a limited-time deal
string
When the deal expires (if applicable)
number
Discount percentage (if flash deal)
string
Activity operating hours
string
When inventory was last synced
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..."
import requests
response = requests.get(
"https://api.privetag.com/api/b2a/inventory",
headers={"x-api-key": "pk_a1b2c3..."},
params={
"city": "Bangkok",
"date": "2025-12-15"
}
)
inventory = response.json()
for item in inventory['data']['inventory']:
print(f"{item['title']}: {item['available_slots']} slots at {item['price']} {item['currency']}")
const params = new URLSearchParams({
city: 'Bangkok',
date: '2025-12-15'
});
const response = await fetch(`https://api.privetag.com/api/b2a/inventory?${params}`, {
headers: {
'x-api-key': 'pk_a1b2c3...'
}
});
const inventory = await response.json();
inventory.data.inventory.forEach(item => {
console.log(`${item.title}: ${item.available_slots} slots`);
});
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
| Field | Description |
|---|---|
is_flash_deal | true if currently discounted |
original_price | Price before discount |
price | Current discounted price |
discount_percent | Percentage off (30-50) |
flash_deal_expires | When deal ends |
Inventory Sync
Our inventory is synced with venues in real-time:| Sync Type | Frequency | Description |
|---|---|---|
| Real-time | Instant | When bookings are made |
| Periodic | Every 15 min | Full inventory refresh |
| On-demand | On request | When 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
Display available activities
Display available activities
Use this endpoint to show users what’s available before they decide. Better than
/recommend when the user wants to browse all options.Find last-minute deals
Find last-minute deals
Set
flash_deals_only=true to find discounted activities for same-day booking. Great for spontaneous travelers.Verify before booking
Verify before booking
Always check availability before calling
/execute_booking to ensure a smooth booking experience.Price comparison
Price comparison
Use
category filter to compare prices across similar activities.Error Responses
| Code | Description |
|---|---|
INVALID_CITY | City not found in our service area |
INVALID_DATE | Date format incorrect or in the past |
ACTIVITY_NOT_FOUND | Specified activity_id doesn’t exist |
NO_INVENTORY | No activities available matching criteria |
Supported Cities
Currently available in Southeast Asia:| Country | Cities |
|---|---|
| 🇹🇭 Thailand | Bangkok, Phuket, Chiang Mai, Pattaya, Krabi |
| 🇻🇳 Vietnam | Ho Chi Minh, Hanoi, Da Nang, Nha Trang |
| 🇮🇩 Indonesia | Bali, Jakarta, Yogyakarta |
| 🇲🇾 Malaysia | Kuala Lumpur, Penang, Langkawi |
| 🇸🇬 Singapore | Singapore |
Next Steps
Get Recommendations
Get personalized activity recommendations
Execute Booking
Book an activity from inventory