🧭 Overview
The Commerce Data APIs allow you to populate Loop’s ecosystem with commerce data from any source—your commerce platform, ERP, OMS, middleware, or custom systems. These APIs are intended for custom integrations where Loop doesn’t have a prebuilt app for your commerce platform; if you’re using a platform with native Loop integration, commerce data is synced automatically. By syncing products, orders, customers, locations, inventory, and collections into Loop, you enable Loop to validate return eligibility, power exchange workflows, and maintain accurate records across your systems.📦 API Reference
The Commerce Data APIs are organized into six main domains. Each API follows a consistent pattern with support for Create, List, Get, Update, Upsert, and Delete operations.🛍️ Products API
The Products API provides Loop with standardized product data from any eCommerce system, ensuring accurate return processing and exchange matching.- Product Metadata — Unique product IDs, SKUs, names, descriptions, and vendor details
- Pricing & Classification — Price, product type, collections, and tags
- Identifiers — Barcodes and external references for cross-platform tracking
- Variants & Options — Attributes like colors, sizes, and associated variants
- Media & Assets — Product images for return experience consistency
ID Mapping RequirementWhen syncing products, your middleware must store the returned
loop_product_id mapped to your platform’s external_id. You’ll reference these Loop IDs when creating orders.| Operation | Method | Description |
|---|---|---|
| List Products | GET | Retrieve products with filters (external_id, barcode, tags) |
| Create Product | POST | Create a new product |
| Upsert Product | PUT | Create or update by external_id |
| Get Product | GET | Get details for a single product |
| Update Product | PUT | Update an existing product |
| Delete Product | DELETE | Delete a product |
| Operation | Method | Description |
|---|---|---|
| List Variants | GET | List variants for a product |
| Create Variant | POST | Create a new variant |
| Upsert Variant | PUT | Create or update variant by external_id |
| Get Variant | GET | Get variant details |
| Update Variant | PATCH | Update a variant |
| Delete Variant | DELETE | Delete a variant |
📋 Orders API
The Orders API provides a comprehensive view of transactional data from any eCommerce system, ensuring Loop has the necessary context to facilitate seamless return and exchange processing.- Order Metadata — Unique order identifiers, status, and associated sales channels
- Customer Information — Buyer details, including contact information and external references
- Financial Details — Total price, applied discounts, tax calculations, and refund history
- Shipping & Fulfillment — Shipping addresses, carrier details, fulfillment statuses, and tracking numbers
- Line Items & Adjustments — Purchased products, pricing, applied discounts, duties, and refund eligibility
Prerequisite: Products must exist in Loop before syncing orders. Order line items should reference Loop Product IDs (from your ID mapping) rather than external IDs for accurate return processing.
| Operation | Method | Description |
|---|---|---|
| List Orders | GET | Retrieve orders with optional filters |
| Create Order | POST | Create a new order |
| Upsert Order | PUT | Create or update by external_id |
| Get Order | GET | Get details for a single order |
| Update Order | PUT | Update an existing order |
| Delete Order | DELETE | Delete an order |
line_items— Array of purchased items, each referencing a product/variantfulfillments— Fulfillment data including status, tracking, and fulfilled line itemsrefunds— Refund data for reconciliationshipping_address/billing_address— Customer address information
👤 Customers API
The Customers API stores essential customer data to support return validation and exchange processing across platforms.- Customer Identity — Unique customer IDs, external references, and contact details
- Order & Return Context — Flexible tags for purchase history, return status, and customer segmentation
- Channel Association — Identifies where the customer was created or last interacted
| Operation | Method | Description |
|---|---|---|
| List Customers | GET | Retrieve customers with optional filters |
| Create Customer | POST | Create a new customer |
| Upsert Customer | PUT | Create or update by external_id |
| Get Customer | GET | Get details for a single customer |
| Update Customer | PUT | Update an existing customer |
| Delete Customer | DELETE | Delete a customer |
first_name/last_name— Customer nameemail— Email addressphone— Phone numbertags— Array of tags for customer segmentation
📍 Locations API
The Locations API provides Loop with a standardized view of return and fulfillment locations, ensuring accurate routing and inventory management.- Location Metadata — Unique location IDs, external references, and status
- Physical Address — Warehouse or store details, including company name and full address
- Channel Association — Identifies where the location is sourced from
| Operation | Method | Description |
|---|---|---|
| List Locations | GET | Retrieve locations with optional filters |
| Create Location | POST | Create a new location |
| Upsert Location | PUT | Create or update by external_id |
| Get Location | GET | Get details for a single location |
| Update Location | PUT | Update an existing location |
| Delete Location | DELETE | Delete a location |
name— Location name (e.g., “Main Warehouse”)status—activeorinactiveaddress— Full address object with address1, city, region, postal_code, country_code
📊 Inventories API
The Inventories API provides real-time visibility into stock levels across locations, ensuring accurate return processing and exchange fulfillment.- Stock Availability — Tracks available inventory counts for product variants
- Product Details — SKU, barcode, name, and weight for precise identification
- Location Association — Links inventory to specific warehouses or return locations
Inventory records are keyed by the combination of
productVariantId and locationId. Both Products and Locations must exist in Loop before creating inventory records.| Operation | Method | Description |
|---|---|---|
| List Inventories | GET | List inventories (filter by location or variant) |
| Create Inventory | POST | Create inventory record |
| Get Inventory | GET | Get inventory for variant at location |
| Upsert Inventory | PUT | Create or update inventory |
| Delete Inventory | DELETE | Delete inventory record |
available_count— Number of units available at the specified location
🏷️ Collections API
The Collections API organizes products into logical groupings, helping Loop maintain structured catalog data for returns and exchanges.- Collection Metadata — Unique collection IDs, external references, and names
- Associated Products — SKUs, names, and external references for grouped items
- Channel Association — Identifies where the collection data originates
| Operation | Method | Description |
|---|---|---|
| List Collections | GET | Retrieve collections with optional filters |
| Create Collection | POST | Create a new collection |
| Upsert Collection | PUT | Create or update by external_id |
| Get Collection | GET | Get details for a single collection |
| Update Collection | PUT | Update an existing collection |
| Delete Collection | DELETE | Delete a collection |
| Add Product | POST | Attach a product to a collection |
| Remove Product | DELETE | Remove a product from a collection |
⚠️ Technical Considerations
When integrating with the Commerce Data APIs, keep these critical implementation details in mind:| Consideration | Requirement |
|---|---|
| Monetary Values | All prices must be in minor units (cents). Example: $10.00 → 1000 |
| Date Formatting | Use ATOM / RFC 3339 format without milliseconds: YYYY-MM-DDTHH:mm:ss+00:00 |
| Order Status | Map external statuses to: active, archived, cancelled, unknown |
| Sync Order | Always sync Products before Orders |
🔄 Common Sync Patterns
Initial Data Sync (Historical Backfill)
When onboarding, you’ll typically sync data in this order:1
Sync Products & Variants
Push your entire product catalog. Store the returned Loop IDs for each product/variant.
2
Sync Customers
Push customer records from your platform. (Note: Customers can also be created via the Orders API.)
3
Sync Orders
Push historical orders, referencing Loop Product IDs in line items.
4
Sync Locations (Exchanges Only)
Create location records for warehouses and fulfillment centers. Required if offering exchanges.
5
Sync Inventory (Exchanges Only)
Push stock levels per variant and location. Required if offering exchanges.
6
Sync Collections (Optional)
Create collections and attach products. Useful for defining advanced exchange rules.
Real-Time Sync
For ongoing operations, set up event-driven syncs to keep Loop updated:- New Orders — Push to Loop when an order is placed
- Product Updates — Sync when products are created, updated, or discontinued
- Inventory Changes — Update stock levels after sales, returns, or restocks
- Order Status Changes — Update fulfillment status, refunds, and cancellations