Skip to main content

Getting Started

Make your first API call to Distribution Hub in under 5 minutes.

Prerequisites​

Before you begin:

  • ✅ API keys (AccessKey and SecretKey)
  • ✅ HTTP client (cURL, Postman, or programming language)
  • ✅ Basic understanding of XML format
Need API keys?

Use the API keys supplied during onboarding. See Authentication for setup and key-management guidance.

API Endpoint​

All API requests are sent to a single endpoint:

EnvironmentURLUse For
Staginghttps://api.dev.distribution-hub.com/api/Handler.asmxDevelopment & testing
Productionhttps://api.distribution-hub.com/api/Handler.asmxLive operations
Test in staging first

Use the staging endpoint for development and certification before switching to production.

Step 1: Test Authentication​

Let's verify your credentials by retrieving the list of locations.

Request​

<?xml version="1.0" encoding="UTF-8"?>
<Pull_ListLocations_RQ>
<Authentication>
<AccessKey>[AccessKey]</AccessKey>
<SecretKey>[SecretKey]</SecretKey>
</Authentication>
</Pull_ListLocations_RQ>

Using cURL​

curl -X POST https://api.dev.distribution-hub.com/api/Handler.asmx \
-H "Content-Type: application/xml" \
-d '<?xml version="1.0" encoding="UTF-8"?>
<Pull_ListLocations_RQ>
<Authentication>
<AccessKey>[AccessKey]</AccessKey>
<SecretKey>[SecretKey]</SecretKey>
</Authentication>
</Pull_ListLocations_RQ>'

Expected Response​

<?xml version="1.0" encoding="UTF-8"?>
<Pull_ListLocations_RS>
<Status ID="0">Success</Status>
<ResponseID>5a4f24d5e1494918ba5056fafd88edfa</ResponseID>
<Locations>
<Location LocationID="1" LocationTypeID="6" ParentLocationID="0">Worldwide</Location>
<!-- More locations... -->
</Locations>
</Pull_ListLocations_RS>
Success!

If the response contains <Status ID="0">Success</Status>, the API key pair is working.

Step 2: Retrieve Owner List​

Now let's get the property owners connected to your Sales Channel. Use each returned OwnerID later with Pull_ListOwnerProp_RQ.

Request​

<?xml version="1.0" encoding="UTF-8"?>
<Pull_ListAllOwners_RQ>
<Authentication>
<AccessKey>[AccessKey]</AccessKey>
<SecretKey>[SecretKey]</SecretKey>
</Authentication>
</Pull_ListAllOwners_RQ>

Using cURL​

curl -X POST https://api.dev.distribution-hub.com/api/Handler.asmx \
-H "Content-Type: application/xml" \
-d '<?xml version="1.0" encoding="UTF-8"?>
<Pull_ListAllOwners_RQ>
<Authentication>
<AccessKey>[AccessKey]</AccessKey>
<SecretKey>[SecretKey]</SecretKey>
</Authentication>
</Pull_ListAllOwners_RQ>'

Expected Response​

<?xml version="1.0" encoding="UTF-8"?>
<Pull_ListAllOwners_RS>
<Status ID="0">Success</Status>
<ResponseID>b8057c27e2a84447b6d94fa60a2a533f</ResponseID>
<Owners>
<Owner OwnerID="553968">
<FirstName>John</FirstName>
<SurName>Smith</SurName>
<CompanyName>Rentals United</CompanyName>
<Email>john.smith@domain.com</Email>
<Phone>+48 22 000 00 00</Phone>
<User>
<UserName>john.smith@domain.com</UserName>
</User>
<UserAccountId>2012</UserAccountId>
</Owner>
<Owner OwnerID="G-sfg53vgg">
<FirstName>Maria</FirstName>
<SurName>Garcia</SurName>
<CompanyName>Guesty</CompanyName>
<Email>maria.garcia@example.com</Email>
<Phone>+1 415 555 0100</Phone>
<UserAccountId>0</UserAccountId>
</Owner>
</Owners>
</Pull_ListAllOwners_RS>
ID Prefixes

Notice the owner ID formats:

  • 553968 (no prefix) = Rentals United owner
  • G-sfg53vgg (G- prefix) = Guesty owner

Matching is case-sensitive. Pass each ID unchanged in later methods; DH routes by the prefix.

Step 3: Get Property Details​

Retrieve detailed information about a specific property.

Request​

<?xml version="1.0" encoding="UTF-8"?>
<Pull_ListSpecProp_RQ>
<Authentication>
<AccessKey>[AccessKey]</AccessKey>
<SecretKey>[SecretKey]</SecretKey>
</Authentication>
<PropertyID>12345</PropertyID>
</Pull_ListSpecProp_RQ>

Response Includes​

  • Property details (name, description, address)
  • Room composition and amenities
  • Photos and images
  • Check-in/check-out rules
  • Owner/landlord information
  • Geo-coordinates

Understanding Response Status​

Every response includes a Status element:

Success Response​

<Status ID="0">Success</Status>

Error Response​

<Status ID="18">Property with given ID does not exist.</Status>

Always check Status@ID before processing response data. ID 0 means success; see List General Statuses for the status dictionary.

Common First-Time Issues​

IssueCauseSolution
401 UnauthorizedInvalid API keyVerify the AccessKey / SecretKey pair
Status ID 18Property does not exist or is not connectedVerify the PropertyID
EmptyResponseWrong endpointVerify you're using correct URL
TimeoutNetwork issueCheck firewall, retry request

Security Best Practices​

  • ✅ Always use HTTPS (never HTTP)
  • ✅ Store API keys securely (environment variables or secure vault)
  • ✅ Never commit API keys to version control
  • ✅ Rotate API keys periodically
  • ❌ Never log SecretKey in request/response logs
  • ❌ Never expose API keys in client-side code

Next Steps​

Now that you've made your first successful API calls, continue your learning journey:

Step 1: Understand Core Concepts​

Learn the fundamentals before building a complete integration:

  1. Authentication - Credential security
  2. Error Handling - Handle failures gracefully
  3. Rate Limiting & Performance - Optimize API usage

Step 2: Build Complete Integration​

After understanding the fundamentals:

👉 Complete Integration Guide

Comprehensive guide covering:

  • ✅ Full data synchronization (properties, availability, pricing)
  • ✅ Live Notification Mechanism (LNM) setup
  • ✅ Booking creation with validation
  • ✅ Error handling and retry logic
  • ✅ Complete code examples
  • ✅ Certification requirements

Step 3: Explore API Operations​

👉 API Reference

Browse 50+ operations:

  • Properties, Owners, Reservations
  • Availability, Pricing, Restrictions
  • Dictionaries (reference data)
  • Live Notifications

Need Help?