> ## 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.

# Cerrar orden de compra

> Cierra la orden marcándola como CLOSED. Úsalo cuando hayas recibido todos los artículos o quieras finalizar la orden independientemente del estado de cumplimiento.

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

<ParamField path="vendorId" type="string" required>UUID del vendor.</ParamField>
<ParamField path="orderId" type="string" required>UUID de la orden de compra.</ParamField>
<ParamField body="external_user_id" type="string" required>Actor que cierra la orden.</ParamField>

<RequestExample>
  ```json theme={null}
  { "external_user_id": "compras_01" }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "purchase_order": {
      "id": "po_01...",
      "status": "CLOSED"
    }
  }
  ```
</ResponseExample>
