πŸš€Replenit Ingestion API - Complete Guide

API Statusarrow-up-right API Versionarrow-up-right Response Timearrow-up-right Uptimearrow-up-right

The unified, production-ready API for real-time commerce data synchronization

Getting Started β€’ Authentication β€’ API Reference β€’ Best Practices


πŸ“‹ Table of Contents


🎯 Overview

The Replenit Ingestion API is the backbone of your marketing automation ecosystem. It provides:

  • Real-time synchronization of customers, orders, and products

  • Bi-directional data flow between your systems and Replenit's intelligence engine

  • Production-grade reliability with 99.9% uptime SLA

  • Enterprise security with API key authentication and data encryption

Use Cases:

  • E-commerce platforms syncing purchase data

  • CRM systems updating customer profiles

  • Inventory management systems pushing product updates

  • Marketing automation platforms triggering campaigns


✨ Key Features

⚑ High Performance

  • < 100ms average response time

  • Batch processing up to 1000 records

  • Automatic retry with exponential backoff

  • Connection pooling & compression

πŸ”’ Enterprise Security

  • API key authentication

  • TLS 1.3 encryption

  • Request validation & sanitization

  • GDPR compliant data handling

πŸ› οΈ Developer Friendly

  • RESTful JSON API

  • Comprehensive error messages

  • Field-level validation feedback

  • Multi-language code examples


πŸš€ Quick Start (5 Minutes)

Prerequisites

Before you begin:

  • βœ… Replenit account (Your dashboard access will be provided via email. Contact your Customer Success Manager if you haven't received it.)

  • βœ… Your Tenant ID (GUID format)

  • βœ… Your API Key (base64 encoded)

Get your credentials:

  1. Complete signup and login via your invitation link (request it from your CSM if you haven't received one)

  2. Navigate to Settings β†’ API

  3. Copy your Tenant ID and generate an API Key

Step 1: Make Your First API Call

Choose your preferred language:

chevron-rightπŸ”§ cURL (Terminal)hashtag
chevron-right🐍 Pythonhashtag
chevron-right🟒 Node.jshashtag

Step 2: Verify Success

βœ… Success Response:

Verify in Dashboard: created data will reflect to Data and Health page in the panel after 24 hours

Step 3: Next Steps

πŸŽ‰ Congratulations! You've successfully integrated with Replenit.

What you just did:

  • βœ… Authenticated with API key

  • βœ… Created a customer profile

  • βœ… Customer is now available for campaigns

Try these next:


πŸ—οΈ Architecture

Core Entities

Entity
Purpose
Key Fields
Update Frequency

Customers

Profiles & Preferences

Email, CustomerId, Consent flags

Real-time or daily

Orders

Purchase Behavior

OrderId, Items, Revenue

Real-time per transaction

Products

Catalog & Inventory

ProductId, Variants, Stock

Hourly or on-change


πŸ” Authentication

All API requests require the x-replenit-auth-key header with your base64-encoded API key.

Quick Example:

Get your API key:

  1. Login to your Replenit panel (Reach out to Customer Success Manager if you don't have invitation email)

  2. Navigate to Settings β†’ API Keys

  3. Click Generate New Key and save securely

πŸ“– Complete security guide: authentication.md β€” includes key rotation, best practices, troubleshooting, and multi-environment setup


πŸ“š API Reference

Base URL

Endpoints Overview

Endpoint
Method
Purpose
Batch Size
Docs

/customers/{tenantId}

POST

Upsert customer profiles

100-500

/customers/{tenantId}/{customerId}

DELETE

Delete customer

-

/orders/{tenantId}

POST

Import orders & transactions

50-200

/orders/{tenantId}/{orderId}

DELETE

Delete order

-

/products/{tenantId}

POST

Sync product catalog

50-100

/products/{tenantId}/{productId}

DELETE

Delete product

-

/products/{tenantId}/variants/{variantId}

DELETE

Delete variant

-

Common Request Format

All POST endpoints expect:

  • βœ… Array of objects (even for single record)

  • βœ… Content-Type: application/json

  • βœ… UTF-8 encoding

Common Response Format

Success (200 OK):

Error (4xx/5xx):


⚑ Rate Limits

Standard Tier: 100 requests/minute, 5,000 requests/hour

All responses include rate limit headers:

Handling 429 Responses:

  • Implement exponential backoff with jitter

  • Use Retry-After header value

  • Monitor X-RateLimit-Remaining

πŸ“– Complete optimization guide: rate-limits.md β€” includes tier comparison, handling strategies, batch optimization, and real-world patterns


βœ… Data Standards

We follow international standards for interoperability:

  • Datetime: ISO 8601 (2024-12-22T14:30:00.000Z UTC)

  • Language: IETF BCP 47 (en-US, fr-FR)

  • Currency: ISO 4217 (USD, EUR, GBP)

  • Encoding: UTF-8 required

πŸ“– Complete standards & production checklist: best-practices.md


🚨 Error Handling

HTTP Status Codes

Code
Meaning
Action Required

200

Success

Continue normal flow

400

Validation Error

Fix request data, check error decoder

401

Unauthorized

Verify API key

404

Tenant Not Found

Check tenant ID

429

Rate Limit

Implement backoff, reduce request rate

500

Server Error

Retry with exponential backoff

Error Response Structure

Common Errors & Solutions

"Tenant not found" (404)

  • βœ… Verify tenant ID is a GUID (36 characters)

  • βœ… Copy from Dashboard β†’ Settings β†’ API

"Unauthorized" (401)

  • βœ… Check x-replenit-auth-key header

  • βœ… Verify full API key was copied

"Validation Error" (400)

  • βœ… Request must be an array: [{...}]

  • βœ… Check required fields per endpoint

  • βœ… Verify string lengths don't exceed limits

πŸ“– Complete troubleshooting: error-responses.md


πŸ“ž Support & Community

Getting Help

Response Times

  • Critical Issues: < 1 hour

  • Standard Support: < 24 hours

  • Feature Requests: 48-72 hours

When Contacting Support

Include:

  • βœ… Tenant ID

  • βœ… Timestamp (UTC) of issue

  • βœ… Full error response (sanitize sensitive data)

  • βœ… Request payload example (sanitize sensitive data)

  • βœ… Expected vs actual behavior


πŸ“š Additional Resources

Getting Started

API Reference

Production Guides

Last updated