# Batch Upload

#### **Usage**

- Batch upload transaction records to [e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS"), and will be matched and return.Only support the transactions within 7 Days.

#### **action**

- `batchUpload`

**Request body，Cashier POS===&gt;[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")**

<table id="bkmrk-field-type-mandatory" style="width: 797px; height: 168px;"><thead><tr style="height: 29px;"><th style="width: 99px; height: 29px;">Field</th><th style="width: 147px; height: 29px;">Type</th><th style="width: 101px; height: 29px;">Mandatory</th><th style="width: 186px; height: 29px;">Description</th><th style="width: 264px; height: 29px;">Memo</th></tr></thead><tbody><tr style="height: 29px;"><td style="width: 99px; height: 29px;">traceNo</td><td style="width: 147px; height: 29px;">String</td><td style="width: 101px; height: 29px;">Yes</td><td style="width: 186px; height: 29px;">Cashier terminal trace No.</td><td style="width: 264px; height: 29px;">No repeat allowed</td></tr><tr style="height: 29px;"><td style="width: 99px; height: 29px;">transCount</td><td style="width: 147px; height: 29px;">Integer</td><td style="width: 101px; height: 29px;">Yes</td><td style="width: 186px; height: 29px;">Upload size</td><td style="width: 264px; height: 29px;">Should equals to size of transRecord list</td></tr><tr style="height: 29px;"><td style="width: 99px; height: 29px;">beginTime</td><td style="width: 147px; height: 29px;">String</td><td style="width: 101px; height: 29px;">Yes</td><td style="width: 186px; height: 29px;">Begin Time</td><td style="width: 264px; height: 29px;">Format：yyyyMMddHHmmss</td></tr><tr style="height: 29px;"><td style="width: 99px; height: 29px;">endTime</td><td style="width: 147px; height: 29px;">String</td><td style="width: 101px; height: 29px;">Yes</td><td style="width: 186px; height: 29px;">End Time</td><td style="width: 264px; height: 29px;">Format：yyyyMMddHHmmss</td></tr><tr style="height: 23px;"><td style="width: 99px; height: 23px;">transRecord</td><td style="width: 147px; height: 23px;">List&lt;[transRecord](https://book.e-buy.com/link/333#bkmrk-trans-record "transRecord")&gt;</td><td style="width: 101px; height: 23px;">Yes</td><td style="width: 186px; height: 23px;">Transaction records</td><td style="width: 264px; height: 23px;">Maximum：5000</td></tr></tbody></table>

#### **Request body example**

```
{
    "traceNo": "99000009100010101732123",
    "transCount": 3,
    "beginTime": "20161231102201",
    "endTime": "20161231102230",
    "transRecord": [
      {
          "traceNo": "99000009100010101732123",
          "paidAmount": 100.00,
          "status": 0
      },
      {
          "traceNo": "99000009100010101732123",
          "paidAmount": 200.00,
          "status": 0
      },
      {
          "traceNo": "99000009100010101732123",
          "paidAmount": 300.00,
          "status": 0
      }
    ]
}

```

**Response body，[e-Buy Backend](https://book.e-buy.com/link/124#bkmrk-e-buy-backend "A group /set of equipment / server to process all the transaction from e-Buy POS")===&gt;Cashier POS**

<table id="bkmrk-field-type-mandatory-0" style="height: 188px;"><thead><tr style="height: 45px;"><th style="height: 24px; width: 100px;">Field</th><th style="height: 24px; width: 86px;">Type</th><th style="height: 24px; width: 91px;">Mandatory</th><th style="height: 24px; width: 181px;">Description</th><th style="height: 24px; width: 349px;">Memo</th></tr></thead><tbody><tr style="height: 29px;"><td style="height: 29px; width: 100px;">traceNo</td><td style="height: 29px; width: 86px;">String</td><td style="height: 29px; width: 91px;">Yes</td><td style="height: 29px; width: 181px;">Cashier terminal trace No.</td><td style="height: 29px; width: 349px;">No repeat allowed</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 100px;">transDate</td><td style="height: 29px; width: 86px;">String</td><td style="height: 29px; width: 91px;">Yes</td><td style="height: 29px; width: 181px;">Transaction time</td><td style="height: 29px; width: 349px;">Format：yyyyMMddHHmmss</td></tr><tr style="height: 45px;"><td style="height: 12px; width: 100px;">returnCode</td><td style="height: 12px; width: 86px;">String</td><td style="height: 12px; width: 91px;">Yes</td><td style="height: 12px; width: 181px;">Return code</td><td style="height: 12px; width: 349px;">00 represent successful transaction, else represent fail</td></tr><tr style="height: 45px;"><td style="height: 37px; width: 100px;">returnDesc</td><td style="height: 37px; width: 86px;">String</td><td style="height: 37px; width: 91px;">Yes</td><td style="height: 37px; width: 181px;">Return message</td><td style="height: 37px; width: 349px;">Detail explanation / error message per transaction result</td></tr><tr style="height: 57px;"><td style="height: 57px; width: 100px;">transRecord</td><td style="height: 57px; width: 86px;">List&lt;[transRecord](https://book.e-buy.com/link/333#bkmrk-trans-record "transRecord")&gt;</td><td style="height: 57px; width: 91px;">Yes</td><td style="height: 57px; width: 181px;">Transaction records after match</td><td style="height: 57px; width: 349px;">Maximum：5000</td></tr></tbody></table>

#### **Response body example**

```
{
    "traceNo": "99000009100010101732123",
    "transDate": "20161231120533",
    "returnCode": "00",
    "returnDesc": "SUCCESS",
    "transRecord": [
      {
          "traceNo": "99000009100010101732123",
          "paidAmount": 100.00,
          "status": 1
      },
      {
          "traceNo": "99000009100010101732123",
          "paidAmount": 200.00,
          "status": 2
      },
      {
          "traceNo": "99000009100010101732123",
          "paidAmount": 300.00,
          "status": 3
      }
    ]
}
```