Integrations - Dynamic Product Feed API
The Dynamic Product Feed API is an incredibly flexible and powerful integration mechanism to connect your product database to your Jebbit experience.
Once you've gone ahead and generated a JSON Web Token (JWT) as outlined in this article, you're now ready to begin exploring the Dynamic Product Feed (DPF) API. Your DPF API credentials are tied to your Jebbit account; and any of the experiences in your account can use a product feed created by using the API. To create a feed, try executing the following API call with your Jebbit account ID in the x-jebbit-business header and the name of your feed in the body, like so:
Example HTTP Request
POST /api/v1/feeds/ HTTP/1.1
Host: api.jebbx.com
Authorization: Bearer <YOUR JWT>
x-jebbit-business: bTUIhsye
Content-Type: application/vnd.api+json
Content-Length: 67
{"data":{"type":"feeds","attributes":{"name":"Jebbit Test Feed"}}}
*Note: Example is using the staging endpoint. Please use the production endpoint as detailed in our API documentation here.
Example Response
{
"data": {
"id": "3PGSedLJ",
"type": "feeds",
"attributes": {
"name": "Jebbit Test Feed",
"version": "1660014811",
"active_version": null,
"created_at": "2022-08-09T03:13:31.100Z",
"updated_at": "2022-08-09T03:13:31.100Z",
"item_count": 0,
"status": "created",
"source": "API"
}
}
}
We have now created our "Jebbit Test Feed" product feed. The response will also contain the ID of your newly created feed (in this case the ID is 3PGSedLJ), which you will need to use in your subsequent API calls for adding elements to the feed. Next, let's go ahead and check out the available fields for us to populate in the feed. Please execute the below example API call with the ID of your feed in the request URL and your Jebbit business ID the x-jebbit-business header:
Example HTTP Request
GET /api/v1/feeds/3PGSedLJ/feed_columns/ HTTP/1.1
Host: api.jebbx.com
Authorization: Bearer <YOUR JWT>
x-jebbit-business: bTUIhsye
*Note: Example is using the staging endpoint. Please use the production endpoint as detailed in our API documentation here.
Example Response
{
"data": [
{
"id": "4WG0uSWw",
"type": "feed_columns",
"attributes": {
"name": "price",
"created_at": "2022-08-09T03:13:31.108Z",
"updated_at": "2022-08-09T03:13:31.108Z",
"feed_id": "3PGSedLJ"
},
"relationships": {
"feed": {
"links": {
"self": "https://api.jebbx.com/client_api/feed_columns/4WG0uSWw/relationships/feed",
"related": "https://api.jebbx.com/client_api/feed_columns/4WG0uSWw/feed"
}
}
}
},
{
"id": "bTzSj6Lz",
"type": "feed_columns",
"attributes": {
"name": "redirect_url",
"created_at": "2022-08-09T03:13:31.108Z",
"updated_at": "2022-08-09T03:13:31.108Z",
"feed_id": "3PGSedLJ"
},
"relationships": {
"feed": {
"links": {
"self": "https://api.jebbx.com/client_api/feed_columns/bTzSj6Lz/relationships/feed",
"related": "https://api.jebbx.com/client_api/feed_columns/bTzSj6Lz/feed"
}
}
}
},
{
"id": "cfXISTJN",
"type": "feed_columns",
"attributes": {
"name": "availability",
"created_at": "2022-08-09T03:13:31.108Z",
"updated_at": "2022-08-09T03:13:31.108Z",
"feed_id": "3PGSedLJ"
},
"relationships": {
"feed": {
"links": {
"self": "https://api.jebbx.com/client_api/feed_columns/cfXISTJN/relationships/feed",
"related": "https://api.jebbx.com/client_api/feed_columns/cfXISTJN/feed"
}
}
}
},
{
"id": "g8kqvLPd",
"type": "feed_columns",
"attributes": {
"name": "category",
"created_at": "2022-08-09T03:13:31.108Z",
"updated_at": "2022-08-09T03:13:31.108Z",
"feed_id": "3PGSedLJ"
},
"relationships": {
"feed": {
"links": {
"self": "https://api.jebbx.com/client_api/feed_columns/g8kqvLPd/relationships/feed",
"related": "https://api.jebbx.com/client_api/feed_columns/g8kqvLPd/feed"
}
}
}
},
{
"id": "RUcDUDPT",
"type": "feed_columns",
"attributes": {
"name": "description",
"created_at": "2022-08-09T03:13:31.108Z",
"updated_at": "2022-08-09T03:13:31.108Z",
"feed_id": "3PGSedLJ"
},
"relationships": {
"feed": {
"links": {
"self": "https://api.jebbx.com/client_api/feed_columns/RUcDUDPT/relationships/feed",
"related": "https://api.jebbx.com/client_api/feed_columns/RUcDUDPT/feed"
}
}
}
},
{
"id": "VuRWG2TC",
"type": "feed_columns",
"attributes": {
"name": "title",
"created_at": "2022-08-09T03:13:31.108Z",
"updated_at": "2022-08-09T03:13:31.108Z",
"feed_id": "3PGSedLJ"
},
"relationships": {
"feed": {
"links": {
"self": "https://api.jebbx.com/client_api/feed_columns/VuRWG2TC/relationships/feed",
"related": "https://api.jebbx.com/client_api/feed_columns/VuRWG2TC/feed"
}
}
}
},
{
"id": "vuT8hppX",
"type": "feed_columns",
"attributes": {
"name": "image_url",
"created_at": "2022-08-09T03:13:31.108Z",
"updated_at": "2022-08-09T03:13:31.108Z",
"feed_id": "3PGSedLJ"
},
"relationships": {
"feed": {
"links": {
"self": "https://api.jebbx.com/client_api/feed_columns/vuT8hppX/relationships/feed",
"related": "https://api.jebbx.com/client_api/feed_columns/vuT8hppX/feed"
}
}
}
},
{
"id": "YVcbNB21",
"type": "feed_columns",
"attributes": {
"name": "brand",
"created_at": "2022-08-09T03:13:31.108Z",
"updated_at": "2022-08-09T03:13:31.108Z",
"feed_id": "3PGSedLJ"
},
"relationships": {
"feed": {
"links": {
"self": "https://api.jebbx.com/client_api/feed_columns/YVcbNB21/relationships/feed",
"related": "https://api.jebbx.com/client_api/feed_columns/YVcbNB21/feed"
}
}
}
}
]
}
You can now see the default feed fields that was can populate with product information. For a detailed field guide on what these fields are, please refer to this article. You can add as many custom columns to the feed as you'd like. To create a column, try executing the following API call:
Example HTTP Request
POST /api/v1/feed_columns HTTP/1.1
Host: api.jebbx.com
Authorization: Bearer <YOUR JWT>
x-jebbit-business: bTUIhsye
content-type: application/vnd.api+json
Content-Length: 93
{"data":{"type":"feed_columns","attributes":{"name":"New Feed Column","feed_id":"3PGSedLJ"}}}
*Note: Example is using the staging endpoint. Please use the production endpoint as detailed in our API documentation here.
Example Response
{
"data": {
"id": "QIelyJVC",
"type": "feed_columns",
"attributes": {
"name": "New Feed Column",
"created_at": "2022-08-09T03:31:11.154Z",
"updated_at": "2022-08-09T03:31:11.154Z",
"feed_id": "3PGSedLJ"
},
"relationships": {
"feed": {
"links": {
"self": "https://api.jebbx.com/client_api/feed_columns/QIelyJVC/relationships/feed",
"related": "https://api.jebbx.com/client_api/feed_columns/QIelyJVC/feed"
}
}
}
}
}
Let's try adding a row to the product feed. A row corresponds to a product that you'd like to add to the feed. The following API call can be used to add a row:
Example HTTP Request
POST /api/v1/feed_rows HTTP/1.1
Host: api.jebbx.com
Authorization: Bearer <YOUR JWT>
x-jebbit-business: bTUIhsye
content-type: application/vnd.api+json
Content-Length: 366
{"data":{"type":"feed_rows","attributes":{"product_identifier":"1","feed_id":"3PGSedLJ","data":"{\"title\":\"Sample Product\",\"description\":\"A really good product\",\"price\":10,\"redirect_url\":\"https://google.com\",\"image_url\":\"https://google.com/icon.png\",\"brand\":\"Sample Brand\",\"category\":\"Mens Clothing\",\"New Feed Column\":\"Sample Value\"}"}}}
*Note: Example is using the staging endpoint. Please use the production endpoint as detailed in our API documentation here.
Example Response
{
"data": {
"id": "I1QfH6nH",
"type": "feed_rows",
"attributes": {
"created_at": "2022-08-09T03:36:58.571Z",
"updated_at": "2022-08-09T03:36:58.571Z",
"feed_id": "3PGSedLJ",
"product_identifier": "1",
"data": {
"brand": "Sample Brand",
"price": 10,
"title": "Sample Product",
"category": "Mens Clothing",
"image_url": "https://google.com/icon.png",
"description": "A really good product",
"redirect_url": "https://google.com",
"New Feed Column": "Sample Value"
}
},
"relationships": {
"feed": {
"links": {
"self": "https://api.jebbx.com/client_api/feed_rows/I1QfH6nH/relationships/feed",
"related": "https://api.jebbx.com/client_api/feed_rows/I1QfH6nH/feed"
}
}
}
}
}
We have successfully added a product to the feed with all standard columns filled out as well as our custom column. The Jebbit experiences within your account can access this product feed and associated products.