createCompany

createCompany

This method creates a new company.

Parameters

  • id (uuid, required): The unique identifier for the company.
  • externalId (string, required): An external identifier for the company.
  • onboardingLevel (string, nullable): The onboarding level of the company. Possible values: Onboarding, KYB, Onboarded.
  • createdAt (date-time, required): The timestamp when the company was created.
  • updatedAt (date-time, required): The timestamp when the company was last updated.
  • createdBy (string, required): The identifier of the user who created the company.
  • softDeletedAt (date-time, nullable): The timestamp when the company was soft deleted.
  • softDeletedBy (string, nullable): The identifier of the user who soft deleted the company.
  • cmsProjectId (string, required): The CMS project identifier.
  • beneficiaryCompany (object, required): The beneficiary company details.
    • ownershipPercentage (string): The ownership percentage of the beneficiary company.
    • beneficiaryCompanyId (string): The unique identifier of the beneficiary company.

Returns

A JSON object containing the created company information.

Usage Example

const axios = require('axios');
let data = JSON.stringify({
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "externalId": "string",
  "onboardingLevel": "Onboarding",
  "createdAt": "2024-08-07T13:45:40.887Z",
  "updatedAt": "2024-08-07T13:45:40.887Z",
  "createdBy": "string",
  "softDeletedAt": "2024-08-07T13:45:40.887Z",
  "softDeletedBy": "string",
  "cmsProjectId": "string",
  "beneficiaryCompany": {
    "ownershipPercentage": "string",
    "beneficiaryCompanyId": "string"
  }
});

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