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

> Create SICAR sale (TICKET|NOTA|REMISION): folio + venta + lines + taxes + cash + stock. Registry write only — not custom.query.

# `sicarv4.sales.create`

Create SICAR sale (TICKET|NOTA|REMISION): folio + venta + lines + taxes + cash + stock. Registry write only — not custom.query.

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

## Parameters

| Name       | Kind   | Required | Notes                                                                                                                                                        |
| ---------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `document` | `json` | Yes      | Required: doc\_type (TICKET\|NOTA\|REMISION), cli\_id, tpa\_id, lines\[]. Optional: comentario, caj\_id, mon\_id, usu\_id, vnd\_id (IDs validated on device) |

## Example

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