---
title: "Configurar excepción de precio"
description: "Crea o actualiza una regla de precio para cliente o sucursal."
language: es-MX
canonical_url: "https://exac.mx/docs/mcp/tools/set_price_override"
md_url: "https://exac.mx/docs/mcp/tools/set_price_override.md"
---

# Configurar excepción de precio

Crea o actualiza una regla de precio para cliente o sucursal.

Herramienta: `set_price_override`

## Propósito

Crea o actualiza una regla de precio para cliente o sucursal.

### Úsala cuando

Debe cambiar un precio específico de cliente o sucursal.

### No la uses cuando

Necesitas cambiar el precio base del producto.

| Detalle | Valor |
| --- | --- |
| Permisos | receiptPrices:manage |
| Efectos secundarios | Modifica datos |
| Idempotencia | Idempotente |

## Esquema de entrada

```json
{
  "type": "object",
  "properties": {
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Unique retry key for this exact operation. Reuse it only when retrying the same request."
    },
    "input": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "const": "customer"
            },
            "customerId": {
              "type": "string"
            },
            "productId": {
              "type": "string"
            },
            "price": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "scope",
            "customerId",
            "productId",
            "price"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "const": "location"
            },
            "locationId": {
              "type": "string"
            },
            "productId": {
              "type": "string"
            },
            "price": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "scope",
            "locationId",
            "productId",
            "price"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "idempotencyKey",
    "input"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false
}
```

## Esquema de salida

```json
{
  "type": "object",
  "properties": {
    "data": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "const": "customer"
            },
            "customerId": {
              "type": "string"
            },
            "productId": {
              "$ref": "#/definitions/__schema0"
            },
            "overridePrice": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "removed": {
              "type": "boolean"
            }
          },
          "required": [
            "scope",
            "customerId",
            "productId",
            "overridePrice",
            "removed"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "scope": {
              "type": "string",
              "const": "location"
            },
            "locationId": {
              "type": "string"
            },
            "productId": {
              "$ref": "#/definitions/__schema0"
            },
            "overridePrice": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "removed": {
              "type": "boolean"
            }
          },
          "required": [
            "scope",
            "locationId",
            "productId",
            "overridePrice",
            "removed"
          ],
          "additionalProperties": false
        }
      ]
    },
    "error": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "validation_error",
            "unauthenticated",
            "forbidden",
            "not_found",
            "method_not_allowed",
            "conflict",
            "idempotency_conflict",
            "operation_in_progress",
            "recovery_required",
            "rate_limited",
            "provider_unavailable",
            "internal"
          ]
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        }
                      ]
                    }
                  },
                  "message": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ],
                "additionalProperties": false
              }
            },
            "retryable": {
              "type": "boolean"
            },
            "retryAfterSeconds": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": false
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "definitions": {
    "__schema0": {
      "type": "string",
      "minLength": 1
    }
  },
  "oneOf": [
    {
      "required": [
        "data"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
```

## Herramientas relacionadas

- [`get_price_overrides`](/docs/mcp/tools/get_price_overrides.md) — **Leer excepciones de precio**: Consulta precios configurados por cliente o sucursal.

- [`get_products`](/docs/mcp/tools/get_products.md) — **Leer productos**: Busca productos, consulta un producto, sus proveedores vinculados o las clasificaciones requeridas para guardar productos.

## Flujo relacionado

[Consulta los flujos canónicos en la introducción](/docs.md)

## Operaciones REST equivalentes

- [`PUT /v1/pricing/customers/{customerId}/products/{productId}`](/docs/api/catalog/pricing/set-customer-price.md)

- [`DELETE /v1/pricing/customers/{customerId}/products/{productId}`](/docs/api/catalog/pricing/delete-customer-price.md)

- [`PUT /v1/pricing/locations/{locationId}/products/{productId}`](/docs/api/catalog/pricing/set-location-price.md)

- [`DELETE /v1/pricing/locations/{locationId}/products/{productId}`](/docs/api/catalog/pricing/delete-location-price.md)

Documentación completa: https://exac.mx/docs.md
Índice para agentes: https://exac.mx/docs/llms.txt
