In a static hotel feed, you provide a single price for each hotel. You can't provide different pricing based on check-in date, length of stay or room type. To display more accurate prices in your ads based on these variables, you can use dynamic (date-specific) pricing to provide prices for different dates, different room types and different lengths of stay. Once provided, you can use hotel template tags to use these prices in your ads.
Use batch upload room types and pricing data to share pricing details with Facebook.
See room & pricing parameters for an explanation of all parameters.
Batch upload consists of two parts:
If you use batch upload, limit uploads to 50 MB per file, approximately 50,000 items in a file. We recommend more frequent, smaller updates for pricing variables.
Upload one or more files with room types using the Hotel Rooms Batch API.
Note: If you don't have different room types, you can skip this step.
curl \ -X POST \ -F file=@hotel_rooms_data_xml.xml \ -F "access_token=<ACCESS_TOKEN>" \ https://graph.facebook.com/<API_VERSION>/<PRODUCT_CATALOG_ID>/hotel_rooms_batch
You can provide the room types in XML format; see sample.
You should identify each hotel by <property>
in the <PropertyDataSet>
XML node and provide room type by <RoomData>
. Your file must begin with a <?xml
declaration tag.
For more details on updating and deleting room types through batch API, see Hotel Rooms, Batch Reference.
Upload one or more files with pricing details using the Pricing Variable Batch API. You can upload pricing details with or without room types.
Note: If you only have a very small number of rooms, you can also use the Hotel Room API to create room types and setup pricing.
curl \ -X POST \ -F file=@pricings_data_xml.xml \ -F "access_token=<ACCESS_TOKEN>" \ https://graph.facebook.com/<API_VERSION>/<PRODUCT_CATALOG_ID>/pricing_variables_batch
Before you upload room types, make sure the hotels for these rooms already exist in the catalog. You can provide pricing variables in this format:
File Format & Sample | Description |
---|---|
XML with room types | XML Sample | Make sure the room types you want to provide pricing for already exist. Specify pricing ( The file must begin with the |
XML without room types | XML Sample | Specify pricing ( The file must begin with the |
For more details on how to update and delete pricing variables through batch, see Pricing Variable Batch Reference.
Field Name and Type | Description |
---|---|
type: string | Required. A unique identifier of the hotel provided by advertiser as |
type: string | Required. A unique identifier of the room type provided by advertiser. |
type: string | Required. Name of the hotel room type. |
type: string | Required. Description of the hotel room type. |
type: float | Required. The lowest price of the hotel room. You should include the currency. Example: |
type: string | Link to the hotel room page. |
type: date | Required. Check in date for the |
type: int | Required. Number of nights staying in the hotel for the |
type: float | Required. Price based on Example: |
type: float | Required. Tax value for the stay. |
type: float | Required. Applicable fee for the stay. |
type: float | The discounted price if applicable. Example: |
type: float | Tax value for the discounted price. |