> ## 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 booking resource

> Referencia detallada para PATCH /v1/bookable-payments/resources/{id}.

## Uso

Usalo dentro de Bookable Payments para modelar inventario reservado, calcular disponibilidad, crear holds, convertirlos en checkout y confirmar bookings.

## Antes de llamar

| Tema             | Detalle                                                                                |
| ---------------- | -------------------------------------------------------------------------------------- |
| Metodo           | `PATCH`                                                                                |
| Ruta             | `/v1/bookable-payments/resources/{id}`                                                 |
| Auth             | Bearer API key del ambiente correcto.                                                  |
| Scope            | `availability:write`                                                                   |
| Idempotencia     | Recomendada para cualquier retry. Usa una key deterministica por operacion de negocio. |
| Guia relacionada | [Bookable Payments](/bookable-payments/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.
* Confirma inventario final con `booking.confirmed` o una lectura de booking, no solo con una URL de retorno.
* 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/bookable-payments/resources/id_123" \
  -H "Authorization: Bearer $SIMPLEPAY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: update-booking-resource_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/bookable-payments/resources/{id}
openapi: 3.1.0
info:
  title: SimplePay API
  version: '2026-06-13'
servers:
  - url: https://api.simplepay.mx
security:
  - SimplePayApiKey: []
paths:
  /v1/bookable-payments/resources/{id}:
    patch:
      summary: Update a booking resource
      operationId: updateBookingResource
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BookingResourceUpdate'
      responses:
        '200':
          description: Booking resource updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BookingResource'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
        minLength: 8
        maxLength: 255
  schemas:
    BookingResourceUpdate:
      type: object
      properties:
        active:
          type: boolean
        capacity:
          type: integer
          minimum: 1
        external_ref:
          type:
            - string
            - 'null'
        kind:
          enum:
            - amenity
            - equipment
            - inventory_pool
            - space
            - staff
            - unit
            - vehicle
        location:
          type: object
          additionalProperties: true
        metadata:
          type: object
          additionalProperties: true
        name:
          type: string
          minLength: 1
        parent_resource_id:
          type:
            - string
            - 'null'
          format: uuid
        time_zone:
          type: string
      additionalProperties: true
    BookingResource:
      type: object
      properties:
        active:
          type: boolean
        capacity:
          type: integer
          minimum: 1
        externalRef:
          type: string
        id:
          type: string
          format: uuid
        kind:
          enum:
            - amenity
            - equipment
            - inventory_pool
            - space
            - staff
            - unit
            - vehicle
        location:
          type: object
          additionalProperties: true
        metadata:
          type: object
          additionalProperties: true
        name:
          type: string
        object:
          const: booking_resource
        parentResourceId:
          type: string
          format: uuid
        timeZone:
          type: string
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    SimplePayApiKey:
      type: http
      scheme: bearer

````