# Upload Transaction Batch File

<mark style="color:green;">`POST`</mark> `https://{base_url}/v2/merchant/{merchantId}/transactionBatch`

The **Request Body** must include a file named`transactionsFile`, which contains a batch of transaction details. The file should be in JSON format, with each entry representing a single transaction.

This endpoint is used to upload and validate a batch of transactions for a specified merchant. It performs general validation and mandatory field checks on the transaction data. If all validations pass, a success message is returned. Otherwise, detailed error messages are provided for any validation failures.

### **Headers**

| Name          | Value                 |
| ------------- | --------------------- |
| Content-Type  | `multipart/form-data` |
| Authorization | `Bearer <token>`      |

### Path Parameters

| Name         | Description                                   |
| ------------ | --------------------------------------------- |
| `merchantId` | Merchant Id for transaction batch file upload |

### **Body**

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th width="227">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>transactionsFile</code></td><td>File</td><td>True</td><td>A file that contains transactions</td></tr></tbody></table>

**NOTE: The JSON file data structure inside will be the same as Upload Transaction Batch**

## Upload Transaction Batch File

> Upload a file containing a batch of merchant transactions

```json
{"openapi":"3.0.1","info":{"title":"TxFind API's Version 2 Endpoints","version":"2.0.0"},"tags":[{"name":"Merchant","description":"Call related to merchant transaction."}],"servers":[{"url":"https://{baseUrl}","description":"Current server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/api/v2/merchant/{merchantId}/transactionBatch":{"post":{"tags":["Merchant"],"summary":"Upload Transaction Batch File","description":"Upload a file containing a batch of merchant transactions","operationId":"merchantTransactionBatchFileUpload","parameters":[{"name":"merchantId","in":"path","description":"Merchant Id for transaction batch file upload","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"transactionsFile":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["success","error"]},"msg":{"type":"string"}}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"},"error":{"type":"string"}}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payshield.ai/txfind-payreveal-order-insight-ican/merchant/upload-transaction-batch-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
