Send Localized Items Batch

To send localization updates, use the /{catalog_id}/localized_items_batch endpoint.

To create, update, or delete localized products in your catalog, make an HTTP POST call to:

https://graph.facebook.com/<API_VERSION>/<CATALOG_ID>/localized_items_batch?requests=<REQUESTS> 

Parameters

Parameter Type Description

item_type

enum

Type of items in the request. Supported values: DESTINATION, FLIGHT, HOME_LISTING, HOTEL, HOTEL_ROOM, PRODUCT_ITEM, VEHICLE.

requests

object

A JSON object containing all requests.

requests.data

object

A JSON object containing fields and values for a product.

When the method is CREATE, this object must contain only localized fields for the specified item_type.

requests.method

string

CREATE, UPDATE, DELETE

requests.localization

object

A JSON object containing the localization data you want to apply for the specified catalog item. This object must contains these fields:

  • type — Supported values: LANGUAGE or COUNTRY
  • value — Can be any valid language or county code, depending on the selected type.

The Localized Catalog Setup contains the lists of supported languages and countries for catalog overrides, and examples of override types and values when localizing by LANGUAGE, COUNTRY, OR LANGUAGE_AND_COUNTRY. See Supported Fields — Localized Catalogs for a list of supported catalog fields.

Limitations

  • The requests param can contain up to 5,000 updates.
  • For each catalog, you can make up to 100 calls per hour. If that's not sufficient, please contact us.
  • The batch size limit is 1000.

Supported Fields

See the list of supported fields and their respective descriptions for each field, for the /{catalog_id}/localized_items_batch endpoint:

See the full list of catalog-supported fields.

Example

Sample Request

POST /{catalog_id}/*localized_items_batch*
{
  "access_token": "<ACCESS_TOKEN>",
  "item_type": "PRODUCT_ITEM",
  "requests": [
    {
      "method": "CREATE",
      "localization": {
        "type": "LANGUAGE",
        "value": "fr_XX"
      },
       "data": {
         "id": "retailer-2",
         "title": "C'est un tshirt",
         "description": "Le t-shirt a un joli motif",
         "link": "http://www.fr.example.com/t-shirts/1.png"
       }
    },
    {
      "method": "CREATE",
      "localization": {
        "type": "COUNTRY",
         "value": "FR"
      },
       "data": {
         "id": "retailer-2",
         "availability": "in stock",
         "price": "9.99 EUR"
       }
    },
    {
      "method": "UPDATE",
      "localization": {
        "type": "LANGUAGE",
        "value": "fr_XX"
      },
      "data": {
        "id": "retailer-3",
        "availability": "out of stock",
        "link": "http://www.fr.example.com/t-shirts/2.png"
      }
    },
    {
      "method": "UPDATE",
      "localization": {
        "type": "COUNTRY",
        "value": "FR"
      },
      "data": {
        "id": "retailer-3",
        "price": "19.99 USD"
      }
    },
    {
      "method": "DELETE",
      "localization": {
        "type": "COUNTRY",
        "value": "FR"
      },
      "data": {
        "id": "retailer-4"
      }
    }
  ]
}

Sample Response

"handles": ["AczBWxwCxXv4s3xQpm0JwXBlhs-IPGatrWmDRBmc1wTYrV5JvtkuQRT_FOCmKZGmHvotvvX8UtQnwEgg16wTx14cqPYzWVzmxZiaZDLgMUmjSA"]

This endpoint does not create new catalog items. All requests should contain a data JSON object that contains an ID for an existing catalog item.

You can use the applink field to specify deep link information; it works in a similar way to Deep Links. Provide your deep link information in the JSON format shown below.

"applink" : {"ios": [{"url":"example-ios://electronic","app_store_id":42,"app_name":"Electronic Example iOS"}],"iphone": [{"url":"example-iphone://electronic","app_store_id":43,"app_name":"Electronic Example iPhone"}],"ipad": [{"url":"example-ipad://electronic","app_store_id":44,"app_name":"Electronic Example iPad"}],"android": [{"url":"example-android://electronic","package":"com.electronic","class":"com.electronic.Example","app_name":"Electronic Example Android",}],"windows_phone": [{"url":"example-windows://electronic","app_id":"64ec0d1b-5b3b-4c77-a86b-5e12d465edc0","app_name":"Electronic Example Windows"}]}

There's a minor difference in the field names compared to the ones in deep links as each app type is a separate node and is enclosed in their respective fields.

'data\[applink\]\[android\]' is an array with only one value specified under it. This is the same case for other app types.

We don't support iOS Universal Links.

To localize any applink fields, you must provide all of them. Learn more about product deep links.