Pricing
delete_customiser_length_pricing
destructive writeDelete customiser length pricing
Remove a length pricing that nothing prices by any more, after the merchant has agreed to it.
Overview
Deletes one length pricing of a customiser permanently, so the call requires confirm true and changes nothing without it. A price list that a font or the icon settings still price by is refused with resource_in_use, which lists the referencing records; references are never cleared silently. Calling with dry_run true first returns the same verdict without deleting anything. The result carries the price list as it was. It requires the pricing:write scope and an idempotency_key.
Permission
Requires thepricing:writepermission. A connection without it answersinsufficient_scopenaming the permission to approve.
Annotations
Prerequisites
- A customiser id from list_customisers and a length pricing id from list_customiser_length_pricings.
- The merchant explicit agreement, sent as confirm true.
- A merchant has connected this store and approved the pricing:write scope.
Side effects
- Deletes one length pricing and its rows permanently.
- Clears the customiser cached storefront configuration.
- Spends one unit of the store option-write budget.
- Claims the idempotency_key for at least 24 hours.
Arguments
The customiser id, from list_customisers.
The length pricing id, from list_customiser_length_pricings.
Must be true to apply the change, because the price list and its rows are removed permanently and cannot be restored through this connector. Without it the call returns a confirmation_required error and changes nothing.
A client-generated key unique to this logical write, such as a UUID. Required: repeating the call with the same key and the same arguments replays the original result instead of writing twice, and the same key with different arguments is an idempotency_key_conflict.
When true, the deletion is checked against every font and setting that still prices by the list is checked and nothing is written: the result is the same verdict the apply would have reached, and a problem the apply would have raised comes back as the same tool error. Defaults to false. A dry run claims no key. A dry run does not require the confirm argument.
Result
The deleted price list id and the price list as it was, with every row. A dry run returns the delete verdict instead and deletes nothing.
True when the price list was deleted. Absent on a dry run, where nothing is deleted.
The price list as it was when it was deleted, so the caller can report or recreate it. Absent on a dry run.
One of: every_letter_cost, price_by_position
One of: material_length, fixed_letter
The ISO 4217 currency of every integer minor-unit amount on the record.
One of: per_sq_cm, per_kg_volumetric
True when this call replayed a previously recorded response for the same idempotency_key instead of applying the write again.
Present and true only when dry_run was requested.
Present only on a dry run, and always true: a failing dry run returns a tool error instead.
Present only on a dry run: the delete verdict.
Error cases
Send confirm true once the merchant has agreed to the deletion. Nothing was deleted.
The price list lifecycle changed after the recorded deletion. Issue a new key and re-check the resource before writing again.
The connection was approved without pricing:write.
The store option-write budget is spent. Wait retry_after seconds.
A font or the icon settings still price by this list. referenced_by lists them; move them to another price list first.
No length pricing with that id belongs to that customiser in this store.
The text fields are priced from this list, and the list left after the delete would cover no offered size. Add or widen a band on the other list to cover an offered size first.
Delete a price list the merchant confirmed
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "delete_customiser_length_pricing",
"arguments": {
"customiser_id": 42,
"length_pricing_id": 9,
"confirm": true,
"idempotency_key": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f"
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"structuredContent": {
"request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t",
"store": {
"id": 12,
"name": "Demo Signs"
},
"customiser_id": 42,
"length_pricing_id": 9,
"deleted": true,
"length_pricing": {
"id": 9,
"customiser_id": 42,
"name": "Standard",
"letter_pricing_mode": "every_letter_cost",
"letter_pricing_method": "fixed_letter",
"shipping": {
"calculation": "physical",
"volumetric_divisor": null,
"add_weight_to_product": false
},
"currency": "USD",
"rows": [],
"created_at": "2026-08-13T00:00:00Z",
"updated_at": "2026-08-13T00:00:00Z"
},
"idempotent_replay": false
}
}
}A price list a font still uses (error)
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "delete_customiser_length_pricing",
"arguments": {
"customiser_id": 42,
"length_pricing_id": 9,
"dry_run": true
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"isError": true,
"structuredContent": {
"error": {
"code": "resource_in_use",
"title": "Resource in use",
"detail": "This length pricing is still referenced by font records.",
"recovery": "Other records still reference this one. Call the same tool with dry_run: true to enumerate them, clear those references, then retry.",
"referenced_by": [
{
"type": "font",
"id": 19,
"name": "Modern Sans"
}
]
}
}
}
}