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

# sicarv4.purchase_orders.create

> Create SICAR supplier purchase order (pedido). Registry write only — not custom.query.

# `sicarv4.purchase_orders.create`

Create SICAR supplier purchase order (pedido). Registry write only — not custom.query.

|                |            |
| -------------- | ---------- |
| **Adapter**    | `sicarv4`  |
| **Operation**  | `db.query` |
| **SQL policy** | `write`    |

## Parameters

| Name       | Kind   | Required | Notes                                                                                |
| ---------- | ------ | -------- | ------------------------------------------------------------------------------------ |
| `document` | `json` | Yes      | Required: pro\_id, usu\_id, lines\[]. Optional: comentario (IDs validated on device) |

## Example

```bash theme={"system"}
curl -s -X POST "$API/v1/devices/$DEVICE_ID/functions/sicarv4.purchase_orders.create" \
  -H "Authorization: Bearer $ORQUESTR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"document":{"pro_id":1,"usu_id":1,"lines":[{"art_id":10,"cantidad":5}]}}}'
```
