Skip to content

Latest commit

 

History

History
96 lines (68 loc) · 6.13 KB

File metadata and controls

96 lines (68 loc) · 6.13 KB

EnrichedProfile

(enrichedProfile)

Overview

Available Operations

  • get - Fetch enriched profile data. Requires a valid email address. This service is offered in collaboration with Clearbit.

To access this endpoint using an access token you'll need to specify the /profile-enrichment.read scope.

get

Fetch enriched profile data. Requires a valid email address. This service is offered in collaboration with Clearbit.

To access this endpoint using an access token you'll need to specify the /profile-enrichment.read scope.

Example Usage

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.enrichedProfile.get({
    email: "Keeley_Lebsack@hotmail.com",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MoovCore } from "@moovio/sdk/core.js";
import { enrichedProfileGet } from "@moovio/sdk/funcs/enrichedProfileGet.js";

// Use `MoovCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const moov = new MoovCore({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const res = await enrichedProfileGet(moov, {
    email: "Keeley_Lebsack@hotmail.com",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.GetEnrichmentProfileRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.GetEnrichmentProfileResponse>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*