mergeCustomers

mergeCustomers

This method allows you to merge multiple source customers into a single target customer.

Parameters

  • sourceCustomerIds (string[], required): An array of customer IDs that you want to merge. You can merge one or more customers.
  • targetCustomerId (string, required): The customer ID into which the source customers will be merged.

Returns

A string response indicating the status of the operation.

Usage Example

const axios = require('axios');
let data = JSON.stringify({
  "sourceCustomerIds": [
    "string"
  ],
  "targetCustomerId": "string"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.nexera.id/customers/merge',
  headers: { 
    'Content-Type': 'application/json', 
    'Accept': 'application/json', 
    'Authorization': 'Bearer <TOKEN>'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});