Integration Examples
Real-world integration scenarios and complete code examples
Base URL
https://gateway.regentherapy.com/api/v1Authentication
X-API-Key: rg_your_api_keyContent Type
application/jsonScenario:
Acme Corp is a private label partner. They use SKU format "ACME-PROD-XXX" for their products. They need to submit orders where they reference their own SKU, but we need to map it to our platform products.
1. Get API Key
Acme gets API key: rg_acme_key_abc123
Scenario:
Global Distributors has different pricing based on order volume. They send the same product IDs but prices vary by tier. The system needs to validate pricing against configured tier levels.
Validate order pricing before submission:
POST /orders/validate{
"items": [
{
"externalSku": "DIST-PRO-100",
"quantity": 100,
"price": 15.00
}
]
}
Response:
{
"valid": true,
"warnings": [],
"pricing": {
"tier": "BULK",
"validPrice": 15.00,
"basePricePerUnit": 16.00,
"discount": "6%"
}
}Scenario:
Fashion Brand sells on Shopify, Amazon, and their own site. They need to map Shopify product variants to platform products and track orders across channels.
Map Shopify variant to platform product:
POST /mappings/customer-external{
"channel": "shopify",
"externalProductId": "shopify_var_123456",
"externalCustomerId": "shopify_cust_789",
"platformProductId": "prod_fashion_001",
"platformCustomerId": "cust_internal_001"
}Invalid SKU
400 Bad Request - SKU not found in mappingsAlways validate SKU mappings exist before submitting orders.
Pricing Mismatch
422 Unprocessable - Price outside tier rangeUse /orders/validate endpoint before submission to catch pricing issues.
Rate Limited
429 Too Many Requests - Wait before retryImplement exponential backoff. Check X-RateLimit-Remaining header.