Introduction
StructurrAI Mappings is a comprehensive hotel mapping solution that helps you maintain accurate and up-to-date hotel mappings across multiple providers. Our system processes millions of hotel mappings daily to ensure your inventory stays synchronized.
Key Features
Getting Started
1. Authentication
Obtain your API key from the dashboard
2. Base URL
All API requests should be made to
3. Response Format
All responses are returned in JSON format
Fetch Hotel Count
GETRetrieve the total count of hotels in the mapping system
Required. The API key associated with your account.
Required. The account ID associated with your StructurrAI Mappings account.
Response Reference
{
"MappingCount": 100,
"ApiType": "new",
"Status": true,
"Message": "Success",
"StatusCode": 200
}Fetch Mappings
GETThis API provides mappings that are newly added or updated in your account after the date specified in the lastUpdatedDateTime parameter of your API request.
The unique identifier for each content sync run.
The API key associated with your account.
The account ID registered with StructurrAI Mappings.
Response Reference
{
"Mappings": [
{
"StructurraiId": "STR_1545",
"HotelName": "Grand Plaza Hotel",
"Address": "123 Main Street, New York, NY 10001, USA",
"Latitude": 40.7128,
"Longitude": -74.006,
"Status": "Active",
"LastUpdated": "2023-06-15T14:30:00Z",
"ProviderDetail": [
{
"ProviderFamily": "HotelBeds",
"ProviderId": "HBA_67890"
},
{
"ProviderFamily": "TBO",
"ProviderId": "TBO_088675"
}
]
}
],
"ResumeKey": "d8e8fca2-dc0f-4a4a-8d1d-934e943a354b",
"Status": true,
"Message": "Success",
"StatusCode": 200
}Fetch New Mappings
GETGet new mapping entries added to the system
Required. The API key associated with your account for authentication.
Required. The account ID associated with your registered account.
Required. A unique identifier for each content synchronization cycle.
Fetch Updated Mappings
GETRetrieve mappings that have been updated since the last sync
Required. The API key associated with your account.
ISO 8601 formatted date-time to fetch updates from.
Fetch Deleted Mappings
GETRetrieve mappings that have been removed from the system
Required. The API key associated with your account.
Required. The sync cycle identifier.
Fetch Mapping Statistics
GETGet statistics about your mapping data including total counts and accuracy metrics
Required. The API key associated with your account.
Required. Your StructurrAI account identifier.
Response Reference
{
"TotalMappings": 1250000,
"ActiveMappings": 1200000,
"NewMappingsToday": 5420,
"UpdatedMappingsToday": 12350,
"AccuracyRate": 99.9,
"ProvidersConnected": 15,
"Status": true,
"Message": "Success"
}Code Examples
Integration examples in popular programming languages
curl -X GET "https://api.structurrai.com/v1/mappings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"accountId": "YOUR_ACCOUNT_ID", "syncId": "YOUR_SYNC_ID"}'import requests
url = "https://api.structurrai.com/v1/mappings"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
params = {
"accountId": "YOUR_ACCOUNT_ID",
"syncId": "YOUR_SYNC_ID"
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
for mapping in data["Mappings"]:
print(f"Hotel: {mapping['HotelName']}")
print(f"ID: {mapping['StructurraiId']}")const fetchMappings = async () => {
const response = await fetch(
'https://api.structurrai.com/v1/mappings?' +
new URLSearchParams({
accountId: 'YOUR_ACCOUNT_ID',
syncId: 'YOUR_SYNC_ID'
}),
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
}
);
const data = await response.json();
console.log('Mappings:', data.Mappings);
};
fetchMappings();Need Help?
Contact our support team at pankaj@structurrai.com for assistance with API integration or technical questions.
Contact Support