Join our community at https://www.reddit.com/r/HotelByte/

HotelByte
HomepageWaitlist
HomepageWaitlist
Hotel Partners Roadmap
Submit issues
  1. 2. Guides
  • 1. Get started
    • Overview
    • Booking flow
    • Certification and Go Live
    • Frequently Asked Questions (FAQ)
  • 2. Guides
    • Quick start
    • Error handling
    • Rate limit
    • Certification cases
    • Test more scenarios
  • 3. API Reference
    • Authentication
      • Ticket
    • Content
      • Destinations
      • HotelStaticDetail
      • HotelsMetadata
    • Search
      • HotelList
      • HotelRates
    • Make bookings
      • CheckAvail
      • Book
    • Manage bookings
      • QueryOrders
      • Cancel
  • Schemas
    • Schemas
    • hotel.common.bff.Table
    • OrderHomeFunctionReq
    • TicketReq
    • TicketResp
    • DestinationInclude
    • DestinationExtra
    • Coordinates
    • CheckAvailReq
    • CheckAvailResp
    • HotelsMetadataListResp
    • HotelsMetadataReq
    • ComputedCancelPolicyItem
    • OrderHomeFunctionResp
    • OriginalRoomNaming
    • Rate
    • CancelResp
    • Tax
    • Holder
    • HotelOrder
    • OrderRoomRefundInfo
    • HotelListReq
    • HotelListResp
    • HotelListBasicInfo
    • BaseHeader
    • BookingHeader
    • ContentHeader
    • HotelMeta
    • DestinationType
    • Guest
    • DestinationsReq
    • DestinationsResp
    • OrderStatus
    • GuestPerRoom
    • RatePkgId
    • RoomRatePkg
    • HotelRatesReq
    • BookReq
    • HotelRatesResp
    • BookResp
    • CancelReq
    • QueryOrdersReq
    • HotelStaticDetailReq
    • QueryOrdersResp
    • HotelStaticDetailResp
  1. 2. Guides

Certification cases

HotelByte API Certification Test Cases#

Overview#

This document defines the complete test certification process required for integrating with the HotelByte hotel distribution API platform. All API integrators must complete the following test cases and submit corresponding test information to obtain production environment access.

Test Environment Information#

Test Environment URL: https://api-test.hotelbyte.com
Authentication Method: Bearer Token (obtained via /ticket endpoint)
Test Credentials:
appKey: hotelbyte_api_demo
appSecret: hotelbyte_api_demo
Documentation URL: https://openapi.hotelbyte.com
Technical Support: support@hotelbyte.com

Prerequisites#

Before starting the certification tests, ensure you have successfully completed the following basic integration steps:
1.
Authentication: Successfully call /ticket endpoint to obtain access tokens
2.
Content Retrieval: Successfully call /destinations, /hotelsMetadata endpoints
3.
Basic API Understanding: Familiar with our dual-layer error system and response formats

Core Test Process#

Phase 1: Search and Price Query#

1.1 Hotel List Search#

Objective: Verify multi-hotel search functionality
Test Steps:
1.
Call /hotelList endpoint for hotel search
2.
Test different search condition combinations
Test Cases:
Case A: Basic Search
Destination: Paris
Check-in Date: 2025-10-15
Check-out Date: 2025-10-17
Guests: 2 adults, 1 child
Rooms: 1 room
Case B: Specific Hotel Search (maximum 50 hotel IDs)
Hotel ID List: ["hotel_xxxxx", "hotel_yyyyy"] (no more than 50)
Other parameters same as Case A
Case C: Multi-room Search
Destination: London
Check-in Date: 2025-10-20
Check-out Date: 2025-10-22
Guests: 2 adults (calculated by maximum adult count)
Rooms: 2 rooms
Submission Information:
Test Time: YYYY-MM-DD HH:MM:SS
Session ID: session_xxxxx
Case A Hotels Returned: XX hotels
Case B Hotels Returned: XX hotels
Case C Hotels Returned: XX hotels
First Hotel with Room Types ID: hotel_xxxxx
Verify Allotment Field: ✓ or ✗ (if provided by supplier)

1.2 Hotel Price Detail Query#

Objective: Verify single hotel detailed price information
Test Steps:
1.
Use hotel ID and Session ID from previous step to call /hotelRates endpoint
2.
Verify returned price and room type information
Submission Information:
Test Time: YYYY-MM-DD HH:MM:SS
Session ID: session_xxxxx
Hotel ID: hotel_xxxxx
Number of Room Types Returned: XX types
First Room Type ID: room_xxxxx
First Rate Package ID: rate_xxxxx
Verify Price Types: netRate, commissionableRate, grossRate

Phase 2: Booking Process Test#

2.1 Room Availability Check#

Objective: Verify room real-time availability
Test Steps:
1.
Use rate package ID from previous step to call /checkAvail endpoint
2.
Verify room availability status and totalRate
Submission Information:
Test Time: YYYY-MM-DD HH:MM:SS
Session ID: session_xxxxx
Rate Package ID: rate_xxxxx
Availability Status: AVAILABLE or UNAVAILABLE
Final Price: $XXX.XX
Verify Real-time Confirmation: ✓ (no "on request" bookings supported)

2.2 Create Booking Order#

Objective: Verify complete booking process
Test Steps:
1.
Use available rate package to call /book endpoint to create order
2.
Provide complete guest information and payment information
Submission Information:
Test Time: YYYY-MM-DD HH:MM:SS
Session ID: session_xxxxx
Rate Package ID: rate_xxxxx
Platform Order ID: order_xxxxx
Supplier Order ID: supplier_order_xxxxx
Order Status: CONFIRMED or FAILED
Hotel Confirmation Number (HCN): hotel_conf_xxxxx (if returned immediately)
Customer Reference Number: customer_ref_xxxxx

Phase 3: Order Management Test#

3.1 Order Query#

Objective: Verify order query functionality
Test Steps:
1.
Use order ID from previous step to call /queryOrders endpoint
2.
Verify order detailed information
Submission Information:
Test Time: YYYY-MM-DD HH:MM:SS
Queried Order ID: order_xxxxx
Returned Order Status: CONFIRMED
Hotel Confirmation Number (HCN): hotel_conf_xxxxx
Verify Query by customerReferenceNo: ✓
Verify Query by supplierReferenceNo: ✓

3.2 Order Cancellation (Optional)#

Objective: Verify order cancellation functionality
Test Steps:
1.
Call /cancel endpoint to cancel test order
2.
Verify cancellation result
Submission Information:
Test Time: YYYY-MM-DD HH:MM:SS
Cancelled Order ID: order_xxxxx
Cancellation Status: CANCELLED
Cancellation Fee: $XX.XX

Advanced Feature Tests (Optional)#

4.1 Multi-language Support Test#

Objective: Verify internationalization functionality
Test Steps:
1.
Set Language: zh-CN in request headers
2.
Call any endpoint to verify returned content language
Submission Information:
Test Time: YYYY-MM-DD HH:MM:SS
Test Language: zh-CN
Verified Endpoint: /hotelList
Language Correctness: ✓ or ✗

4.2 Currency Conversion Test#

Objective: Verify multi-currency support
Test Steps:
1.
Set Currency: EUR in request headers
2.
Call price-related endpoints to verify currency conversion
Submission Information:
Test Time: YYYY-MM-DD HH:MM:SS
Test Currency: EUR
Verified Endpoint: /hotelRates
Currency Correctness: ✓ or ✗

4.3 Error Handling Test#

Objective: Verify dual-layer error system
According to the HotelByte Error Handling Documentation, our API uses a dual-layer error system:
1.
HTTP Status Code: Standard HTTP response status
2.
Business Error Code: Custom business logic error codes in response body
Important: Always check the code field in the response body, not just the HTTP status code.
Test Cases:

Transport Layer Errors (HTTP Status Code)#

Invalid authentication token (HTTP 401 + Business Code 100000401)
Non-existent hotel ID (HTTP 404 + Business Code 100000404)
Invalid date format (HTTP 400 + Business Code 100000400)
Rate limit exceeded (HTTP 429 + Business Code 100000429)
Internal server error (HTTP 500 + Business Code 100000500)
Gateway timeout (HTTP 504 + Business Code 100000504)

Business Logic Errors (HTTP 200 + Non-zero Business Code)#

Page size exceeded (HTTP 200 + Business Code 100001005)
Feature not implemented (HTTP 200 + Business Code 100001006)
Data format mismatch (HTTP 200 + Business Code 100001008)
Price information changed (HTTP 200 + Business Code 100001111)
Credit limit exceeded (HTTP 200 + Business Code 100001112)
Error Response Format Verification:
{
    "code": 100000400,
    "msg": "param error"
}
Success Response Format Verification:
{
    "code": 0,
    "msg": "Success",
    "data": {
        // Response data
    }
}
Submission Information:
Test Time: YYYY-MM-DD HH:MM:SS
Transport Layer Error Test: ✓ (HTTP status codes correct)
Business Logic Error Test: ✓ (business codes correct)
Error Response Format: ✓ (includes code and msg fields)
Success Response Format: ✓ (includes code, msg, and data fields)
Retry Mechanism Test: ✓ (based on business error codes, not HTTP status codes)
Idempotency Test: ✓ (same customerReferenceNo)

Performance Test Requirements#

5.1 Response Time Test#

Objective: Verify API response performance
Test Requirements:
Search endpoint response time < 5 seconds
Price query endpoint response time < 3 seconds
Booking endpoint response time < 10 seconds
Submission Information:
Test Time: YYYY-MM-DD HH:MM:SS
Average Response Time: XXms
Maximum Response Time: XXms
Success Rate: XX%

5.2 Concurrency Test#

Objective: Verify system concurrency handling capability
Test Requirements:
Simultaneously initiate 10 search requests
Verify all requests respond normally
Test rate limiting handling
Submission Information:
Test Time: YYYY-MM-DD HH:MM:SS
Concurrent Request Count: 10
Successful Request Count: XX
Average Response Time: XXms
Rate Limiting Test: ✓ (RPM limits controlled by supplier)

Test Data Requirements#

Required Test Data#

Test Dates: Use dates lasting more then 1 night with leading time less than 30 days
Test Guests: Include adult and child combinations (children aged 0-17)
Test Room Types: Test at least standard rooms and suites
Test Nationalities: Test impact of different nationalities on pricing
Test Currencies: Test multi-currency support (USD, EUR, GBP, etc.)

Data Validation Requirements#

All returned IDs have correct format
Price information includes currency symbols
Date format complies with ISO 8601 standard
Address information is complete and accurate

Submission Requirements#

Submission Format#

Please submit test results in the following format:
{
  "companyName": "Your Company Name",
  "contactEmail": "contact@company.com",
  "testDate": "2024-XX-XX",
  "testResults": {
    "content": { /* Content retrieval test results */ },
    "search": { /* Search test results */ },
    "booking": { /* Booking test results */ },
    "orderManagement": { /* Order management test results */ },
    "advancedFeatures": { /* Advanced feature test results */ },
    "performance": { /* Performance test results */ }
  },
  "issues": [ /* List of encountered issues */ ],
  "recommendations": [ /* Improvement suggestions */ ]
}

Submission Method#

Send email to: support@hotelbyte.com
Email subject: Integration Review Request
Attachment: Test results JSON file
Include information:
API endpoint and method
Request parameters and headers
Complete error response
Request ID and timestamp
Integration context

Certification Standards#

Pass Criteria#

✅ All core functionality tests pass
✅ Error handling tests pass
✅ Performance tests meet standards
✅ No serious functional defects
Previous
Rate limit
Next
Test more scenarios
Built with