> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.biposervice.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.biposervice.com/_mcp/server.

# Overview

Response Structure of Import and Delete API:

The API returns a structured response indicating the processing result of each record submitted in the request payload. Records are categorized into **validRecords** and **invalidRecords** based on validation and processing outcomes.

#### JavaScript

```javascript
{
  "data": {
    "key": "<string>",
    "validRecords": [
      {
        "key": "<string>",
        "message": "<string>"
      }
    ],
    "invalidRecords": [
      {
        "key": "<string>",
        "errorMessage": "<string>"
      }
    ]
  },
  "errorCode": "<string|null>",
  "errors": [
    "<string>"
  ],
  "messages": [
    "<string>"
  ]
}

```

#### Python

```python
{
  "data": {
    "key": "<string>",
    "validRecords": [
      {
        "key": "<string>",
        "message": "<string>"
      }
    ],
    "invalidRecords": [
      {
        "key": "<string>",
        "errorMessage": "<string>"
      }
    ]
  },
  "errorCode": "<string|null>",
  "errors": [
    "<string>"
  ],
  "messages": [
    "<string>"
  ]
}

```

#### Java

```java
{
  "data": {
    "key": "<string>",
    "validRecords": [
      {
        "key": "<string>",
        "message": "<string>"
      }
    ],
    "invalidRecords": [
      {
        "key": "<string>",
        "errorMessage": "<string>"
      }
    ]
  },
  "errorCode": "<string|null>",
  "errors": [
    "<string>"
  ],
  "messages": [
    "<string>"
  ]
}

```

#### cURL

```curl
{
  "data": {
    "key": "<string>",
    "validRecords": [
      {
        "key": "<string>",
        "message": "<string>"
      }
    ],
    "invalidRecords": [
      {
        "key": "<string>",
        "errorMessage": "<string>"
      }
    ]
  },
  "errorCode": "<string|null>",
  "errors": [
    "<string>"
  ],
  "messages": [
    "<string>"
  ]
}

```

#### Shell

```bash
{
  "data": {
    "key": "<string>",
    "validRecords": [
      {
        "key": "<string>",
        "message": "<string>"
      }
    ],
    "invalidRecords": [
      {
        "key": "<string>",
        "errorMessage": "<string>"
      }
    ]
  },
  "errorCode": "<string|null>",
  "errors": [
    "<string>"
  ],
  "messages": [
    "<string>"
  ]
}

```

### **Field Descriptions:**

`data` (object)

Contains the processing results grouped by record status.

| **Field**              | **Type** | **Description**                                                                                                               |
| ---------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------- |
| key                    | string   | Defines the composite key fields used to uniquely identify each record in the request data. Example: "EmployeeCode;DateStart" |
| validRecords           | array    | List of records that were successfully validated and processed.                                                               |
| validRecords.key       | string   | \*\*Composite key value derived from the request.  Example: "000002;2025-01-01;BIPO"                                          |
| validRecords.message   | string   | Result message  Example: "Added", "Updated", "Deleted"                                                                        |
| invalidRecords         | array    | List of records that failed validation or processing.                                                                         |
| invalidRecords.key     | string   | \*\*Composite key value derived from the request.  Example: "000002;;BIPO"                                                    |
| invalidRecords.message | string   | Description of the validation or processing error.  Example: "Mandatory Date Start must not be empty."                        |
| errorCode              | string   | System-level error code                                                                                                       |
| errors                 | array    | Summary messages describing the overall import result.  Example: "1 record(s) imported. 1 failed record(s)".                  |
| messages               | array    | Successful message  Example: "10 record(s) imported."                                                                         |

\*\*Key Mapping Rule:

> **The key value in both** **`validRecords`** **and** **`invalidRecords`** **is derived from the fields specified in** **`data.key`**, using the corresponding values from each record in the request **`data`**.

* Fields are concatenated using a semicolon (`;`)

* If a key field value is missing, it will be represented as empty

| **Request**                                                                           | **Key return in Response** |
| ------------------------------------------------------------------------------------- | -------------------------- |
| "EmployeeCode": "000002",  "DateStart": "2025-01-01T00:00:00",  "CompanyCode": "BIPO" | "000002;2025-01-01;BIPO"   |