# Inventory Data

The Inventory APIs allow external systems to create, update, and delete inventory records in Claret. These APIs support complete inventory management workflows including data synchronization and refresh operations.

As with all Claret API endpoints, the Inventory APIs require token authentication. For instructions on how to retrieve and pass through the authentication token, please refer to the [Authentication](https://docs.claret.app/apis/authentication) documentation.

{% hint style="info" %}
All API documentation herein contains a `{tenant}` section of the URL path. These should always be replaced with the name of the actual tenant making the API call (i.e., `demo`, `yourcompany`, etc.)
{% endhint %}

## Available Endpoints

| Endpoint                                                                                  | Method | Description                                                  |
| ----------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------ |
| [Inventory Import](https://docs.claret.app/apis/public-apis/inventory/import)             | POST   | Import inventory records via JSON payload or CSV file upload |
| [Inventory Batch Delete](https://docs.claret.app/apis/public-apis/inventory/batch-delete) | POST   | Delete inventory records by row targeting or filter criteria |

## Common Workflows

### Full Inventory Refresh

For systems that need to replace all inventory data periodically:

1. Use the [Inventory Batch Delete](https://docs.claret.app/apis/public-apis/inventory/batch-delete) API to remove existing records
2. Use the [Inventory Import](https://docs.claret.app/apis/public-apis/inventory/import) API to load fresh data

### Incremental Updates

For systems that sync changes incrementally:

1. Use the [Inventory Import](https://docs.claret.app/apis/public-apis/inventory/import) API with `allow_record_update: true` to upsert records
2. Use the [Inventory Batch Delete](https://docs.claret.app/apis/public-apis/inventory/batch-delete) API to remove specific records that no longer exist in the source system
