This guide explains how to use the debug endpoint to inspect and manage hashes and mappings in the Bluestone PIM to Adobe Commerce integration. The debug endpoint provides tools to understand the internal state of the integration and troubleshoot synchronization issues.
The debug endpoint (/api/v1/web/debug-internal/consumer) allows you to:
- Inspect Mappings: View the persistent mappings between Bluestone and Adobe Commerce entities
- Inspect Hashes: View the temporary hash values used for change detection
- Remove Data: Clear mappings or hashes for troubleshooting
- Save Mappings: Manually create or update entity mappings
All debug requests require Adobe authentication. Include your authentication headers when making requests to the debug endpoint.
Retrieve persistent mappings between Bluestone and Adobe Commerce entities.
curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "get-category-mappings"
}
}'Response:
{
"status": "success",
"message": "category-mappings",
"data": [
{
"bluestoneId": "category-123",
"commerceId": 15,
"commerceCode": "default",
"data": []
},
{
"bluestoneId": "category-456",
"commerceId": 16,
"commerceCode": "german_store_view",
"data": []
}
]
}curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "get-product-mappings"
}
}'curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "get-attribute-mappings"
}
}'curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "get-asset-mappings"
}
}'Retrieve temporary hash values used for change detection. Hashes are stored in the temporary state and are used to determine if an entity has changed since the last synchronization.
curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "get-product-hashes"
}
}'Response:
{
"status": "success",
"message": "product-hashes",
"data": [
["hash-product-123", "a1b2c3d4e5f6g7h8i9j0"],
["hash-product-456", "b2c3d4e5f6g7h8i9j0k1"]
]
}curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "get-category-hashes"
}
}'curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "get-attribute-hashes"
}
}'Clear mappings or hashes for troubleshooting purposes. This is useful when you need to force re-synchronization of entities.
curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "remove-product-hashes"
}
}'Response:
{
"status": "success",
"message": "product-hashes",
"data": {
"message": "Hashes removed"
}
}curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "remove-category-hashes"
}
}'curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "remove-attribute-hashes"
}
}'Remove persistent mappings for specific entity types:
# Remove product mappings
curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "remove-product-mappings"
}
}'
# Remove category mappings
curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "remove-category-mappings"
}
}'
# Remove attribute mappings
curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "remove-attribute-mappings"
}
}'
# Remove asset mappings
curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "remove-asset-mappings"
}
}'Manually create or update entity mappings. This is useful for testing or fixing mapping issues.
curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "save-product-mappings",
"mappings": [
{
"bluestoneId": "product-123",
"commerceId": 25,
"commerceCode": "default",
"data": []
},
{
"bluestoneId": "product-456",
"commerceId": 26,
"commerceCode": "german_store_view",
"data": []
}
]
}
}'curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "save-category-mappings",
"mappings": [
{
"bluestoneId": "category-123",
"commerceId": 15,
"commerceCode": "default",
"data": []
}
]
}
}'curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "save-attribute-mappings",
"mappings": [
{
"bluestoneId": "attribute-123",
"commerceId": 35,
"commerceCode": "default",
"data": []
}
]
}
}'curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "save-asset-mappings",
"mappings": [
{
"bluestoneId": "asset-123",
"commerceId": 45,
"commerceCode": "default",
"data": []
}
]
}
}'Each mapping contains:
bluestoneId: The unique identifier from Bluestone PIMcommerceId: The corresponding Adobe Commerce entity IDcommerceCode: The Adobe Commerce store view code (optional)data: Additional metadata stored with the mapping (optional)
Hashes are stored as key-value pairs where:
- Key: Format
hash-{entityType}-{entityId}(e.g.,hash-product-123) - Value: MD5 hash of the entity data used for change detection
If an entity is not updating properly, you can force re-synchronization by removing its hash:
# Remove product hashes to force re-sync
curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "remove-product-hashes"
}
}'If mappings are incorrect, you can remove and recreate them:
# Remove existing mappings
curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "remove-product-mappings"
}
}'
# Then trigger a full sync to recreate mappings
curl -X POST "https://your-app-builder-endpoint/api/v1/web/full-sync/trigger" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"entityType": "product",
"context": "default"
}
}'Check if entities are properly mapped and hashed:
# Check product mappings
curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "get-product-mappings"
}
}'
# Check product hashes
curl -X POST "https://your-app-builder-endpoint/api/v1/web/debug-internal/consumer" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"data": {
"type": "get-product-hashes"
}
}'The debug endpoint returns appropriate error responses:
- 400 Bad Request: Invalid request type or missing required parameters
- 500 Internal Server Error: Server-side errors during processing
Example error response:
{
"status": "error",
"message": "Invalid type",
"code": 400
}- Backup Before Removal: Always check existing mappings before removing them
- Test in Development: Use debug operations in development environment first
- Monitor Logs: Check App Builder runtime logs for additional debugging information
- Use Specific Operations: Target specific entity types rather than removing all data
- Verify Changes: Always verify the results of debug operations
The debug endpoint works well with the Full Sync Operations feature:
- Use debug to inspect current state
- Remove problematic hashes or mappings
- Use full sync to recreate data
- Verify results with debug operations
This combination provides a powerful toolkit for troubleshooting synchronization issues in the Bluestone integration.