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

# Actualizar niveles de reorden (upsert)

> Inserta o actualiza niveles de reorden en masa. Los niveles existentes para las combinaciones item/establecimiento/proveedor se reemplazan.

<ParamField header="x-api-key" type="string" required>
  API key de BOH con scope `procurement:write`.
</ParamField>

<ParamField path="vendorId" type="string" required>UUID del vendor.</ParamField>

<ParamField body="par_levels" type="object[]" required>
  <Expandable title="campos del nivel de reorden">
    <ParamField body="item_id" type="string">UUID del artículo (se requiere `item_id` o `external_item_id`).</ParamField>
    <ParamField body="external_item_id" type="string">ID externo del artículo.</ParamField>
    <ParamField body="store_id" type="string">UUID del establecimiento (se requiere `store_id` o `external_store_id`).</ParamField>
    <ParamField body="external_store_id" type="string">ID externo del establecimiento.</ParamField>
    <ParamField body="supplier_id" type="string">UUID del proveedor preferido.</ParamField>
    <ParamField body="external_supplier_id" type="string">ID externo del proveedor.</ParamField>
    <ParamField body="par_quantity" type="number" required>Cantidad objetivo de stock.</ParamField>
    <ParamField body="unit_id" type="string" required>UUID de la unidad.</ParamField>
    <ParamField body="reorder_point" type="number">Cantidad mínima antes de reordenar.</ParamField>
  </Expandable>
</ParamField>

<RequestExample>
  ```json theme={null}
  {
    "par_levels": [
      {
        "external_item_id": "tomate-bola",
        "external_store_id": "tienda-principal",
        "external_supplier_id": "proveedor-fresco",
        "par_quantity": 20,
        "unit_id": "unit_kg_01...",
        "reorder_point": 5
      }
    ]
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "synced": 1
  }
  ```
</ResponseExample>
