Product Catalog Sync

Keep your ERP and ConformaESG product catalogs in sync — supplier products vs company products.

The ConformaESG API exposes two catalogs (see Products):

  • Supplier products — items offered to you by a specific supplier (/supplier/products).
  • Company products — your own SKUs (/company/products).

This recipe shows how to keep both in sync with your master system.

Pattern A — reconcile supplier catalogs nightly

For each supplier in your ERP:

  1. Fetch what ConformaESG already has for this supplier.

    Shell
    curl "{{BASE_URL}}/api/v1/supplier/products?supplierId=$SUPPLIER_ID"
  2. Diff against your ERP list (matching on code).

  3. Create missing items:

    Shell
    curl -X POST {{BASE_URL}}/api/v1/supplier/products \
    -H "Content-Type: application/json" \
    -d '{
    "supplierId": "'"$SUPPLIER_ID"'",
    "name": "Organic Cotton Yarn 30/1",
    "code": "SUP-YRN-030",
    "unitOfMeasure": "KG",
    "unitPrice": "12.50",
    "currency": "EUR",
    "active": true
    }'
  4. Update items whose price, description or availability changed:

    Shell
    curl -X PATCH "{{BASE_URL}}/api/v1/supplier/products/$PRODUCT_ID" \
    -H "Content-Type: application/json" \
    -d '{ "unitPrice": "13.20", "active": true }'
  5. Deactivate items the supplier no longer offers by setting active = false (prefer this over DELETE to preserve history).

Pattern B — sync your own company catalog

The company catalog is smaller and usually controlled by your product team. Sync it on every PIM change:

Shell
curl -X POST {{BASE_URL}}/api/v1/company/products \
-H "Content-Type: application/json" \
-d '{
"name": "T-Shirt Organic Cotton",
"code": "CP-TSH-001",
"description": "Crew neck, heavyweight 180 gsm",
"unitOfMeasure": "PCS",
"active": true
}'

For updates use PATCH; for retirements use active = false (or DELETE if you are certain no traceability journey refers to the product).

Pattern C — use textile endpoints for richer detail

If the product you're syncing is a fabric, yarn or fiber, use the textile endpoints instead of the generic supplier products endpoint — they carry specialized attributes (arealMassGsm, yarnCount, stapleLengthMm, GOTS/GRS flags, recycled/organic content percentages, etc.) that reporting and certification features rely on.

Preserving external references

On every entity you create, store your internal identifier in metadata:

JSON
{
"metadata": {
"erpCode": "SKU-12345",
"pimId": "pim_abc123"
}
}

This enables bidirectional reconciliation without maintaining separate mapping tables.

Warning

Issue one request per item. For large catalogs, throttle your sync to respect the API's rate limits.