- Prepare your Schema
- Prepare your Catalog
- Upload your Feed
- Full Feed Upload
- Delta Feed Upload
- Single Record Upload
- Check Product Count
- JavaScript Based Integration
- HTML Based Integration
- Introduction to GTM
- Requirements
- Introduction
- Events
- API Integration
- Search Endpoint
- Authentication
- Header
- Request Parameter
- Response Components
- Explanation Request Parameter
- PDP API Format
- Sample Request
- Request Parameters
- Response Parameters
- System Requirements
- Install SDK
- Initialize SDK
- Unbxd Commerce Search
- Integrating Unbxd Autosuggest
- Unbxd Analytics
- Unbxd Browse
- Unbxd Recommendations
- Sample App
- Installation
- Unbxd Analytics
- Unbxd Commerce Search
- Unbxd Autosuggest
- Unbxd Browse
- Unbxd Recommendations
- Sample iOS App
- Quickstart with Unbxd Template
- Quick Integration to your site
- Detailed Guide
- Authentication
- Types of Pages to Render
- Configuring the Page
- Instance Methods
- More Information
- Available Configurations
- Libraries
- QuickStart
- Authentication
- Configuring Autosuggest
- Sample Options Object
- Handlebar Functions
- List of Configs
- Search Template
- Loader Config
- Facet Config
- Pagination
- Spellcheck
- Sort Config
- PageSize Config
- Breadcrumb Config
- Product Views
- Variants
- Quick Integration with Unbxd template
- Quick Integration to your site
- Installation
- Authentication
- Types of pages to render
- Configuring the page
- PageSize Config
- More Info
- Endpoint
- Authentication
- Headers
- Request Parameters
- API Response
- Response Components
- Create an Unbxd Account
- Create an Unbxd Site
- Upload a Catalog
- Setup Search
- Integrate Search
- Create an Unbxd Account
- Create an Unbxd Site
- Upload a Catalog
- Setup Search
- Integrate Search
- Plugin Installation
- Configuration
- Uninstallation
- Test Plugin Installation
- Installation
- Authentication
- Catalog
- Catalog Sync
- Product Integration
- Custom Template
- Indexing Queue View
- Feed View
- Upgrade
- Uninstall
- Installation
- Authentication
- Catalog
- Cron Job
- Product Config
- Uninstall
- Installation
- Configuration
Feed APIs
You can use our Feed APIs to upload your feed.
Three types of feed uploads we support:
- Full Feed Upload: Use this method to upload your entire product catalog or to overwrite any previous copy of your feed on our servers. We recommend full feed uploads occasionally to ensure that your Unbxd catalog is in sync with the production systems.
- Delta Feed Upload: Also known as Incremental Feed Upload, use this to update/add multiple records or to upload a catalog partially.
Full Feed Upload
Allows you to upload the complete version of your schema and catalog files.
Tip: We recommend you use the Full Feed Upload API to upload your catalog when you are uploading for the first time.
Feed API Endpoints
The feed API endpoint for your Unbxd site depends upon the cluster where your site is hosted. Unbxd has the following feed endpoints :
ANZ region : https://feed-anz.unbxd.io/
UK region : https://feed-uk.unbxd.io/
SG region : https://feed-apac.unbxd.io/
US region : https://feed.unbxd.io/
US region* : https://feed-g-nam.unbxd.io/
* Unbxd has launched a new cluster in US regions. All sites going to the new US cluster must use the new feed endpoint.
You can detect the feed endpoint for your site by navigating to the Manage > Configure Site > API section inside the console. The Catalog Feed API request in this page contains the feed endpoint for your selected site.
NOTE: In the rest of this document, we have used https://feed.unbxd.io as the endpoint. Kindly replace the feed endpoint with the one that is applicable on your store.
API Structure
Method : POST
End Point : {feed end point}/api/{siteKey}/upload/catalog/full
Description : This API will upload your complete feed file as a single JSON file.
Request Parameters
siteKey: A unique identifier provided when you create an Unbxd account. This key can also be retrieved from the Console. This is a required field.
secretKey: A unique identifier provided when your Unbxd account is created. The secretKey is used to authorize your upload request. This is a private key and will not be exposed to the public. This is a required field.
feed end point : The feed end point depends upon the region selected at the time of site creation.
Response Parameters
fileName: The name of the feed file, in JSON format.
uploadID: The unique identifier assigned to your upload session.
Status: Indicates the upload situation or progress of your feed file.
Status can be:
- Accepted
- Indexing
- Indexed
- Failed
timeStamp: Indicates the time of the file in YYYY-MM-DD | HH:MM:SS format.
message: Indicates if the upload succeeded or failed. This field will also indicate the error code.
code: 200 if feed upload request is ACCEPTED. The code for a feed upload request may be updated if the feed upload request fails during indexing.
Response codes to indicate success or failure of an API request.
- 200 (Ok): Indicates the upload was successful.
- 401 (Authorization Error): Indicates you may have provided an invalid API key.
- 400 (Bad Request): Indicates you may have missed a required parameter.
- 500 (Internal Server Error): Though these are rare, this indicates we may have messed up.
Sample Resquest
curl -X POST \ https://feed.unbxd.io/api/{siteKey}/upload/catalog/full \ -H 'Authorization:{secretKey}'\ -F file=@{fileName}.json`
Sample Response
{ "fileName": "{fileName}", "uploadId": "{id}", "timeStamp": 6581239201, "status":"ACCEPTED", "message":"File Queued", "code":200 }
Sample Feed
A typical feed will contain many other attributes, which will have display, searchable, merchandisable, and unique attributes.
Here’s how a sample feed file with variants would appear.
{ "feed": { "catalog": { "add": { "items": [ { "uniqueId": "ss10010", "title": "Short Sleeve Shirt", "description": "Start your summer right with the all new short sleeve shirt." }, { "uniqueId": "sj10011", "title": "Stretch Jeans", "description": "Fit perfectly even after wash.", "variants": [ { "variantId": "9890101", "vSize": "s", "vPrice": 90 }, { "variantId": "9890102", "vSize": "xxl", "vPrice": 100, "vImages": "http://example.com/images/2-2.jpg" } ] } ] } } } }
Here’s how a sample feed file without variants would appear.
{ "feed": { "catalog": { "add": { "items": [ { "uniqueId": "ss10010", "title": "Short Sleeve Shirt", "description": "Get the perfect look for the summer." }, { "uniqueId": "ss11023", "title": "Relaxed Fit Jeans", "description": "Jeans for all seasons." } ] } } } }
Check Status
After the upload is done, you can check the status of the uploaded feed. There are two ways to do it. Either by URL or via APIs.
- For URLs, In the address field, type in https://feed.unbxd.io/api/{siteKey}/catalog/status
- To check the status of the last 10 uploads, type in
https://feed.unbxd.io/api/{siteKey}/catalog/status?count=10 - To view the status of your upload using the Upload ID https://feed.unbxd.io/api/{siteKey}/catalog/{uploadId}/status
NOTE: Once you get the response using the Upload ID, replace {uploadID}.
NOTE: To locate your site key, navigate to Manage > Configure Site > Keys > Site Keys within the Console.
Best Practices
To ensure your feed is uploaded and integrated seamlessly, we recommend the following:
- When uploading a full feed, use the Add operation in the catalog. Update and Delete operation are not supported in a full feed upload. A full feed will replace the entire catalog hence update and delete operation are not needed.
- A full feed is recommended when uploading a catalog under 2GB or less than 1 million products. If your catalog is exceeding beyond these limits, then reach out to our support team to get more details on larger catalogs options.
Delta Feed Upload
A delta (also known as Incremental) feed upload is when you perform a partial feed upload. Changes are updated to the existing product catalog.
NOTE: We support only one type of operation in a single delta upload request. For eg: it can be either of "Add", "Update" or "Delete" for delta uploads. You cannot use multiple operations in the same delta uploads.
API Structure
Method : POST
End Point : {feed end point}/api/{siteKey}/upload/catalog/delta
Description : This API helps to upload some of the updated fields of the catalog.
Request Parameter
siteKey: A unique identifier provided when you create an Unbxd account. This key can also be retrieved from the Console. This is a required field.
secretKey: A unique identifier provided when your Unbxd account is created. The secretKey is used to authorize your upload request. This is a private key and will not be exposed to the public. This is a required field.
feed end point : The feed end point depends upon the region selected at the time of site creation.
Response Parameters
fileName: The name of the feed file, in JSON format.
uploadID: The unique identifier assigned to your upload session.
Status: Indicates the upload situation or progress of your feed file.
Status can be:
- Accepted
- Indexing
- Indexed
- Failed
timeStamp: Indicates the time of the file in YYYY-MM-DD | HH:MM:SS format.
message: Indicates if the upload succeeded or failed. This field will also indicate the error code.
code: 200 if feed upload request is ACCEPTED. The code for a feed upload request may be updated if the feed upload request fails during indexing.
We use conventional HTTP response codes to indicate success or failure of an API request.
- 201 (Ok): Indicates the upload was successful.
- 401 (Authorization Error): Indicates you may have provided an invalid API key.
- 400 (Bad Request): Indicates you may have missed a required parameter.
- 500 (Internal Server Error): Though these are rare, this indicates we may have messed up.
Sample Resquest
curl -X POST \ https://feed.unbxd.io/api/{siteKey}/upload/catalog/delta \ -H 'Authorization:{secretKey}' \ -F file=@{fileName}.json
Sample Response
{ "fileName": "{fileName}", "uploadId": "{id}", "timeStamp": 6581239201, "status":"ACCEPTED", "message":"File Queued", "code":200 }
Sample Feed
This is how a delta feed upload will appear if you want to update the variants and when the variantId is unique:
{ "feed": { "catalog": { "update": { "items": [ { "variants": [ { "variantId": "00889705456424", "v_qty": "0", "vSize": "s", "vColor": "Red" } ] } ] } } } }
If you want to update other fields of a product that has a unique ID:
{ "feed": { "catalog": { "update": { "items":[{ "uniqueId":”12345”, "color":"blue", "size":”10” }] } } }
Check Status
After the upload is done, you can check the status of the uploaded feed. There are two ways to do it. Either by URL or via APIs.
- In the address field, type in https://feed.unbxd.io/api/{siteKey}/catalog/delta/status
- To check the status of the last 10 uploads, type in
https://feed.unbxd.io/api/{siteKey}/catalog/delta/status?count=10 - To view the status of your upload using the Upload ID: https://feed.unbxd.io/api/{siteKey}/catalog/delta/{uploadId}/status
NOTE: Once you get the response using the Upload ID, replace {uploadID}.
NOTE: To locate your site key, navigate to Manage > Configure Site > Keys > Site Keys within the Console.
Best Practices
To ensure your feed is uploaded and integrated seamlessly, we recommend the following:
- We recommend a gap of at-least 15 minutes between consecutive delta uploads.
- Don’t use a delta feed API to upload a full feed.
NOTE: Delta feed upload requests received by our systems are processed immediately. However, the changes may require upto 10 mins to reflect in the API response in some cases.
Feed Actions
These are useful when there are frequent product-based changes, like when you want to add a new product, delete an existing product, or update multiple fields within an existing product.
NOTE: We support only one type of feed action (operation) in a single delta upload request. For eg: it can be either of "Add", "Update" or "Delete" for delta uploads. You cannot use multiple operations in the same delta uploads.
Add
Used when you want to add a new product, reset product fields within your existing feed, or add/update variants to an existing feed file.
NOTE: This is the default feed action when performing a full feed.
You can use the Add block when you want to:
- Add Product: When new products are added to your catalog, you can use this action to add to your existing Feed by uploading the snapshot of only those products. Once uploaded, we will add these products to your existing product feed.
- Add Variants: Variants are different combinations of options for a product with the same SKU.
For instance, you can have a tee shirt with two options: size and color. The size option has three values: small, medium, and large. The color option has two values: blue and green. An example of a variant would be a blue tee-shirt in large.
Adding Products
Use the Add block to add new products to your catalog.
For example, let’s assume you want to add a product ‘Acme Party Shirt’ to your catalog. The JSON to add a new product when the uniqueId does not exist would appear like this:
{ "feed": { "catalog": { "add": { "items": [{ "uniqueId": "GDR1234", "title": "Acme Party Shirt" }] } } } }
In the code below, the ‘Add’ block allows you to replace a product that has an existing uniqueId:
{ "feed": { "catalog": { "add": { "items": [{ "uniqueId": "GDR1234", "title": "Acme Party Shirt", "description": "A cotton shirt that cloths the party animal in you", "color": "Tangerine", "size": "L" }] } } } }
NOTE: You can use the 'Add' block to add a new product when the uniqueId is already in the catalog. However, if the catalog already has the uniqueId then it will replace the entire product with the fields within the Add block.
It is common for product feeds to have products with multiple variants.
To add a variant to a product that already has variants and an existing uniqueId:
{ "feed": { "catalog": { "add": { "items": [{ "uniqueId": "ffff78ac", "title": "Acme Jumper Suit", "description": "The perfect casual wear for an evening out", "color": "Orange", "variants": [{ "var_description": "The jumper suit for the party animal in you", "variantId": "GOR00302", "var_price": 400, "color": "Dark Red" }, { "var_description": "The jumper suit when you don't want to blend in", "variantId": "GOR00302", "var_price": 400, "color": "Purple" } ] }] } } } }
As in the code above, the ‘Add’ block allows you to pass a new variant along with all other variants and other product fields.
There are two scenarios when syncing latest changes/additions to variants using the Add action.
Scenario 1
When performing a delta upload, you can use the ‘Add’ action to add new variants to existing products as well as updating the rest of the variants.
To do this, ensure that all variants are a part of the ‘Add’ block within the base product.
For example, let’s assume an existing product in your catalog ‘Acme Party Shirt’ has 2 different variants (colors) and you want to add 1 new variant (colors) to the catalog. You can use the ‘Add’ block to add the new variants to the base product along with the 2 existing variants. So as to achieve this, you would be required to perform an ‘Add’ action for all the 3 variants, as shown in the sample JSON below:
{ "feed": { "catalog": { "add": { "items": [{ "uniqueId": "GDR1234", "title": "Superman", "variants": [{ "variantId": "child-1", "vColor": [{ "id": "47587", "value": "Red" },{ "variantId": "child-2", "vColor": [{ "id": "47587", "value": "Blue" }] }, { "variantId": "child-3", "vColor": [{ "id": "49867", "value": "Green" }], "vSize": "S", "vPrice": 130 } ] }, ] } } } }
Scenario 2
When performing a delta upload, you can use the ‘Add’ action to add a new product with variants.
For instance,
{ "feed": { "catalog": { "add": { "items": [{ "uniqueId": "GDR1234", "title": "Superman", "variants": [{ "variantId": "child-1", "vColor": [{ "id": "47587", "value": "Red" }] }] }] } } } }
Delete
Used when you want to delete products from your existing feed file.
To delete, mention the uniqueID of the product you want to delete.
{ "feed": { "catalog": { "delete": { "items": [{ "uniqueId": "GDR1234" }] } } } }
Update
Used when you want to update the values of an existing field in your existing Product Feed synced with Unbxd.
You cannot update the field names or add/delete fields.
To update, upload the snapshot of the uniqueIDs of only those products along with the fields whose values need to be changed.
Generally, this action is used for updating the quantity or availability of a product.
Scenario 1
When performing a delta upload, you can use the ‘Update’ action to update only a few variants of a product, you can update the changes in the update block of that variant.
For example, let’s consider you have a Product ‘Acme Party Shirt’ with three variants [variantId1, variantId11, variantId12] and another Product ‘Lucus Casual Shirts’ with the three variants [variantId2, variantId21, variantId22]. If you want to update only variantId1, variantId11 & variantId2, you can include only these three variants when the variantIds are unique as in the JSON below.
{ "feed": { "catalog": { "update": { "items": [{ "uniqueId": "uniqueId1", "variants": [{ "variantId": "variantId1", "inventoryCount": 10 }, { "variantId": "variantId11", "inventoryCount": 15 } ] }, { "uniqueId": "unqiueId2", "variants": [{ "variantId": "variantId2", "inventoryCount": 12 }] } ] } } } }
NOTE: You don’t have to include the uniqueId when the variantId is unique.
Similarly, when the variantId is not unique, the uniqueId needs to be included. Your JSON will appear like this:
{ "feed": { "catalog": { "update": { "items": [{ “uniqueId” : “uniqueId1” "variants": [{ "variantId": "variantId1", "inventoryCount": 10 }, { "variantId": "variantId11", "inventoryCount": 15 } ] }, { “uniqueId” : “unqiueId2”, “Variants” : [{ "variantId: "variantId2", "inventoryCount" : 12 }] } ] } } } }
Scenario 2
You can use the Update block if you want to update the price, add a new field, an attribute, edit the quantity, or update a variant.
Let’s assume your feed in this scenario looks like this:
{ "uniqueId": "GDR1234", "title": "Superman", "price": 100, "quantity": 40 }
If you want to update the price to $50:
{ "feed": { "catalog": { "update": { "items": [{ "uniqueId": "GDR1234", "price": 50 } ] } } } }
To add a new field to an existing feed:
{ "feed": { "catalog": { "update": { "items": [{ "uniqueId": "GDR1234", "size": "S", "price": 50 } ] } } } }
NOTE: Ensure the field already exists within the Schema.
To add an attribute sleeve-length, and set the value to “full”:
{ "feed": { "catalog": { "update": { "items": [{ "uniqueId": "GDR1234", "variants": [{ "variantId": "5678", "sleeveLength": "Full" }] }] } } } }
To update the quantity to 100:
{ "feed": { "catalog": { "update": { "items": [{ "uniqueId": "GDR1234", "quantity": 100 } ] } } } }
Single Record Upload
When you want to add/update just a single attribute within an existing feed file.
Recommended when you want to upload only parts of an existing product within your feed. Using single record upload instead of delta upload to update single attributes can save you time.
API Structure
Method : POST
End Point : {feed end point}/api/{siteKey}/upload/feed?operation=add
This endpoint only supports add operation
Description : This API helps to update one field from the feed.
Request Parameters
siteKey: A unique identifier provided when you create an Unbxd account. This key can also be retrieved from the Console. This is a required field.
secretKey: A unique identifier provided when your Unbxd account is created. The secretKey is used to authorize your upload request. This is a private key and will not be exposed to the public. This is a required field.
feed end point : The feed end point depends upon the region selected at the time of site creation.
Response Parameters
fileName: The name of the feed file, in JSON format.
uploadID: The unique identifier assigned to your upload session.
Status: Indicates the upload situation or progress of your feed file.
Status can be:
- Accepted
- Indexing
- Indexed
- Failed
timeStamp: Indicates the time of the file in YYYY-MM-DD | HH:MM:SS format.
message: Indicates if the upload succeeded or failed. This field will also indicate the error code.
code: 200 if feed upload request is ACCEPTED. The code for a feed upload request may be updated if the feed upload request fails during indexing.
We use conventional HTTP response codes to indicate success or failure of an API request.
- 201 (Ok): Indicates the upload was successful.
- 401 (Authorization Error): Indicates you may have provided an invalid API key.
- 400 (Bad Request): Indicates you may have missed a required parameter.
- 500 (Internal Server Error): Though these are rare, this indicates we may have messed up.
Sample Request
curl -X POST 'https://{feed end point}/api/{siteKey}/upload/feed?operation=add' -H 'Authorization:{secretKey}' -d '{ "uniqueId": "parent-id-1", "title": "batman", "variants": [ { "variantId": "child-1", "vColor": "black", "vSize": "m", "vPrice": 19, "vImages": "http://example.com/images/1-1.jpg" }, { "variantId": "child-2", "vColor": "blue", "vSize": "xl", "vPrice": 10, "vImages": "http://example.com/images/1-2.jpg" } ] }
Sample Response
{ "fileName": "{fileName}", "uploadId": "{id}", "status": "INDEXED", "timeStamp": 1497016711231 "message":"success }
Sample Single Feed Upload
curl -X POST 'https://feed.unbxd.io/api/{siteKey}/upload/feed?operation=add' -H 'Authorization:{secretKey}' -d '{ "uniqueId": "parent-id-1", "title": "batman", "variants": [ { "variantId": "child-1", "vColor": "black", "vSize": "m", "vPrice": 19, "vImages": "http://example.com/images/1-1.jpg" }, { "variantId": "child-2", "vColor": "blue", "vSize": "xl", "vPrice": 10, "vImages": "http://example.com/images/1-2.jpg" } ] }
Best Practices
To ensure your feed is uploaded and integrated seamlessly, remember:
To update feed that has variants, use the Add block at the product’s parent-level.
Check Status
After the upload is done, you can check the status of the uploaded feed. There are two ways to do it. Either by URL or via APIs.
- To check the status of your upload within your browser:
In the address field, type in ‘http://feed.unbxd.io/api/sitekey/catalog/status’ - To check the status of the last 10 uploads:
Type in ‘http://feed.unbxd.io/api/sitekey/catalog/status?count=10’ - To view the status of your upload using the Upload ID:
NOTE: Once you get the response using the Upload ID, replace {uploadID}.
Check Product Count
Allows you to check the number of products you have in your feed.
Method : GET
End Point : {feed end point}/api/{siteKey}/catalog/size
Description : This API will provide the size of the uploaded feed.
siteKey: A unique identifier provided when you create an Unbxd account. This key can also be retrieved from the Console. This is a required field.
size: Returns the number of products your feed has.
We use conventional HTTP response codes to indicate success or failure of an API request.
- 201 (Ok): Indicates the upload was successful.
- 401 (Authorization Error): Indicates you may have provided an invalid API key.
- 400 (Bad Request): Indicates you may have missed a required parameter.
- 500 (Internal Server Error): Though these are rare, this indicates we may have messed up.
Sample Request
curl -X GET https://feed.unbxd.io/api/{siteKey}/catalog/size
Response
The response will have the number of products in the feed file.
Best Practices
- We should specify clearly whether schema and catalog can be part of one document together or separate.
- We should document if there is a limit on file size, record count for schema and catalog files
- We should document feed processing failures midway and its affect on indexing.
- Document the time taken to record the index file.
- Did this answer your question?
On this Section
- To create a Query Rule
- To Edit a Query Rule
- Delete a Query Rule
- Campaign States
- Create Campaigns
- Edit Campaigns
- Preview Campaigns
- Duplicate Campaigns
- Delete Campaigns