> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ebrc.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk Upload via Excel

> Upload a filled Excel file to generate eBRCs in bulk. Each row is validated before anything is filed, and errors come back per row with field and message.

Upload an Excel file (`.xlsx` or `.xls`, max **5 MB**) to generate eBRCs in bulk. Column headers are matched to the required fields by name and the rows are submitted to DGFT in a single request. Validation errors come back per row, so you know exactly which line to fix. Limited to **5 calls per minute**.

Download the starting file from [Download Bulk Upload Template](/api-reference/genebrc/bulk-upload-template), or [pre-filled with real IRM data](/api-reference/irm/bulk-template). Extracting rows from shipping bill PDFs first? See [Shipping Bill extraction](/api-reference/extraction/shipping-bills).

### Request example

```bash theme={"dark"}
curl -X POST "https://ebrcapi.eximfiles.io/api/v1/genebrc/bulk-upload?uploadType=1&decalarationFlag=Y&platformCustomerId=ee849a90-7a28-49b4-8cb2-8e31041650a2" \
  -H "x-api-key: <YOUR_API_KEY>" \
  -F "file=@/path/to/ebrc-data.xlsx"
```

Query parameters:

| Parameter            | Required | Values                                          |
| -------------------- | -------- | ----------------------------------------------- |
| `platformCustomerId` | Yes      | Platform customer UUID                          |
| `uploadType`         | Yes      | `1`, `2`, `3`, or `4`                           |
| `decalarationFlag`   | Yes      | `Y` or `N` (spelling as per DGFT specification) |

### Response

Alongside the DGFT acknowledgement, the response echoes back every IRM that was parsed and submitted:

* `parsedRowCount`: how many rows were read from the file
* `irmNumbers`: flat list of the submitted IRM numbers, in file order
* `irms`: the same rows with `serialNo`, `irmDt`, `irmAdCode`, `irmIfscCode`, and `sbCumInvoiceNumber`

Use `irms` rather than `irmNumbers` when reconciling, since an IRM number is not unique on its own: the same number can recur under a different AD code or date.

```json theme={"dark"}
{
  "success": true,
  "data": {
    "dgftAckId": "ACK202404010001",
    "requestId": "IEC1234560120240001ABCDE12345",
    "ackStatus": "Validated",
    "recordResCount": 2,
    "errorDetails": [],
    "parsedRowCount": 2,
    "irmNumbers": ["IRM0000012345", "IRM0000012346"],
    "irms": [
      {
        "serialNo": 1,
        "irmNumber": "IRM0000012345",
        "irmDt": "2024-01-10",
        "irmAdCode": "6390005",
        "irmIfscCode": "HDFC0000123",
        "sbCumInvoiceNumber": "INV-2024-001"
      },
      {
        "serialNo": 2,
        "irmNumber": "IRM0000012346",
        "irmDt": "2024-01-11",
        "irmAdCode": "6390005",
        "irmIfscCode": "HDFC0000123",
        "sbCumInvoiceNumber": "INV-2024-002"
      }
    ]
  },
  "statusCode": 200,
  "timestamp": "2026-07-22T13:00:00.000Z"
}
```

### Row-level validation errors

If the file fails validation, the API returns `400` with one entry per failing cell:

```json theme={"dark"}
{
  "statusCode": 400,
  "message": "Excel validation failed",
  "errors": [
    { "row": 2, "field": "irmNumber", "message": "Required field \"irmNumber\" is missing" },
    { "row": 4, "field": "isGstAvail", "message": "Must be Y or N" }
  ]
}
```

### Valid codes

* [Purpose Codes](/annexure/purpose-codes), [Currency Codes](/annexure/currency-codes), and [Port Codes](/annexure/port-codes) for the code columns.
* Field formats: [Push IRM Request Fields annexure](/annexure/push-irm).

### Next steps

* [Get Request Status](/api-reference/genebrc/status) with the returned `requestId`.
* [List generation requests](/api-reference/genebrc/list) across your history.
* [Download certificates](/api-reference/genebrc/download) once processed.


## OpenAPI

````yaml POST /genebrc/bulk-upload
openapi: 3.1.0
info:
  title: eBRC API
  description: >-
    REST API for generating and managing electronic Bank Realization
    Certificates (eBRC) through DGFT's GenEBRC module. Onboard exporters,
    validate their DGFT credentials, pull inward remittance (IRM) data, submit
    certificate generation requests singly or in bulk, and track them to
    completion. All JSON responses are wrapped in the standard envelope {
    success, data, statusCode, timestamp }; the schemas on each endpoint
    describe the data field.
  contact:
    name: Eximfiles support
    email: amin@eximfiles.io
  version: 1.0.0
servers:
  - url: https://ebrcapi.eximfiles.io/api/v1
    description: Production
  - url: https://ebrcapi.dev.eximfiles.com/api/v1
    description: Sandbox
security:
  - x-api-key: []
paths:
  /genebrc/bulk-upload:
    post:
      summary: Bulk upload via Excel
      description: >-
        Upload an Excel file (.xlsx or .xls, max 5 MB) to generate eBRCs in bulk
        for a platform customer. Column headers are mapped to the required
        fields and submitted to DGFT in a single request. Validation errors are
        returned per row.
      operationId: bulkUploadEbrc
      parameters:
        - name: platformCustomerId
          in: query
          required: true
          schema:
            type: string
          description: Platform customer UUID
        - name: uploadType
          in: query
          required: true
          schema:
            type: string
            enum:
              - '1'
              - '2'
              - '3'
              - '4'
          description: DGFT upload type
        - name: decalarationFlag
          in: query
          required: true
          schema:
            type: string
            enum:
              - 'Y'
              - 'N'
          description: Declaration flag
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: Excel file (.xlsx or .xls), max 5 MB
              required:
                - file
      responses:
        '200':
          description: DGFT acknowledgement with parsed row count
          content:
            application/json:
              schema:
                type: object
                properties:
                  dgftAckId:
                    type: string
                  requestId:
                    type: string
                  ackStatus:
                    type: string
                    enum:
                      - Validated
                      - Failed
                  recordResCount:
                    type: number
                  errorDetails:
                    type: array
                    items:
                      type: object
                  parsedRowCount:
                    type: number
                    description: Number of rows successfully parsed from the Excel file
                  irmNumbers:
                    type: array
                    description: Flat list of the IRM numbers submitted, in file order
                    items:
                      type: string
                  irms:
                    type: array
                    description: >-
                      The parsed rows echoed back, one entry per submitted IRM.
                      Use these to reconcile the submission; an IRM number alone
                      is not unique across AD codes and dates.
                    items:
                      type: object
                      properties:
                        serialNo:
                          type: number
                        irmNumber:
                          type: string
                        irmDt:
                          type: string
                        irmAdCode:
                          type: string
                        irmIfscCode:
                          type: string
                        sbCumInvoiceNumber:
                          type: string
              examples:
                default:
                  summary: Successful bulk upload
                  value:
                    dgftAckId: ACK202401150001
                    requestId: IEC1234560120240001ABCDE12345
                    ackStatus: Validated
                    recordResCount: 2
                    errorDetails: []
                    parsedRowCount: 2
                    irmNumbers:
                      - IRM0000012345
                      - IRM0000012346
                    irms:
                      - serialNo: 1
                        irmNumber: IRM0000012345
                        irmDt: '2024-01-10'
                        irmAdCode: '6390005'
                        irmIfscCode: HDFC0000123
                        sbCumInvoiceNumber: INV-2024-001
                      - serialNo: 2
                        irmNumber: IRM0000012346
                        irmDt: '2024-01-11'
                        irmAdCode: '6390005'
                        irmIfscCode: HDFC0000123
                        sbCumInvoiceNumber: INV-2024-002
        '400':
          description: Excel validation failed, row-level errors returned
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        row:
                          type: number
                        field:
                          type: string
                        message:
                          type: string
              examples:
                validationError:
                  summary: Excel validation error
                  value:
                    statusCode: 400
                    message: Excel validation failed
                    errors:
                      - row: 2
                        field: irmNumber
                        message: Required field "irmNumber" is missing
                      - row: 4
                        field: isGstAvail
                        message: Must be Y or N
components:
  securitySchemes:
    x-api-key:
      type: apiKey
      name: x-api-key
      in: header

````