Product Rules API
Product Rules allow you to enrich or override data for products that are imported from external sources (like supplier feeds). By using rules, your manual optimizations are preserved and will not be overwritten by future source synchronizations.
Create or Update a Product Rule
Use this endpoint to create a new rule or update an existing one for a specific product and field.
Endpoint
POST /api/portal/products/save-rule
Authentication
This endpoint requires Authentication via an API Key.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
product | string (UUID) | Yes | The unique identifier of the product in StoreLinkr. |
source | string | Yes | The import source code (e.g., your supplier's internal name). |
field | string | Yes | The field name to override (e.g., name, brand, model, short_description, long_description, sku, category). |
value | string | Yes | The new enriched value for the field. |
Example Request
curl -X POST https://portal.storelinkr.com/api/portal/products/save-rule \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product": "550e8400-e29b-41d4-a716-446655440000",
"source": "my-supplier-code",
"field": "name",
"value": "Optimized Product Title for SEO"
}'
Response
{
"status": "success",
"message": "Product rule saved successfully"
}
Deleting a Product Rule
To remove an enrichment rule and revert to the original imported value, use the delete endpoint.
Endpoint
DELETE /api/portal/products/rules/{rule_uuid}
| Parameter | Type | Description |
|---|---|---|
{rule_uuid} | string (UUID) | The unique identifier of the rule to delete. |
Example Request
curl -X DELETE https://portal.storelinkr.com/api/portal/products/rules/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_API_KEY"
Best Practices for API Enrichment
- ID Persistence: Always use the StoreLinkr
product_uuidas the reference for rules. - Field Consistency: Ensure the
fieldname matches the internal StoreLinkr schema. - Bulk Processing: If you are enriching thousands of products, consider staggering your API calls to avoid rate limits.