/api/ingest
Sandbox
Accept raw product/supplier data and queue it for processing. Returns a job ID for tracking downstream steps.
Results will appear here...
const res = await fetch('https://claroos.polsia.app/api/ingest', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
source: 'acme-erp',
records: [
{ id: 'SKU-001', name: 'Industrial Air Compressor 5HP', description: '...' },
]
})
});
const { job_id, status, record_count } = await res.json();
import requests
resp = requests.post(
'https://claroos.polsia.app/api/ingest',
json={
'source': 'acme-erp',
'records': [
{'id': 'SKU-001', 'name': 'Industrial Air Compressor 5HP', 'description': '...'},
]
}
)
data = resp.json()
print(data['job_id'])
/api/classify
Sandbox
Classify product descriptions into hierarchical taxonomy categories using semantic AI analysis. Pass a job_id from /ingest or use any string.
Results will appear here...
const res = await fetch('https://claroos.polsia.app/api/classify', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
job_id: 1,
records: [
{ id: 'SKU-001', name: 'Industrial Air Compressor 5HP', description: '...' },
{ id: 'SKU-002', name: 'Pneumatic Drill 18V', description: '...' },
]
})
});
const { classifications } = await res.json();
/api/enrich
Sandbox
Enrich company/supplier records with firmographic data, employee count, revenue, industry, tech stack, and more.
Results will appear here...
const res = await fetch('https://claroos.polsia.app/api/enrich', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
records: [
{ company_name: 'Harker Industrial Supply', domain: 'harkersupply.com' },
{ company_name: 'Pinnacle Parts Co.', domain: 'pinnacleparts.com' },
]
})
});
const { enrichments } = await res.json();
/api/sync
Sandbox
Sync enriched data back to your ERP, procurement system, or data warehouse. Supports ERP, procurement, warehouse, CRM, and custom destinations.
Results will appear here...
const res = await fetch('https://claroos.polsia.app/api/sync', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
job_id: 1,
destination: 'erp',
format: 'json'
})
});
const { sync_id, status } = await res.json();
Drop-in Connector
Reference
A minimal drop-in integration template for adding ClaroOS enrichment to any vertical SaaS or ERP. Uses webhook callbacks for async results.
/**
* ClaroOS Drop-In Connector
* Add this file to your ERP/procurement platform to enable
* product enrichment via the ClaroOS API pipeline.
*
* Usage:
* const connector = require('./claro-connector');
* connector.init({ apiBase: 'https://claroos.polsia.app' });
*/
const API_BASE = process.env.CLARO_API_BASE || 'https://claroos.polsia.app';
const connector = {
/**
* Ingest products into ClaroOS pipeline.
* @param {string} source - Your platform identifier
* @param {Array} records - Array of {id, name, description} objects
*/
async ingest(source, records) {
const res = await fetch(`${API_BASE}/api/ingest`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ source, records })
});
return res.json();
},
/**
* Classify products by taxonomy.
* @param {number} jobId - job_id from ingest response
* @param {Array} records - Array of {id, name, description}
*/
async classify(jobId, records) {
const res = await fetch(`${API_BASE}/api/classify`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ job_id: jobId, records })
});
return res.json();
},
/**
* Enrich supplier/company records with firmographic data.
* @param {Array} records - Array of {company_name, domain?}
*/
async enrich(records) {
const res = await fetch(`${API_BASE}/api/enrich`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ records })
});
return res.json();
},
/**
* Sync enriched data back to your ERP.
* @param {number} jobId - job_id from ingest response
* @param {string} destination - erp | procurement | warehouse | crm | custom
* @param {string} format - json | csv | xml
*/
async sync(jobId, destination = 'erp', format = 'json') {
const res = await fetch(`${API_BASE}/api/sync`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ job_id: jobId, destination, format })
});
return res.json();
},
/**
* Full pipeline: ingest → classify → enrich → sync.
* Handles async job tracking automatically.
* @param {Object} config - { source, records, destination, format }
*/
async runFullPipeline({ source, records, destination = 'erp', format = 'json' }) {
// 1. Ingest
const { job_id } = await this.ingest(source, records);
console.log(`[Claro] Job ${job_id} created, ingested ${records.length} records`);
// 2. Classify
const { classifications } = await this.classify(job_id, records);
console.log(`[Claro] Classified ${classifications.length} products`);
// 3. Enrich (per unique supplier)
const suppliers = [...new Set(classifications.map(c => c.id.split('-')[0]))];
const { enrichments } = await this.enrich(suppliers.map(s => ({ company_name: s })));
console.log(`[Claro] Enriched ${enrichments.length} suppliers`);
// 4. Sync to ERP
const { sync_id, status } = await this.sync(job_id, destination, format);
console.log(`[Claro] Sync ${sync_id} queued — status: ${status}`);
return { job_id, classifications, enrichments, sync_id, status };
}
};
module.exports = connector;
Your ERP exports product catalog → POST to /api/ingest → Job ID returned
Product descriptions → AI taxonomy mapping → Hierarchical categories
Supplier/company → Firmographic data, employee count, revenue, tech stack
Enriched data → POST to /api/sync → Pushed to your ERP/procurement system
Full Schema Reference
Reference
Complete schema documentation for all ClaroOS API endpoints and response shapes.
POST /api/ingest
{ "job_id": 42, "status": "queued", "record_count": 3, "created_at": "2026-05-22T21:00:00Z" }
POST /api/classify
{ "job_id": 42, "classified_count": 3, "classifications": [{ "id": "SKU-001", "category": "Industrial Machinery > HVAC > Compressors", "confidence": 0.92, "taxonomy_version": "v2.1" }] }
POST /api/enrich
{ "enriched_count": 2, "enrichments": [{ "input": { "company_name": "Harker Industrial" }, "enriched": { "employee_range": "51-200", "annual_revenue": "$10M-$50M", "industry": "Wholesale Trade", "tech_stack": ["Salesforce", "SAP"] }, "confidence": 0.87 }] }
POST /api/sync
{ "sync_id": 7, "job_id": 42, "destination": "erp", "status": "processing", "estimated_completion": "30s" }