Other content integrations

If you publish content in a third-party ecommerce platform (e.g., Shopify, BigCommerce, etc.), then you can send those content articles to Constructor via API. Doing so enables your team to include articles, or content, within a site's search recommendations.

Before you begin, ensure you understand how to configure webhooks in your ecommerce platform. A webhook will enable a seamless integration between the platform and Constructor. Instructions should be available in the platform's documentation.

Before getting started

  • Ensure you understand how to configure webhooks in your ecommerce platform. A webhook will enable a seamless integration between the platform and Constructor. Instructions should be available in the platform's documentation.
  • Request that Constructor create a new section in the desired index. You can contact your Customer Success Manager (CSM) for assistance with this.

Authentication

To ensure requests are accepted, you’ll need to configure authentication for your webhook so Constructor can verify the request. Learn more about Constructor API authentication here.

Headers

Ensure that you have the following headers:

  • Content-Type with the value application/json
  • Authorization with your basic auth credentials

URL configuration

You can send your content to Constructor using the Create or replace items API.

  • URL: https://ac.cnstrc.com/v2/items?key=YOUR_API_KEY&section=Content&on_missing=CREATE
  • Method: PUT
🚧

Note

  • Replace YOUR_API_KEY with your Constructor index key.
  • Replace Content with the name of the correct section in the Constructor index. If you need assistance with setting up a new section, please contact the Constructor team or your Customer Success Manager (CSM).

Payload

Last, you will need to transform the payload to ensure the webhook inserts the data into Constructor's expected data format.

You will need to set JSON fields equal to variables that dynamically insert the relevant details from your preferred ecommerce platform.

{
  "items": [
    {
      "id": 1234,
      "name": “Article Title”,
      "data": {
        "active": true,
        "keywords": [“term 1”,”term 2”],
        "image_url": "https://www.image.com/1234.png”,
        "url": “https://www.company.com/blog/articles/1234”,
        "description": “Example article description.”,
        "body": “insert article body content”
      }
    }
  ]
}