# Batch upsert transactions `BatchUpsertTransactions` `POST /api/transactionportfolios/{scope}/{code}/transactions/$batchUpsert` - [OpenAPI fragment](https://www.lusid.com/docs/api/lusid/endpoints/transaction-portfolios/BatchUpsertTransactions.json) - [Rendered page](https://www.lusid.com/docs/api/lusid/endpoints/transaction-portfolios/BatchUpsertTransactions) Create or update transactions in the transaction portfolio. A transaction will be updated if it already exists and created if it does not. Each request must be keyed by a unique correlation id. This id is ephemeral and is not stored by LUSID. It serves only as a way to easily identify each transaction in the response. Note: If using partial failure modes, then it is important to check the response body for failures as any failures will still return a 200 status code ## Referenced schemas - [TransactionRequest](https://www.lusid.com/docs/api/lusid/schemas/TransactionRequest.txt) - [BatchUpsertPortfolioTransactionsResponse](https://www.lusid.com/docs/api/lusid/schemas/BatchUpsertPortfolioTransactionsResponse.txt) [< Transaction Portfolios](https://www.lusid.com/docs/api/lusid/endpoints/transaction-portfolios/llms.txt)