API Reference

Products API

Bulk upsert product catalog records for a tenant

Overview

The Products endpoint supports bulk creation and updates of product catalog records for a tenant.

Each request processes an array of product objects and applies upsert semantics based on the tenant's product identifier configuration.

This endpoint is used to synchronize product catalogs, variants, pricing, attributes, and availability from upstream systems into Replenit. Product data is a prerequisite for accurate order ingestion, decisioning, recommendations, and downstream activation.

Quick Reference

Endpoints

POST/products/{tenantId}
DELETE/products/{tenantId}/{productId}

Authentication

x-replenit-auth-keyheader required

Usage

  • • Create new products and variants
  • • Update product attributes and pricing
  • • Synchronize product catalog from external systems
  • • Maintain SKU and variant consistency
  • • Enable accurate linking for orders, replenishment, and recommendations

Identifiers

  • • Product matching is determined by tenant configuration
  • • Common identifiers include ProductId or Sku
  • • Identifier behavior is tenant-specific

Response

Returns the number of processed records

Endpoints

POST/products/{tenantId}
DELETE/products/{tenantId}/{productId}

Parameters

ParameterTypeRequiredDescription
tenantIdGUIDYesTenant identifier

Request

  • Body: JSON array of UpsertProductDto objects
  • Content-Type: application/json

Success Response

  • Status: 200 OK
  • Body: Response envelope containing data.count

Error Responses

StatusDescription
400Invalid request payload
404Tenant not found
500Internal server error

Identifier Behavior

Product matching is determined by the tenant's product identifier priority configuration.

Identifier Priority

Priority SettingIdentifier UsedDescription
productidProductIdExternal product identifier
skuSkuSKU-based identification

Matching Rules

  • If the configured identifier exists, the product record is updated
  • If the configured identifier does not exist, a new product record is created
  • Secondary identifiers may be stored but are not used for matching

Example

{
  "ProductId": "P-100",
  "Sku": "SKU-100",
  "Name": "Premium Shampoo"
}

Identifier priority can be viewed or modified in the tenant configuration within the Replenit platform.

Product identifiers used in Replenit must be consistent with identifiers used in upstream and downstream systems, including:

  • • Order ingestion
  • • Recommendation logic
  • • Analytics and reporting
  • • Marketing and activation platforms

When ProductId is used as the primary identifier, the same identifier must be used across order items and downstream systems.

When Sku is used as the primary identifier, SKUs must be globally unique across variants.

Inconsistent product identifiers may result in unlinked orders, incorrect attribution, or degraded decision quality.

Product Identifier Configuration

Product matching and resolution in Replenit is controlled by the tenant-level Product Identifier Selection.

This configuration defines which field is used as the primary identifier when ingesting and resolving products across the platform.

Where to Configure

The product identifier can be viewed or modified in the Replenit platform under:

Replenit Dashboard → Settings → Tenant Settings → Product Identifier Selection

This setting requires Admin access. If you do not have access, contact your platform administrator or your Replenit Customer Success Manager (CSM).

Supported Identifier Modes

ConfigurationIdentifier UsedDescription
productidProductIdUses the external product identifier provided by your system
skuSkuUses SKU as the primary product identifier

Behavior During Ingestion

  • The configured identifier is used to match incoming products to existing records
  • If a matching product exists, it is updated
  • If no matching product exists, a new product is created
  • Secondary identifiers may be stored but are not used for matching

Impact on APIs

This configuration affects:

Products API

Product upsert and deletion behavior

Orders API

Resolution of OrderItems against the product catalog

Decisioning

Accurate product attribution for downstream actions

Operational Requirement

Ensure that the identifier used in API payloads (ProductId or Sku) is:

  • Consistently generated in upstream systems
  • Stable over time
  • Aligned with the configured Product Identifier Selection

Misalignment between payload identifiers and tenant configuration may result in unresolved or duplicated products.

Request Schema

UpsertProductDTO

FieldTypeMax LengthRequiredDescription
ProductIdstring100ConditionalExternal product identifier
Skustring100ConditionalSKU identifier
Namestring255YesProduct name
DescriptionstringNoProduct description
Brandstring100NoBrand name
Categorystring255NoProduct category
ImageUrlstringNoPrimary product image
IsActivebooleanNoProduct availability flag
Currencystring3NoISO 4217 currency code
PricenumberNoCurrent selling price
OriginalPricenumberNoPre-discount price
VariantsVariantDto[]NoProduct variants

VariantDTO

FieldTypeMax LengthRequiredDescription
VariantIdstring100NoExternal variant identifier
Skustring100YesVariant SKU
PricenumberNoVariant price
OriginalPricenumberNoVariant original price
Sizestring50NoSize attribute
Colorstring50NoColor attribute
IsActivebooleanNoVariant availability

Data Completeness & Decision Quality

Replenit's decisioning accuracy improves with broader and richer data across all entities, including users, products, orders, and events.

You are encouraged to send as many fields as possible for every object, as long as the data is:

  • Stable – consistently defined over time
  • Complete – high coverage across records
  • Reliable – not sparsely populated or frequently changing in meaning

While only a subset of fields is required for ingestion, additional attributes directly enhance:

  • Profiling accuracy (user, product, and behavioral)
  • Contextual understanding for decisioning
  • Reasoning quality for all downstream decisions (replenishment, substitution, cross-sell, churn prevention, etc.)

Rule of thumb:

If a field exists, is well-populated, and carries business meaning, it should be sent.

Optional fields never block ingestion, but richer payloads consistently produce better decisions.

Examples

Minimal Product

[
  {
    "ProductId": "P-001",
    "Name": "Basic Product"
  }
]

Standard Product

[
  {
    "ProductId": "P-100",
    "Sku": "SKU-100",
    "Name": "Premium Shampoo",
    "Brand": "Acme",
    "Category": "Hair Care",
    "Currency": "EUR",
    "Price": 19.99,
    "OriginalPrice": 24.99,
    "IsActive": true
  }
]

Product with Variants

[
  {
    "ProductId": "P-200",
    "Name": "Conditioner",
    "Brand": "Acme",
    "Category": "Hair Care",
    "Variants": [
      {
        "VariantId": "V-200-250",
        "Sku": "SKU-200-250ML",
        "Price": 14.99,
        "Size": "250ml",
        "IsActive": true
      },
      {
        "VariantId": "V-200-500",
        "Sku": "SKU-200-500ML",
        "Price": 24.99,
        "Size": "500ml",
        "IsActive": true
      }
    ]
  }
]

Request Examples

curl -X POST "https://api.replen.it/products/{tenantId}" \
  -H "Content-Type: application/json" \
  -H "x-replenit-auth-key: YOUR_BASE64_ACCESS_KEY" \
  -d @products.json

Response Examples

Success

{
  "success": true,
  "message": "Products saved.",
  "data": {
    "count": 5,
    "processedAt": "2024-12-22T14:05:51Z"
  }
}

Validation Error – Missing Identifier

{
  "status": 400,
  "errors": {
    "": [
      "At least one of the following properties must have a value: ProductId, Sku"
    ]
  }
}

Related Documentation

Need help or have questions?

Our team is ready to assist you. Reach out to us at support@replen.it

Email Support