Skip to main content
POST
/
amlyze-ws-rest
/
batch-customers
Batch Import of customers
curl --request POST \
  --url 'https://{{baseUrl}}/amlyze-ws-rest/batch-customers' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customers": [
    {
      "communicationNumber": "1b1e1c23-f62f-4338-90b9-8d54993dd2cd",
      "requester": "SYSTEMX",
      "businessUnit": "sandbox",
      "action": "CREATE",
      "riskLevel": "LOW",
      "riskManagementCategory": "IND",
      "customerExtId": "IndividualExtId0",
      "customerStatus": "ACTIVE",
      "entityType": "INDIVIDUAL",
      "applicationDate": "2016-01-01",
      "firstName": "Tomas",
      "lastName": "Garcia",
      "citizenshipCountry": "LT"
    },
    {
      "communicationNumber": "1b1e1c23-f62f-4338-90b9-8d54993dd2cd",
      "requester": "SYSTEMX",
      "businessUnit": "sandbox",
      "action": "CREATE",
      "riskLevel": "LOW",
      "riskManagementCategory": "ORG",
      "entityType": "ORGANIZATION",
      "customerExtId": "OrganizationExtId0",
      "customerStatus": "ACTIVE",
      "applicationDate": "2016-01-01",
      "title": "LTD Bull",
      "registrationCountry": "LV",
      "legalForm": "CORPORATION"
    }
  ]
}
'
import requests

url = "https://{{baseUrl}}/amlyze-ws-rest/batch-customers"

payload = { "customers": [
        {
            "communicationNumber": "1b1e1c23-f62f-4338-90b9-8d54993dd2cd",
            "requester": "SYSTEMX",
            "businessUnit": "sandbox",
            "action": "CREATE",
            "riskLevel": "LOW",
            "riskManagementCategory": "IND",
            "customerExtId": "IndividualExtId0",
            "customerStatus": "ACTIVE",
            "entityType": "INDIVIDUAL",
            "applicationDate": "2016-01-01",
            "firstName": "Tomas",
            "lastName": "Garcia",
            "citizenshipCountry": "LT"
        },
        {
            "communicationNumber": "1b1e1c23-f62f-4338-90b9-8d54993dd2cd",
            "requester": "SYSTEMX",
            "businessUnit": "sandbox",
            "action": "CREATE",
            "riskLevel": "LOW",
            "riskManagementCategory": "ORG",
            "entityType": "ORGANIZATION",
            "customerExtId": "OrganizationExtId0",
            "customerStatus": "ACTIVE",
            "applicationDate": "2016-01-01",
            "title": "LTD Bull",
            "registrationCountry": "LV",
            "legalForm": "CORPORATION"
        }
    ] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    customers: [
      {
        communicationNumber: '1b1e1c23-f62f-4338-90b9-8d54993dd2cd',
        requester: 'SYSTEMX',
        businessUnit: 'sandbox',
        action: 'CREATE',
        riskLevel: 'LOW',
        riskManagementCategory: 'IND',
        customerExtId: 'IndividualExtId0',
        customerStatus: 'ACTIVE',
        entityType: 'INDIVIDUAL',
        applicationDate: '2016-01-01',
        firstName: 'Tomas',
        lastName: 'Garcia',
        citizenshipCountry: 'LT'
      },
      {
        communicationNumber: '1b1e1c23-f62f-4338-90b9-8d54993dd2cd',
        requester: 'SYSTEMX',
        businessUnit: 'sandbox',
        action: 'CREATE',
        riskLevel: 'LOW',
        riskManagementCategory: 'ORG',
        entityType: 'ORGANIZATION',
        customerExtId: 'OrganizationExtId0',
        customerStatus: 'ACTIVE',
        applicationDate: '2016-01-01',
        title: 'LTD Bull',
        registrationCountry: 'LV',
        legalForm: 'CORPORATION'
      }
    ]
  })
};

fetch('https://{{baseUrl}}/amlyze-ws-rest/batch-customers', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "errorCode": "<string>",
  "errorDescription": "<string>",
  "results": [
    {
      "businessUnit": "<string>",
      "communicationNumber": "<string>",
      "customerExtId": "<string>",
      "errorCode": "<string>",
      "errorDescription": "<string>",
      "timeElapsedMs": 123
    }
  ],
  "timeElapsedMs": 123
}
{
  "timestamp": "2024-05-26T16:49:50.237+00:00",
  "status": 400,
  "error": "Bad Request",
  "path": "/amlyze-ws-rest/batch-accounts"
}
{
  "errorCode": "404",
  "errorDescription": "Not Found",
  "timeElapsedMs": 172
}
{
  "errorCode": "500",
  "errorDescription": "Processing failed",
  "timeElapsedMs": 172
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
customers
object[]
required

Response

OK

errorCode
string
errorDescription
string
results
object[]
timeElapsedMs
integer<int64>