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
Authentication
x-replenit-auth-keyheader requiredUsage
- • 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
ProductIdorSku - • Identifier behavior is tenant-specific
Response
Returns the number of processed records
Endpoints
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| tenantId | GUID | Yes | Tenant 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
| Status | Description |
|---|---|
| 400 | Invalid request payload |
| 404 | Tenant not found |
| 500 | Internal server error |
Identifier Behavior
Product matching is determined by the tenant's product identifier priority configuration.
Identifier Priority
| Priority Setting | Identifier Used | Description |
|---|---|---|
| productid | ProductId | External product identifier |
| sku | Sku | SKU-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 SelectionThis setting requires Admin access. If you do not have access, contact your platform administrator or your Replenit Customer Success Manager (CSM).
Supported Identifier Modes
| Configuration | Identifier Used | Description |
|---|---|---|
| productid | ProductId | Uses the external product identifier provided by your system |
| sku | Sku | Uses 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
| Field | Type | Max Length | Required | Description |
|---|---|---|---|---|
| ProductId | string | 100 | Conditional | External product identifier |
| Sku | string | 100 | Conditional | SKU identifier |
| Name | string | 255 | Yes | Product name |
| Description | string | – | No | Product description |
| Brand | string | 100 | No | Brand name |
| Category | string | 255 | No | Product category |
| ImageUrl | string | – | No | Primary product image |
| IsActive | boolean | – | No | Product availability flag |
| Currency | string | 3 | No | ISO 4217 currency code |
| Price | number | – | No | Current selling price |
| OriginalPrice | number | – | No | Pre-discount price |
| Variants | VariantDto[] | – | No | Product variants |
VariantDTO
| Field | Type | Max Length | Required | Description |
|---|---|---|---|---|
| VariantId | string | 100 | No | External variant identifier |
| Sku | string | 100 | Yes | Variant SKU |
| Price | number | – | No | Variant price |
| OriginalPrice | number | – | No | Variant original price |
| Size | string | 50 | No | Size attribute |
| Color | string | 50 | No | Color attribute |
| IsActive | boolean | – | No | Variant 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.jsonResponse 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
