Product Similarity

Product Similarity returns similar products in your dataset. This can be used to generate recommendations or cluster similar products together.

API information for batch-categorize endpoint:

import requests
import json
url = "https://app.pumice.ai/api/batch-product-similarity"
payload = json.dumps({
"target_csv_id": 83,
"embeddings_csv_id": 4
})
headers = {
'KEY': '<YOUR_API_KEY>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)

Route

https://app.pumice.ai/api/batch-product-similarity

Required Headers

API key and content type are required.

{'KEY': '<YOUR_API_KEY>','Content-Type': 'application/json'}

Return

This endpoint returns a task_id that allows you to access the batch run when it's finished. Use /get-similarity-results to fetch with task_id.

target_csv_id

Id from an uploaded CSV. This id comes from the upload CSV endpoint: https://app.pumice.ai/api/upload-csv. This allows you to upload and store your CSVs for processes like this one. This field is required.

Products in the CSV will be returned with their similar counterparts in the Embeddings CSV.

Type: int

embeddings_csv_id

Id from an uploaded CSV. This id comes from the upload CSV endpoint: https://app.pumice.ai/api/upload-csv. This allows you to upload and store your CSVs for processes like this one. This field is required.

Products from the Target CSV will be compared against this. You can reuse the same embeddings_csv_id with multiple CSVs.

Type: int