createContactInformation

createContactInformation

This method allows you to add contact information for a specific customer.

Parameters

  • customerId (string, required): The UUID of the customer.
  • information (object, required): An object containing the contact information details such as email, phone, Twitter, Discord, and Telegram.
  • softDeletedBy (string, nullable): The ID of the user who marked this information as soft deleted, if applicable.

Returns

A JSON object containing the details of the created contact information.

Usage Example

const axios = require('axios');
let data = JSON.stringify({
  "information": {
    "email": "[email protected]",
    "phone": "string",
    "twitter": "string",
    "discord": "string",
    "telegram": "string"
  },
  "softDeletedBy": "string"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.nexera.id/customers/:customerId/contact-information',
  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);
});