curl -G \
-d "summary=total_count" \
-d "access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/<API_VERSION>/<PRODUCT_CATALOG_ID>/hotels
curl -G \
-d 'fields=["hotel_id","name"]' \
-d 'filter={"name":{"i_contains":"suites"}}' \
-d 'access_token=<ACCESS_TOKEN>'
https://graph.facebook.com/<API_VERSION>/<PRODUCT_CATALOG_ID>/hotels
GET /v25.0/{product-catalog-id}/hotels HTTP/1.1
Host: graph.facebook.com
| Parameter | Description |
|---|---|
bulk_paginationboolean |
Used for iterating over the edge in large chunks
|
filterA JSON-encoded rule |
JSON-encoded WCA rule expression representing the filter to be applied for the edge
|
{
"data": [],
"paging": {},
"summary": {}
}
| Field | Description |
|---|---|
total_countunsigned int32 |
Total number of hotels returned by the query
|
| Error Code | Description |
|---|---|
100 | Invalid parameter |
curl \
-X POST \
-F "hotel_id=h_157" \
-F "name=Sample Hotel" \
-F "images= [ \
{'image_url':'http://www.example.com/pic1.jpg', 'tags':['front view']}, \
{'image_url':'http://www.example.com/pic2.jpg', 'tags':['lobby view']} \
]" \
-F "url=http://www.example.com/samplehotel" \
-F "address={ \
street_address:'1 Hacker Way', \
city:'Menlo Park', \
region:'California', \
country:'United States', \
postal_code:'94025', \
neighborhoods:['Palo Alto','Menlo Park'], \
latitude:37.484116, \
longitude:-122.148244 \
}" \
-F "brand=hotel brand" \
-F "description=hotel description" \
-F "guest_ratings= [ \
{'score':7.8, 'rating_system':'sample_rating', 'number_of_raters':780} \
]" \
-F "star_rating=4" \
-F "loyalty_program=Sample rewards club" \
-F "phone=+351234123456" \
-F "access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/<API_VERSION>/<PRODUCT_CATALOG_ID>/hotels
| Parameter | Description |
|---|---|
addressObject |
The address of the hotel
required city stringrequired city_id stringcountry stringrequired latitude floatrequired longitude floatrequired neighborhoods list<string>postal_code stringregion stringrequired street_address stringrequired Show child parameters |
applinksObject |
App links for native platforms, e.g. Android, IOS and Windows Phone.
web android ios ipad iphone windows_phone Show child parameters |
base_priceint64 |
The base price of the hotel
|
brandstring |
Hotel brand
|
currencyISO 4217 Currency Code | Default value: USD
The currency for base_price, e.g. USD
|
descriptionstring |
Description of the hotel
required |
guest_ratingslist<Object> |
Guest ratings for this hotel.
score floatrequired max_score int64required rating_system stringrequired number_of_raters int64required Show child parameters |
hotel_idstring |
A unique identifier for this hotel provided by advertiser. (i.e. from the id field in the feed
|
imageslist<Object> |
Links to hotel images. Please note that carousel format utilizes a square 1:1 aspect ratio images (recommended size - 600x600px) while single hotel ad uses 1.91:1 aspect ratio image(recommended size - 1200x630px). Please provide at least one image.
required image_url URLrequired tags list<string>Show child parameters |
namestring |
Name of the hotel
required |
phonephone number string |
Hotel's phone number
|
star_ratingfloat |
The star rating of the hotel
|
urlURL |
Link to the external site where you can book a hotel room
required |
Struct {
id: numeric string,
}
| Error Code | Description |
|---|---|
100 | Invalid parameter |