Agent web access
Replenit’s production agents may access customer websites to retrieve and process publicly available content required for enrichment, tone adaptation, product understanding, and related agent-based workflows.
To prevent these requests from being blocked by rate limiting, bot protection, web application firewalls, or other security controls, allowlist the following static egress IP addresses:
34.12.230.237 34.91.210.3
All outbound requests from Replenit’s production agent infrastructure originate from these IP addresses.
- Expected request volume and traffic patterns
- User-agent details
- Target domains and URL paths
- Request frequency and concurrency
- Environment-specific access requirements
API Reference
Send customer profiles, order history, and product catalogue data into Replenit. Once connected, the decision engine begins making 1:1 replenishment, cross-sell, and retention decisions automatically.
Overview
Replenit exposes three POST endpoints for ingesting data (customers, orders, and products) and four DELETE endpoints for removing records. All POST endpoints are upsert operations: resending the same ID updates the existing record.
Authentication
Every request requires two values: your Tenant ID passed in the URL path, and your API key in the x-replenit-auth-key header.
- Header
- x-replenit-auth-key
- Value
- Your base64-encoded API key
- Tenant ID
- GUID, included as a path parameter on every request
Retrieve both from your dashboard under Settings → API Keys.
POST https://api.replen.it/customers/{tenantId} x-replenit-auth-key: YOUR_API_KEY Content-Type: application/json
Base URL & endpoints
| Endpoint | Method | Purpose | Batch |
|---|---|---|---|
| /customers/{tenantId} | POST | Upsert customer profiles | 100–500 |
| /customers/{tenantId} | DELETE | Delete customer by ID or email | Single record |
| /orders/{tenantId} | POST | Upsert orders with line items | 50–200 |
| /orders/{tenantId}/{orderId} | DELETE | Delete an entire order | Single record |
| /orders/{tenantId}/{orderId}/items | DELETE | Delete a single line item | Single record |
| /products/{tenantId} | POST | Upsert product catalogue | 50–100 |
| /products/{tenantId}/{productId} | DELETE | Delete product and all variants | Single record |
| /products/{tenantId}/{productId}/variants/{variantId} | DELETE | Delete a single variant | Single record |
Data flow
Once your data is connected, it passes through five stages before decisions are dispatched. The API integration covers the first stage. The remaining stages run automatically inside Replenit.
Integration sequence
A typical initial integration follows this order. After the initial load, each endpoint syncs independently in real time.
Internal pipeline
Dashboard data and health metrics reflect ingested records within 24 hours of your first sync.
Response format
All POST endpoints return the same { success, message, data } envelope. data is an ingestion receipt: a per-record breakdown of what the API accepted and what it rejected.
rejectedCount, not the HTTP status. A batch containing invalid records still returns HTTP 200 with "success": true and a "… saved." message, even when every record in it was rejected. A client that only checks the status code will lose data silently.Receipt fields
| Field | Type | Meaning | |
|---|---|---|---|
| count | integer | Number of records read from the request body. | |
| accepted | array | One entry per accepted record: { index, recordRef }. | |
| acceptedCount | integer | Length of accepted. | |
| rejected | array | One entry per rejected record, each carrying index, recordRef, reason, and a violations array naming the fields that failed. | |
| rejectedCount | integer | Length of rejected. This is the field your integration should branch on. | |
| warnings | array | Non-blocking rule findings, aggregated per rule across the whole batch rather than per record. | |
| schemaVersion | string | Version identifier of the validation schema that processed the request, e.g. Product/v1. | |
| schemaSource | string | Origin of the validation schema. | |
| schemaHash | string | null | Integrity hash of the validation schema, or null. | |
| processedAt | string | UTC timestamp, ISO 8601 with seven fractional digits. |
schemaVersion, schemaSource, and schemaHash are internal versioning fields Replenit uses to track which validation schema processed the request. They are informational — integrations do not need to read or act on them.
Example: all records accepted
{
"success": true,
"message": "Products saved.",
"data": {
"count": 4,
"accepted": [
{ "index": 0, "recordRef": "productId=P-SMK-1001" },
{ "index": 1, "recordRef": "productId=P-SMK-1002" },
{ "index": 2, "recordRef": "productId=P-SMK-1003" },
{ "index": 3, "recordRef": "productId=P-SMK-1004" }
],
"acceptedCount": 4,
"rejected": [],
"rejectedCount": 0,
"warnings": [],
"schemaVersion": "Product/v1",
"schemaSource": "GlobalTemplate",
"schemaHash": null,
"processedAt": "2026-09-02T16:17:03.5026951Z"
}
}Example: record rejected
A product whose variant is missing the required variantId. Note that the response is still HTTP 200 with "success": true — only rejectedCount reveals that nothing was stored.
{
"success": true,
"message": "Products saved.",
"data": {
"count": 1,
"accepted": [],
"acceptedCount": 0,
"rejected": [
{
"index": 0,
"recordRef": "productId=SMK-DOC-REJ",
"reason": "schema_enforce",
"violations": [
{
"path": "productVariants[0].variantId",
"rule": "required",
"mode": "Enforce",
"detail": null
}
]
}
],
"rejectedCount": 1,
"warnings": [
{
"path": "taxonomy",
"rule": "required",
"mode": "Warn",
"occurrences": 1,
"sampleIndexes": [0]
}
],
"schemaVersion": "Product/v1",
"schemaSource": "GlobalTemplate",
"schemaHash": null,
"processedAt": "2026-09-07T13:33:41.8504594Z"
}
}Rejected records are not processed into the platform. They are retained for review for ten days. Fix the fields listed under violations and resend the record.
Example: accepted with warnings
Warn-level findings never reject a record. It is stored and processed normally, and the finding is reported in warnings.
{
"success": true,
"message": "Products saved.",
"data": {
"count": 1,
"accepted": [{ "index": 0, "recordRef": "productId=SMK-DOC-WARN" }],
"acceptedCount": 1,
"rejected": [],
"rejectedCount": 0,
"warnings": [
{
"path": "productVariants[].originalPrice",
"rule": "required",
"mode": "Warn",
"occurrences": 1,
"sampleIndexes": [0]
}
],
"schemaVersion": "Product/v1",
"schemaSource": "GlobalTemplate",
"schemaHash": null,
"processedAt": "2026-09-07T13:33:41.4194541Z"
}
}Reading the receipt
- Warnings and violations are different shapes.
warningsare aggregated per rule across the whole batch, withoccurrences,sampleIndexes, and a template-formpathsuch asproductVariants[].currency.violationsare per record with a concrete index, e.g.productVariants[0].variantId. The two cannot be joined onpath. detailcan be null. Required-rule violations carry no detail text; value rules do, e.g."length 11 is below 12". Do not assume it is always a string.recordRefcan be null. When the missing field is the identifier itself, there is nothing to name the record by. Fall back toindexto map the entry back to your request array.
POST /customers/{tenantId}
DELETE /customers/{tenantId}
POST /orders/{tenantId}
DELETE /orders/{tenantId}/{orderId}
DELETE /orders/{tenantId}/{orderId}/items
POST /products/{tenantId}
DELETE /products/{tenantId}/{productId}
DELETE /products/{tenantId}/{productId}/variants/{variantId}
Product enrichment
After a product is ingested, Replenit's reasoning layer automatically analyses each product record and generates a structured set of internal semantic attributes. You do not send these attributes. They are produced by Replenit and used exclusively by the decision engine.
How it works
Enrichment runs automatically after every product upsert. The more complete your product data (particularly ProductName, Taxonomy, BrandName, Gender, and descriptive variant Name and Description fields), the more precise the output.
Taxonomy, BrandName, Gender, descriptive variant Name and Description, Size, Language) gives the reasoning layer more signal. The more complete your product data, the more precise the output and the better the decisions downstream.Customer enrichment
Replenit transforms customer transactions into continuously evolving behavioural state. Rather than relying on static scores, segments, or predefined rules, the platform continuously interprets purchasing behaviour over time, identifying intent, behavioural shifts, consumption patterns, and lifecycle signals as customer behaviour evolves.
Each new interaction updates the customer's contextual state, allowing downstream decision systems to reason over evolving behaviour rather than isolated transactions or historical scores.
How it works
Error codes
| Status | Meaning | Action |
|---|---|---|
| 200 | Success | Request processed. Continue normal flow. |
| 400 | Malformed request | The request itself could not be parsed. Returns an RFC 9110 ProblemDetails object, not the standard envelope |
| 403 | Access denied | Verify the x-replenit-auth-key header and key value, and that the URL path uses your tenant GUID. Body is plain text, not JSON |
| 404 | Tenant not found | Verify tenant ID is the correct GUID from Settings → API |
| 429 | Rate limited | Reduce request rate; use Retry-After header; implement exponential backoff |
| 500 | Server error | Retry with backoff. If persistent, contact support@replen.it |
400 returns a ProblemDetails object and a 403 returns plain text, so do not call response.json() unconditionally. Check the status code and the Content-Type header first.400 — malformed request
A 400 now means the request itself could not be parsed: the body is not valid JSON, or it is not an array. Per-record validation failures no longer surface as 400 — a well-formed request containing invalid records returns 200 with those records listed under rejected.
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"$": ["Expected depth to be zero at the end of the JSON payload. …"]
},
"traceId": "00-497e1ed30e2c870038bc415e729d76f9-92fa48c278c1c812-00"
}403 — access denied
A missing or invalid auth key returns 403 with a plain-text body:
RBAC: access denied
RBAC: access denied, check that {tenantId} is the GUID from Settings → API.Rate limits
Standard tier: 100 requests/minute, 5,000 requests/hour. All responses include rate limit headers.
X-RateLimit-Limit: 100 X-RateLimit-Remaining: 95 X-RateLimit-Reset: 1640000000 Retry-After: 30 // present on 429 responses
Best practices
200 with "success": true as long as the request was well formed, even when records inside it were rejected. Branch on data.rejectedCount, log the violations of each rejected record so the failing fields are visible in your own system, and never treat the status code alone as confirmation that the batch was stored.OrderItems reference their SKUs. Missing SKU references won't fail the order ingest, but the reasoning layer won't be able to contextualise those line items until the product is present.EmailOptin, SmsOptin, WhatsappOptin, and AppPushOptin. Replenit uses these as behavioural profiling signals. Stale values will skew how decisions are contextualised for that customer.Stock and IsAvailable whenever inventory changes. When IsAvailable is false, that variant will not be included in decisions. Keeping this current prevents decisions being generated for products that cannot be fulfilled.Taxonomy, BrandName, Gender, variant Name, Description, Size, Language) gives the reasoning layer more signal to work with. The more complete your records, the more precise and well-contextualised the decisions Replenit generates.GdprOptin defaults to false. Replenit will not process, enrich, or generate decisions for any customer where this is false. Sending only customers with valid, current consent is a legal obligation that must be met in your systems before data reaches this API. Replenit does not validate, manage, or refresh consent state. Message-level suppression at delivery time is handled by your connected marketing automation platform.CustomerId and your destination cannot resolve it, the decision will arrive but cannot be matched to a customer record. When in doubt, send both CustomerId and Email on every customer record.Sku in OrderItems must exactly match a ProductVariants[].Sku, case-sensitive. Mismatches break the link between purchase history and the product catalogue, degrading reasoning quality.OrderDate values must be UTC ISO 8601: 2025-08-22T21:00:00Z. Records carrying localised date strings are rejected individually and appear in data.rejected.[{...}] not {...}. This is the most common cause of 400 errors.