Technical Guide
Typical journey for using the API to return information on properties within your group.
1. Review the Documentation
You find an endpoint /properties
that retrieves a list of all properties in your group.
2. Authentication
The API requires an API key and a unique trace token:
bashCopy code$ curl -X GET "https://directbooking.siteminder.com/public-api/api/properties" -H "x-sm-api-key: YOUR_API_KEY" -H "accept: application/json"
3. Identify the Endpoint
Endpoint: /properties
Method: GET
Parameters: page
, perPage
4. Make the API Call
bashCopy code$ curl -X GET "https://directbooking.siteminder.com/public-api/api/properties?page=1&perPage=10" -H "x-sm-api-key: YOUR_API_KEY" -H "accept: application/json"
5. Handle the Response
{
"page":1,
"perPage":10,
"total":50,
"totalPages":5,
"items":[
{
"uuid":"f63ce398-da03-4573-856d-ed8d71e57e3d",
"name":"Demo Hotel"
},
"..."
]
}
6. Handle Errors
If the API key is invalid, you might receive a 401 Unauthorized
response:
{
"error":"Unauthorized",
"message":"Invalid API key"
}
7. Implement Pagination
To fetch the next page of results, update the page
parameter:
bashCopy codecurl -X GET "https://directbooking.siteminder.com/public-api/api/properties?page=2&perPage=10" -H "Authorization: Bearer YOUR_API_KEY" -H "accept: application/json"
Last updated
Was this helpful?