<aside> ℹ️ POST /pos/upload

</aside>

POS Devices can be uploaded in bulk using a csv file. The file must have two headers (TerminalId, SerialNumber).

Sample Upload Format

Sample Request (FormData)

  'doc': (file)
  'ptsp': 'xxxxxx',
  'bankMerchantId': '2455463543AGP345'

<aside> ℹ️ The doc is the key is for the csv file.

</aside>

Success Response

{
    "status": true,
    "data": {
        "success": [
            {
                "status": "active",
                "ptsp": "netplus",
                "name": "peter jude",
                "type": "morefun",
                "address": "lagos island",
                "terminalId": "20336546",
                "merchantId": "6074ccb361ffd677d4f1b808",
                "serialNumber": "45463546765",
                "bankMerchantId": "2033xxxxxxxxxx",
                "createdAt": "2021-07-20T11:30:01.686Z",
                "id": "60f6b3b991c75a71bf513a04"
            },
            {
                "status": "active",
                "ptsp": "netplus",
                "name": "",
                "type": "newpos",
                "address": "",
                "terminalId": "20334655",
                "merchantId": "6074ccb361ffd677d4f1b808",
                "serialNumber": "34554676",
                "bankMerchantId": "2033xxxxxxxxxx",
                "createdAt": "2021-07-20T11:30:02.336Z",
                "id": "60f6b3ba91c75a71bf513a05"
            },
            {
                "status": "active",
                "ptsp": "netplus",
                "name": "mafia peter",
                "type": "morefunm",
                "address": "",
                "terminalId": "20334858",
                "merchantId": "6074ccb361ffd677d4f1b808",
                "serialNumber": "4354655",
                "bankMerchantId": "2033xxxxxxxxxx",
                "createdAt": "2021-07-20T11:30:02.774Z",
                "id": "60f6b3ba91c75a71bf513a06"
            },
            {
                "status": "active",
                "ptsp": "netplus",
                "name": "",
                "type": "newpos",
                "address": "julius",
                "terminalId": "20335857",
                "merchantId": "6074ccb361ffd677d4f1b808",
                "serialNumber": "43546534",
                "bankMerchantId": "2033xxxxxxxxxx",
                "createdAt": "2021-07-20T11:30:04.505Z",
                "id": "60f6b3bc91c75a71bf513a08"
            }
        ],
        "failed": [
            {
                "error": "Terminal ID [20338586] and Serial Number [4354655] creation failed",
                "value": "20338586 4354655"
            }
        ]
    }
}

Error Response

{
    "status": true,
    "data": {
        "success": [],
        "failed": [
            {
                "error": "Terminal ID [43563454] and Serial Number [45463435467] creation failed",
                "value": "43563454 45463435467"
            },
            {
                "error": "Terminal ID [4353446] and Serial Number [34553446] creation failed",
                "value": "4353446 34553446"
            }
        ]
    }
}