Getting Started
Make your first API call to Distribution Hub in under 5 minutes.
Prerequisites
Before you begin:
- ✅ API keys (
AccessKeyandSecretKey) - ✅ HTTP client (cURL, Postman, or programming language)
- ✅ Basic understanding of XML format
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:
| Environment | URL | Use For |
|---|---|---|
| Staging | https://api.dev.distribution-hub.com/api/Handler.asmx | Development & testing |
| Production | https://api.distribution-hub.com/api/Handler.asmx | Live operations |
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>
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>
Notice the owner ID formats:
553968(no prefix) = Rentals United ownerG-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
| Issue | Cause | Solution |
|---|---|---|
401 Unauthorized | Invalid API key | Verify the AccessKey / SecretKey pair |
Status ID 18 | Property does not exist or is not connected | Verify the PropertyID |
EmptyResponse | Wrong endpoint | Verify you're using correct URL |
Timeout | Network issue | Check 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
SecretKeyin 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:
- Authentication - Credential security
- Error Handling - Handle failures gracefully
- Rate Limiting & Performance - Optimize API usage
Step 2: Build Complete Integration
After understanding the fundamentals:
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
Browse 50+ operations:
- Properties, Owners, Reservations
- Availability, Pricing, Restrictions
- Dictionaries (reference data)
- Live Notifications
- Technical issues: Check Error Handling
- Rate limits: See Rate Limiting
- Integration questions: Contact DH Partnership Team