# API Scenarios

This page organizes common API integration paths by business goal. If you already know which endpoint to call, go back to [API Overview](https://cli.im/open-api/en/openapi/v2/overview.md) for the API index.

## Scenario list

### Read scenarios

- [Query forms and records linked to a QR code](https://cli.im/open-api/en/openapi/v2/scenarios/query-qrcode-records.md): start from QR code and obtain `code_id`, `tpl_id`, then read form structure and record list.

### Write scenarios

- [Submit a record to a form under a QR code](https://cli.im/open-api/en/openapi/v2/scenarios/add-record-by-qrcode.md): locate target QR code and form, then build `fields[]` with structured IDs.
- [Bulk add records from Excel](https://cli.im/open-api/en/openapi/v2/scenarios/bulk-import-records.md): parse Excel locally and call `addRecord` row by row.

### Management scenarios

These three need a [personal API key](https://cli.im/open-api/en/openapi/v2/auth.md#create-key). Organization keys cannot call them.

- [Create codes in bulk from a template](https://cli.im/open-api/en/openapi/v2/scenarios/batch-create-qrcodes.md): read the template fields, upload files, prevalidate, submit the task, then read back each code's ID and link.
- [Edit and delete codes and forms](https://cli.im/open-api/en/openapi/v2/scenarios/edit-and-delete.md): read the version before editing; preview and confirm with a token before deleting.
- [Export printable labels](https://cli.im/open-api/en/openapi/v2/scenarios/export-labels.md): preview and export a PDF or image package in the code's current label style.

## Reading tips

- Unsure about authentication: read [Authentication](https://cli.im/open-api/en/openapi/v2/auth.md)
- Need field details, schema, or full examples: jump from scenario pages to corresponding API pages
- Want every endpoint and the permission it needs: see the [API list](https://cli.im/open-api/en/openapi/v2/api-index.md)
- Need code generation or tool import: use `https://open.cli.im/openapi.json`
