Skip to content
Developerhome

Imports

  Less than to read

Consumer APIProduct -> Banking Service

Path variables

Path Variables Description
organisationId This is the organisation identifier of the customer who is importing.
companyId This is the organisation identifier of the customer who is importing.

Request headers

Headers Description
x-application This is your application identifier which is generated from the Authentication Service.
Authorization This is the bearer token returned from your request to the /accesstoken endpoint as described in step 1.
Content-Type This should be set as application/json.

POST/imports

Request body

    {
        data: {
            source: 'test',
            apiType: 'single',
            fileFormat:"Tabular3column#v1",
            fileName: "test",
            // dataSource: 'AutoEntry',
            bankId: pm.environment.get('_preset_consumer_bankId'),
            description: "This is my description",
            dateStyle: "bigEndian",
            bankAccounts:[{
                id: pm.environment.get('consumer_bankAccountId'),
                countryCode: "GBR",
                accountIdentifier: pm.environment.get('consumer_bankAccountId')
                // bankIdentifier: pm.environment.get('consumer_indirect_bankIdentifier'),
                // productDates: { 
                //     transactionStartDate: "2021-02-11", 
                //     transactionEndDate: "2021-02-11" 
                // }
            }]
        }
    }

Response

  {
      "data": {
          "id": "4760ec90-0ae3-4a6f-9f68-5d9f4b85bb3e",
          "status": "awaitingFileUpload",
          "importResponse": {
              "_id": "4760ec90-0ae3-4a6f-9f68-5d9f4b85bb3e",
              "companyId": "237fff2a-2820-4902-b089-d320befddc53",
              "dateStyle": "bigEndian",
              "fileFormat": "Tabular3column#v1",
              "fileName": "test",
              "description": "This is my description",
              "bankAccounts": [
                  {
                      "id": "60faaf04-6bb1-4b31-b23c-ade85b680228",
                      "countryCode": "GBR",
                      "accountIdentifier": "60faaf04-6bb1-4b31-b23c-ade85b680228",
                      "transactionSign": "original"
                  }
              ],
              "bankId": "168efa64-5317-4607-b1d5-1e66eb8c3cda",
              "reviewLevel": "fullReview",
              "source": "test",
              "apiType": "single",
              "fuzzyAccountMatching": false,
              "bypassReplayValidation": false
          }
      },
      "links": {
          "uploadPath": "https://bnkc-transactionimport-dev01-eu-west-1-data.s3.eu-west-1.amazonaws.com/test/237fff2a-2820-4902-b089-d320befddc53/4760ec90-0ae3-4a6f-9f68-5d9f4b85bb3e?Content-Type=application%2Foctet-stream&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAZH7KSCFQINA7N5UN%2F20220817%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220817T100808Z&X-Amz-Expires=3600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEIL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCWV1LXdlc3QtMSJHMEUCIAaUY4q0oOHYUmVJP6927CZ3Ne7tsMuNJQeGmcTRpNNJAiEAnnVFCEX5iT%2By1%2F75Tcv0H%2B5ModukKqpe7ray2U5HbMoqxgMI6%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARACGgw2MzU2MTAyMDY1NjAiDP%2FYdPHy3vSos8%2BjRCqaA6LmemGXqqYBnXpJv9PO0AvVEXhmEBJZPD4vIXyh5qCCfVdD24NTvNDSZH64bWmTkrNhu7FG2%2F%2BMJD7Fm2mosIi8FuwqIVE7NQq60ERKRsr%2F3%2BEqoKtudgvKqWBaDYxonOMSzjBJZT30uY0MVQlJ4vDNQMdqwEJ%2Fq6cWlcvgIshEbV3R490LSG2YOqMtECMguG7v%2BaMx6JxpfpdDtMorI3l7E0KDAWch8YwrUpGxUYapoiXPDVniJDQ%2Bopq%2BkJZZtedtj07%2BmUKHmlK5T8gy%2F43l6%2FkCtGfjdgwSbm1bX11yX44KwzCPM86ERvY9PkDcf0eBzOlxwe%2BWOGkfNw%2BehIjSK7OQgN511X4Vct818iaNEz19fyK4%2B%2BxzYeW%2FXo8qlMs8k0ulm%2FXJ0F90CpASNBzYOILHnSJlRufJ7t5yJpq9%2B7LHGErigMGDiMh56HHwW2cyibBkI4cd9mBxUWntm%2B09IUipRylk6cXPDjCBnZzQF2ED3KdanDetFDeKF6Ey67Niq%2B2B8tD5YvZhL9WKYZwPaLhqv57Ry6DQMIf88pcGOp4BTnb9zVr9o%2FIMltBpzuJCIP5RDN%2BvW8SWZvwrtaIskdH8XFFlwm3RvmaRL4XpPKTWEmKiCEgv3nLSNDUTgr6Jqm7X1kTELW7atPuy7guVxtwjKGX1nCKxDFkcC1KfzJisTaxb7QnZMZmOOj8Mc%2Bh6M%2BpHT5pPPk7p%2F8jzOLtuE84oDti1a6XOFQSaDZ4%2FRtIv6dXfOO6%2F%2FM9TFABuYoA%3D&X-Amz-Signature=ae493a66d7fdce55054d624ca13598ee42fc8c58ad62971ded127987d4c03384&X-Amz-SignedHeaders=host"
      },
      "meta": {},
      "error": null
  }

POST/imports/{importId}/confirm

Path variables

Path variables Description
organisationId This is the organisation identifier of the customer who is importing.
companyId This is the organisation identifier of the customer who is importing.
importId This is the import identifier which is returned on your initial Post imports request.

Response

Status 204 No Content


GET/imports

Response

  {
      "data": [
          {
              "validationDetails": [],
              "fileName": "newImport",
              "companyId": "237fff2a-2820-4902-b089-d320befddc53",
              "reviewLevel": "fullReview",
              "fileFormat": "JSON#v0",
              "s3FilePath": "test/237fff2a-2820-4902-b089-d320befddc53/a6556b59-689b-4040-aec7-7953183f222b",
              "status": "deleted",
              "dateStyle": "littleEndian",
              "bankAccounts": [
                  {
                      "accountIdentifier": "JEFF2",
                      "id": "60faaf04-6bb1-4b31-b23c-ade85b680228",
                      "transactionSign": "original",
                      "countryCode": "GBR",
                      "bankIdentifier": ""
                  }
              ],
              "fuzzyAccountMatching": true,
              "executionArn": "arn:aws:states:eu-west-1:635610206560:execution:bnkc-transactionimport-dev01-eu-west-1-Step:2fdb8479-016c-e45e-b3e1-3c1c305e5077_a9a498e9-e3a7-ef80-7a5f-14005ec2b485",
              "bankId": "168efa64-5317-4607-b1d5-1e66eb8c3cda",
              "bypassReplayValidation": false,
              "_id": "a6556b59-689b-4040-aec7-7953183f222b",
              "fileUploaded": true,
              "validationDetailsCount": 0,
              "organisationId": "f5a9de10-4d8a-44ca-b27a-c364c8c0199b",
              "created": "2022-08-17T09:26:15.822Z",
              "updated": "2022-08-17T09:26:15.822Z",
              "errorDetails": [
                  {
                      "severity": "error",
                      "message": "Failed to parse file",
                      "code": "ProcessingError"
                  },
                  {
                      "severity": "info",
                      "message": "deleted TransactionImport"
                  }
              ],
              "description": "This is my description",
              "sourceProduct": "sage.integrate.myproduct",
              "apiType": "multi"
          },
          {
              "validationDetails": [],
              "fileName": "newImport",
              "companyId": "237fff2a-2820-4902-b089-d320befddc53",
              "reviewLevel": "fullReview",
              "fileFormat": "XML#OFX#v1",
              "s3FilePath": "test/237fff2a-2820-4902-b089-d320befddc53/ea10d58b-16bc-4480-9e82-8cf05d62f575",
              "status": "error",
              "dateStyle": "littleEndian",
              "bankAccounts": [
                  {
                      "accountIdentifier": "badger",
                      "id": "60faaf04-6bb1-4b31-b23c-ade85b680228",
                      "transactionSign": "original",
                      "countryCode": "GBR",
                      "bankIdentifier": ""
                  }
              ],
              "fuzzyAccountMatching": true,
              "executionArn": "arn:aws:states:eu-west-1:635610206560:execution:bnkc-transactionimport-dev01-eu-west-1-Step:bb2c1bd7-938e-e625-3ffc-5412eda7c792_b99a2d91-6693-ab40-46cb-ec1e1a52da9a",
              "bankId": "168efa64-5317-4607-b1d5-1e66eb8c3cda",
              "bypassReplayValidation": true,
              "_id": "ea10d58b-16bc-4480-9e82-8cf05d62f575",
              "fileUploaded": true,
              "validationDetailsCount": 0,
              "organisationId": "f5a9de10-4d8a-44ca-b27a-c364c8c0199b",
              "created": "2022-08-17T09:37:36.132Z",
              "updated": "2022-08-17T09:37:36.132Z",
              "errorDetails": [
                  {
                      "severity": "error",
                      "code": "InvalidSourceData",
                      "message": "Invalid data",
                      "target": "File"
                  },
                  {
                      "severity": "error",
                      "message": "One or more fields were missing, or failed to match the required specification",
                      "code": "ValidationError"
                  }
              ],
              "description": "This is my description",
              "sourceProduct": "sage.integrate.myproduct",
              "apiType": "single"
          }
      ],
      "links": {},
      "meta": {},
      "error": null
  }

GET/imports/{importId}

Response

  {
    "data": {
        "validationDetails": [],
        "fileName": "test",
        "companyId": "237fff2a-2820-4902-b089-d320befddc53",
        "reviewLevel": "fullReview",
        "fileFormat": "Tabular3column#v1",
        "s3FilePath": "test/237fff2a-2820-4902-b089-d320befddc53/229c6267-4187-4f52-b0c2-3678f79d7520",
        "status": "awaitingConfirmation",
        "dateStyle": "bigEndian",
        "bankAccounts": [
            {
                "accountIdentifier": "60faaf04-6bb1-4b31-b23c-ade85b680228",
                "id": "60faaf04-6bb1-4b31-b23c-ade85b680228",
                "transactionSign": "original",
                "countryCode": "GBR"
            }
        ],
        "fuzzyAccountMatching": false,
        "statement": {
            "summary": {
                "accountDetailsCount": 1,
                "transactionRangeStartDate": "2004-10-11T11:30:00.000Z",
                "transactionCreditSum": 5220,
                "transactionCreditCount": 2,
                "transactionDetailsCount": 5,
                "transactionDateOverlapCount": 0,
                "transactionDebitSum": -11000,
                "transactionRangeEndDate": "2004-10-15T11:30:00.000Z",
                "transactionDebitCount": 3
            },
            "id": "70f29b27-c49f-487b-bc4d-219e3b781f7e"
        },
        "executionArn": "arn:aws:states:eu-west-1:635610206560:execution:bnkc-transactionimport-dev01-eu-west-1-Step:0e699cfd-be10-1e42-cefb-aa78dfdbe2d5_17469358-ae02-1c79-e72c-929bbb110c5a",
        "bankId": "168efa64-5317-4607-b1d5-1e66eb8c3cda",
        "bypassReplayValidation": false,
        "_id": "229c6267-4187-4f52-b0c2-3678f79d7520",
        "statusMonitor": {
            "pollFirstAttempt": "2022-08-17T10:21:36.811Z",
            "pollAttempts": 10,
            "pollLastAttempt": "2022-08-17T10:23:14.019Z"
        },
        "fileUploaded": true,
        "validationDetailsCount": 0,
        "organisationId": "f5a9de10-4d8a-44ca-b27a-c364c8c0199b",
        "created": "2022-08-17T10:20:21.945Z",
        "updated": "2022-08-17T10:20:21.945Z",
        "accountIdentifiers": [],
        "errorDetails": [],
        "description": "This is my description",
        "sourceProduct": "sage.integrate.myproduct",
        "apiType": "single"
    },
    "links": null,
    "meta": {},
    "error": null
}
Example of a response with error
```json 
  {
      "data": {
          "validationDetails": [],
          "fileName": "newImport",
          "companyId": "237fff2a-2820-4902-b089-d320befddc53",
          "reviewLevel": "fullReview",
          "fileFormat": "JSON#v0",
          "s3FilePath": "test/237fff2a-2820-4902-b089-d320befddc53/a6556b59-689b-4040-aec7-7953183f222b",
          "status": "error",
          "dateStyle": "littleEndian",
          "bankAccounts": [
              {
                  "accountIdentifier": "JEFF2",
                  "id": "60faaf04-6bb1-4b31-b23c-ade85b680228",
                  "transactionSign": "original",
                  "countryCode": "GBR",
                  "bankIdentifier": ""
              }
          ],
          "fuzzyAccountMatching": true,
          "executionArn": "arn:aws:states:eu-west-1:635610206560:execution:bnkc-transactionimport-dev01-eu-west-1-Step:2fdb8479-016c-e45e-b3e1-3c1c305e5077_a9a498e9-e3a7-ef80-7a5f-14005ec2b485",
          "bankId": "168efa64-5317-4607-b1d5-1e66eb8c3cda",
          "bypassReplayValidation": false,
          "_id": "a6556b59-689b-4040-aec7-7953183f222b",
          "fileUploaded": true,
          "validationDetailsCount": 0,
          "organisationId": "f5a9de10-4d8a-44ca-b27a-c364c8c0199b",
          "created": "2022-08-17T09:26:15.822Z",
          "updated": "2022-08-17T09:26:15.822Z",
          "errorDetails": [
              {
                  "severity": "error",
                  "message": "Failed to parse file",
                  "code": "ProcessingError"
              }
          ],
          "description": "This is my description",
          "sourceProduct": "sage.integrate.myproduct",
          "apiType": "multi"
      },
      "links": null,
      "meta": {},
      "error": null
  }
```

Was this helpful?