Update a custom KPI (limited fields)
PATCH
https://core.shopimind.com/v1/custom-stats/kpis/{id}
Updates name, description, chart_types, filters. Aggregation/source/relations are immutable — duplicate the KPI to change those.
Parameters
Header Parameters
spm-api-key*
[Authentication] Required API key.
Type
Requiredstring
Pattern
"^[a-zA-Z0-9-]{20,64}$"Path Parameters
id*
Type
Requiredstring
Request Body
application/json
JSON "name": { }, "description": { }, "measures": [ { "id_measure": "string", "type": "string", "field": "t.amount", "label": { }, "format": "number", "suffix": "string", "position": 0 } ], "dimensions": [ { "id_dimension": "string", "field": "t.status", "label": { }, "position": 0 } ], "filters": [ { "field": "t.amount", "operator": "string", "value": { } } ]
{
}
Responses
application/json
JSON "id_custom_kpi": "string", "id_shop": 0, "name": { }, "description": { }, "measures": [ { "id_measure": "string", "type": "string", "field": "string", "label": { }, "chart_types": [ [ ] ], "position": 0 } ], "source_type": "string", "source_schema_name": "string", "source_table_name": "string", "relations_chain": [ [ ] ], "dimension_field": "string", "secondary_dimension_field": "string", "time_field": "string", "filters": { }, "status": "string", "last_event_run_at": "string", "last_error": "string", "lookback_max_months": 0, "created_at": "string", "updated_at": "string"
{
}
Update a custom KPI (limited fields) Updates name, description, chart_types, filters. Aggregation/source/relations are immutable — duplicate the KPI to change those. PATCH /v1/custom-stats/kpis/{id} CustomKpiController_update Custom KPIs spm-api-key [Authentication] Required API key. id Client error - Invalid request or authentication issues Server error - Internal processing failure