> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simplepay.mx/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a tenant product

> Referencia detallada para PATCH /v1/products/{id}.

## Uso

Usalo para administrar productos del tenant, ofertas, disponibilidad o inventario empresarial asociado al catalogo SimplePay.

## Antes de llamar

| Tema             | Detalle                                                                                |
| ---------------- | -------------------------------------------------------------------------------------- |
| Metodo           | `PATCH`                                                                                |
| Ruta             | `/v1/products/{id}`                                                                    |
| Auth             | Bearer API key del ambiente correcto.                                                  |
| Scope            | `products:write`                                                                       |
| Idempotencia     | Recomendada para cualquier retry. Usa una key deterministica por operacion de negocio. |
| Guia relacionada | [API Reference overview](/api-reference/overview)                                      |

## Patron recomendado

* Ejecuta este endpoint desde backend o job seguro, nunca desde frontend con API keys.
* Manda `Idempotency-Key` cuando el endpoint cree, convierta, reprograme, cancele, capture o reembolse estado.
* Consulta el bloque OpenAPI de esta pagina para el shape exacto de parametros, body y respuestas.

## Ejemplo minimo

```bash terminal theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -sS -X PATCH "https://api.simplepay.mx/v1/products/id_123" \
  -H "Authorization: Bearer $SIMPLEPAY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: update-product_v1" \
  -d '{ ... }'
```

## Errores a manejar

* `400` indica payload, parametros o estado invalido.
* `401` o `403` indican API key, ambiente o scopes incorrectos.
* `409` suele indicar conflicto de estado, duplicado o idempotencia incompatible.
* `404` significa que el recurso no existe para ese tenant o ambiente.
* `429` y `5xx` se pueden reintentar con backoff; en writes conserva la misma idempotency key.

## Contrato OpenAPI

El playground, parametros, body y respuestas de abajo salen de `/openapi.json`. Si el contrato cambia, actualiza la spec y regenera esta pagina.


## OpenAPI

````yaml openapi.json PATCH /v1/products/{id}
openapi: 3.1.0
info:
  title: SimplePay API
  version: '2026-06-13'
servers:
  - url: https://api.simplepay.mx
security:
  - SimplePayApiKey: []
paths:
  /v1/products/{id}:
    patch:
      summary: Update a tenant product
      operationId: updateProduct
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
          schema:
            type: string
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductUpsert'
      responses:
        '200':
          description: Tenant product updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
        minLength: 8
        maxLength: 255
  schemas:
    ProductUpsert:
      type: object
      properties:
        active:
          type: boolean
        booking:
          $ref: '#/components/schemas/ProductBookingConfig'
        description:
          type: string
        metadata:
          type: object
          additionalProperties: true
        name:
          type: string
          minLength: 1
        price:
          $ref: '#/components/schemas/ProductPrice'
        product_type:
          enum:
            - appointment
            - class
            - scheduled_offer
            - experience
            - rental
            - service
            - standard
            - date_range
    Product:
      type: object
      properties:
        active:
          type: boolean
        booking:
          type: object
          properties:
            bufferAfterMinutes:
              type: integer
              minimum: 0
            bufferBeforeMinutes:
              type: integer
              minimum: 0
            capacity:
              type: integer
              minimum: 1
            config:
              type: object
              additionalProperties: true
            durationMinutes:
              type: integer
              minimum: 1
            enabled:
              type: boolean
            paymentRequired:
              type: boolean
            slotIntervalMinutes:
              type: integer
              minimum: 1
            timeZone:
              type: string
        defaultPrice:
          type: object
          properties:
            amount:
              type: integer
              minimum: 0
            currency:
              type: string
              pattern: ^[a-z]{3}$
            id:
              type: string
              format: uuid
        description:
          type: string
        id:
          type: string
          format: uuid
        metadata:
          type: object
          additionalProperties: true
        name:
          type: string
        object:
          const: product
        productType:
          enum:
            - appointment
            - bundle
            - class
            - scheduled_offer
            - experience
            - package
            - rental
            - service
            - standard
            - date_range
        updatedAt:
          type: string
          format: date-time
    ProductBookingConfig:
      type: object
      properties:
        buffer_after_minutes:
          type: integer
          minimum: 0
        buffer_before_minutes:
          type: integer
          minimum: 0
        capacity:
          type: integer
          minimum: 1
        config:
          type: object
          additionalProperties: true
        duration_minutes:
          type: integer
          minimum: 1
        enabled:
          type: boolean
        payment_required:
          type: boolean
        slot_interval_minutes:
          type: integer
          minimum: 1
        time_zone:
          type: string
    ProductPrice:
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          type: integer
          minimum: 1
        currency:
          type: string
          pattern: ^[a-z]{3}$
  securitySchemes:
    SimplePayApiKey:
      type: http
      scheme: bearer

````