Replenit API Integration Guide #
Introduction #
Replen.it’s APIs are designed to facilitate seamless integration with your systems. These APIs enable you to send historical and ongoing user, transactional, and product catalog data to Replen.it for delivering predictive replenishment reminders.
If your organization uses one of the supported marketing automation platforms, replenishment reminders will be delivered through these platforms. Replen.it only requires your non-PII user identifier (e.g., a user ID assigned by the platform). Personally Identifiable Information (PII), such as email addresses or phone numbers, is managed entirely on these platforms, ensuring enhanced data privacy and compliance with privacy regulations.
Supported platforms include:
- Acoustic
- Adobe Experience Cloud
- Bloomreach
- Braze
- CleverTap
- Cordial
- Emarsys
- Insider
- Klaviyo
- Salesforce Marketing Cloud
For clients not using these platforms, Replen.it offers custom API integration. Additional fields like email, phone, and opt-in status are mandatory for sending directly to Replen.it as part of the integration.
General API Information #
Attribute | Details |
Base URL | https://services.replen.it |
Authentication | Requires x-replenit-auth-key header. Retrieve from the Access Keys section in the Replen.it dashboard. |
Rate Limits | User & Transaction APIs: 2,500 requests/min Product APIs: 1,000 requests/min |
Max Payload Size | Individual: 5MB Bulk Requests: 10MB |
Timeouts | All requests timeout after 30 seconds. |
Content-Type | application/json |
Headers #
All API endpoints across the Replenit environment share the same header structure. Ensure that the following header is included in every request to authenticate and pass/retrieve data from your instance.
Header | Sample Value | Description |
x-replenit-auth-key | CfDJ8O1jAbcstZ1Dq6sxhdCsfxhiVOJmZCUmBjYSbay41YexvjvN1MwcRXzOS5waVaFqrByvOW6urHjiEkb7A7MJmgnZbHl188ajaYpYsxGt0gYjjWboeU6DcI9ctuN5XvXpRkBJb_7aaCo0tJ29xtQDgZlvI_Hjx_fdXLnfEOIyWAYU77Cs5m-isoCPgpu9f26CAriD2BwStOPY3rSl72N-X8sZ0dzaHaZaDzuwhqfBIfOycztpPAwGpKGKzFHsF9UJOQ | This is your Access token to be able to pass/retrieve data from your instance. |
Complete API Overview #
API | Endpoint | Method | Purpose | When to Use |
User Data API | /users/{clientId}/upsert | POST | Add or update a single user. | When adding/updating one user |
/users/{clientId}/upsert-many | POST | Add or update multiple users in bulk. | Bulk operations for users | |
/users/{clientId}/update-user-id | PUT | Update the user ID for a user. | Updating user identifiers | |
/users/{clientId}?identifier={id} | DELETE | Delete a user by their identifier. | Removing user data | |
Transaction API | /transactions/{clientId}/upload | POST | Add or update a single transaction. | When adding one transaction |
/transactions/{clientId}/upload-bulk | POST | Add or update multiple transactions. | Bulk operations for transactions | |
/transactions/{clientId}?transactionId={id} | DELETE | Delete a transaction by ID. | ||
Product API | /products/{clientId}/many | POST | Add product data in bulk. | Adding new product catalog |
/products/{clientId}/many | PUT | Update product data in bulk. | Updating product information | |
/products/{clientId} | DELETE | Delete product data. | Removing products or variants | |
/products/{clientId}?productId={productId} | GET | Check and retrieve product details. | Fetching product and variant info |
Integration Sequence #
- Send User Data First
- Before sending transaction or product data, clients must send user data/identifiers to Replen.it. This ensures that all subsequent data (e.g., transactions, products) can be correctly associated with the appropriate users.
- Send Transaction Data
- Once user data is processed, send historical transaction data, followed by ongoing daily updates for new transactions. This step provides the foundation for accurate replenishment predictions.
- Send Product Feed
- After user and transaction data are integrated, send the product catalog data, including product attributes, stock availability, and variants. The product feed supports dynamic content in replenishment reminders.
User Data API Suggestions #
- For supported marketing automation platforms (e.g., Salesforce, Klaviyo), only send
userId
to simplify integration and enhanced security. - Ensure user language preferences (
language
) are accurate to tailor communications effectively. - Use bulk upsert APIs for large datasets to reduce the number of API calls.
Transaction Data API Suggestions #
- Include all mandatory fields in each transaction payload, such as
transactionId
,transactionDate
, andlineItems[].productId
. - Avoid real-time transaction uploads unless necessary. Daily updates are sufficient for most use cases.
- Ensure line-item data includes accurate product identifiers (
SKU
,productId
) and quantities.
Product Data API Suggestions #
- Include all mandatory fields such as
productId
,SKU
,productName
, andprice
. - Validate product availability (
isAvailable
) and stock levels before uploading. - Use bulk APIs for catalog updates to minimize API calls.