If you have a catalog with millions of products and quickly-changing inventory, using product feeds might not be a viable option for you. Instead of using a product feed to update a catalog, it's possible to use Facebook's Catalog Batch API to send real-time information about the products that have changed via HTTP requests.

In order for you to use our features such as Image Templates, Dynamic Slideshows, Product Insights... with Catalog Batch API, we provide an endpoint where you send requests, we enhance products and forward them to Facebook.

Implementation

The implementation is very similar to what Facebook uses—only the endpoint is different. You can build your logic using Facebook's documentation. The endpoint in ROI Hunter is:

POST 
https://products-api.roihunter.com/api/v2/catalogs/{catalogFacebookId}/items_batch

Note: before you start let us know and we send you your Facebook access token whitelisted for the ROI Hunter APP. This token must be used when sending requests to our API.

PAYLOAD

CREATE Method

Use this method to add new products to the catalog. CREATE request on products which already exists are accepted and converted to updates.

Required fields: These fields must be sent on creation of each new product

Optional fields:

You can also send your own fields in payload and use our mapping feature to map those fields into the ones accepted by FB.


Example request:

{

  "access_token": "<ACCESS_TOKEN>",

  "requests": [

    {

      "method": "CREATE",

      "retailer_id": "retailer_id_1",

      "data": {

        "availability": "in stock",

        "brand": "Nike",

        "category": "t-shirts",

        "description": "product description",

        "image_url": "http://www.images.example.com/t-shirts/1.png",

        "name": "product name",

        "price": 1000,

        "currency": "USD",

        "shipping": [

             {

                "shipping_country": "US",

                "shipping_region": "CA",

                "shipping_service": "service",

                "shipping_price_value": "10",

                "shipping_price_currency": "USD"

             }

        ],

        "condition": "new",

        "Url": "http://www.images.example.com/t-shirts/1.png"

        "retailer_product_group_id": "product-group-1"

      }

    }

  ]

}


Note: before starting with the ROI Hunter endpoint, you can test your implementation directly with
Facebook API. This requires a Facebook access token. You can get one by selecting "Get Token" in Facebook Graph API Explorer.

UPDATE Method

Use this method to update values of existing products in catalog. This method doesn’t have any required fields, the only limitation is that at least one field to update must be sent.

Example update request:

{

  "access_token": "<ACCESS_TOKEN>",

  "requests": [

    {

      "method": "UPDATE",

      "retailer_id": "retailer_id_1",

      "data": {

        "price": 800

      }

    }

  ]

}

DELETE Method

Use this method to delete products in catalog.

Example delete request:

{

  "access_token": "<ACCESS_TOKEN>",

  "requests": [

    {

      "method": "DELETE",

      "retailer_id": "retailer_id_1"

    }

  ]

}

Note: before starting with the ROI Hunter endpoint, you can test your implementation directly with Facebook API. This requires a Facebook access token. You can get one by selecting "Get Token" in Facebook Graph API Explorer.

Limitations

  • Partial updates not supported - Each request must contain all the product fields
  • Facebook limits the request param up to 5000 updates and up to 100 requests per hour for each catalog. If it is not enough they can increase the limit. Contact us if you need it.

Maintaining catalog quality

There will always be the risk that some requests fail. As you're only communicating changes with Catalog Batch API (instead of always providing the whole state of your catalog as with feed files), there's the possibility that the Catalog on Facebook will start drifting apart from your actual inventory status. Thus, we recommend running full updates for all your products periodically, for example, once per day.

Bulk upload

ROI Hunter allows all its feed related features also for API catalogs. You can 

  • apply image templates, dynamic slideshows 
  • connect product insights from Google Analytics, Google shopping and even connecting the custom source with product data
  • promote products dynamically filtered according 

We recommend you to not change this kind of settings too frequently. Bear in mind that if you eg. apply template we have to re-upload whole product inventory which can take even a few hours based on amount of products and FB limits.

FAQ

How long does it take to process the request?

It takes less than a second for us to forward the request to Facebook. But if you have also image templates applied on the catalog it may take a few minutes based on the count of created/updated products.

Did this answer your question?