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

# Update Product

Updates an existing product or service. All fields are optional — only the fields you send will be updated.

## Authentication

Requires a valid Bearer token. The authenticated user must be an **owner** or **admin** of the organization.

## Path Parameters

| Parameter        | Type          | Required | Description     |
| ---------------- | ------------- | -------- | --------------- |
| `organizationId` | string (UUID) | Yes      | Organization ID |
| `productId`      | string (UUID) | Yes      | Product ID      |

## Request Body

All fields are optional.

| Field         | Type    | Description                                        |
| ------------- | ------- | -------------------------------------------------- |
| `description` | string  | Product or service description                     |
| `productKey`  | integer | SAT product/service key                            |
| `price`       | number  | Unit price                                         |
| `taxIncluded` | boolean | Whether taxes are included in the price            |
| `taxability`  | string  | SAT taxability code                                |
| `taxes`       | array   | List of applicable taxes (replaces existing)       |
| `localTaxes`  | array   | List of applicable local taxes (replaces existing) |
| `unitKey`     | string  | SAT unit of measure key                            |
| `unitName`    | string  | Unit of measure name                               |
| `sku`         | string  | Internal product SKU                               |
| `livemode`    | boolean | Whether this is a live mode product                |

## Example Request

```bash theme={null}
curl -X PUT http://localhost:3001/api/organizations/550e8400-e29b-41d4-a716-446655440000/products/590ce6c56d04f840aa8438af \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "price": 400.0,
    "sku": "UKL-002"
  }'
```

## Example Response

```json theme={null}
{
  "id": "590ce6c56d04f840aa8438af",
  "organizationId": "550e8400-e29b-41d4-a716-446655440000",
  "livemode": true,
  "description": "Ukelele",
  "productKey": 60131324,
  "price": 400.0,
  "taxIncluded": true,
  "taxability": "01",
  "taxes": [{ "type": "IVA", "rate": 0.16 }],
  "localTaxes": [],
  "unitKey": "H87",
  "unitName": "Elemento",
  "sku": "UKL-002",
  "createdAt": "2025-01-26T10:00:00Z",
  "updatedAt": "2025-01-26T11:00:00Z"
}
```

## Common Errors

### 404 Not Found

Product does not exist or does not belong to the organization.

### 409 Conflict

A product with the new SKU already exists in this organization.
