POST /api/ingest Sandbox

Accept raw product/supplier data and queue it for processing. Returns a job ID for tracking downstream steps.

Request body
Response
Results will appear here...
Node.js (fetch)
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();
Python (requests)
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'])
FieldTypeRequiredDescription
sourcestringYesOriginating platform identifier (e.g. "sap-s4hana", "acme-erp")
recordsarrayYesArray of raw product/supplier objects. Max 10,000 per call.
POST /api/classify Sandbox

Classify product descriptions into hierarchical taxonomy categories using semantic AI analysis. Pass a job_id from /ingest or use any string.

Request body
Response
Results will appear here...
Node.js (fetch)
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();
FieldTypeRequiredDescription
job_idnumberYesID from /ingest response. Used for tracking. Can be any integer in sandbox.
recordsarrayYesArray of {id, name, description} objects.
POST /api/enrich Sandbox

Enrich company/supplier records with firmographic data, employee count, revenue, industry, tech stack, and more.

Request body
Response
Results will appear here...
Node.js (fetch)
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();
FieldTypeRequiredDescription
recordsarrayYesArray of {company_name, domain?} objects. At least one of company_name or domain required.
POST /api/sync Sandbox

Sync enriched data back to your ERP, procurement system, or data warehouse. Supports ERP, procurement, warehouse, CRM, and custom destinations.

Request body
Response
Results will appear here...
Node.js (fetch)
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();
FieldTypeRequiredDescription
job_idnumberYesID from /ingest response.
destinationstringYesTarget system: erp, procurement, warehouse, crm, or custom.
formatstringNoOutput format: json (default), csv, xml.
dataarrayNoOptional inline data to sync. If omitted, pulls from job context.
TMPL 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.

JavaScript — claro-connector.js
/**
 * 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;
1
Ingest

Your ERP exports product catalog → POST to /api/ingest → Job ID returned

2
Classify

Product descriptions → AI taxonomy mapping → Hierarchical categories

3
Enrich

Supplier/company → Firmographic data, employee count, revenue, tech stack

4
Sync

Enriched data → POST to /api/sync → Pushed to your ERP/procurement system

REF Full Schema Reference Reference

Complete schema documentation for all ClaroOS API endpoints and response shapes.

POST /api/ingest

FieldTypeRequiredDescription
sourcestringYesOriginating platform ID (e.g. "sap-s4hana", "oracle-fusion")
recordsarrayYesArray of product/supplier objects. Max 10,000 records per call.
Response
{ "job_id": 42, "status": "queued", "record_count": 3, "created_at": "2026-05-22T21:00:00Z" }

POST /api/classify

FieldTypeRequiredDescription
job_idnumberYesID from /ingest response.
recordsarrayYesArray of {id, name, description} objects.
Response
{ "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

FieldTypeRequiredDescription
recordsarrayYesArray of {company_name, domain?} objects.
Response
{ "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

FieldTypeRequiredDescription
job_idnumberYesID from /ingest response.
destinationstringYeserp | procurement | warehouse | crm | custom
formatstringNojson (default) | csv | xml
dataarrayNoInline data to sync. If omitted, pulls from job context.
Response
{ "sync_id": 7, "job_id": 42, "destination": "erp", "status": "processing", "estimated_completion": "30s" }