Documentation ¶
Overview ¶
@openapi 3.0.0
@openapi 3.0.0
Index ¶
- func EnrichOrganization(services *service.Services) gin.HandlerFunc
- func EnrichPerson(services *service.Services) gin.HandlerFunc
- func EnrichPersonCallback(services *service.Services) gin.HandlerFunc
- type EnrichOrganizationData
- type EnrichOrganizationIndustry
- type EnrichOrganizationLocation
- type EnrichOrganizationResponse
- type EnrichPersonData
- type EnrichPersonDiscord
- type EnrichPersonEmail
- type EnrichPersonGithub
- type EnrichPersonJob
- type EnrichPersonJobDuration
- type EnrichPersonLinkedIn
- type EnrichPersonLocation
- type EnrichPersonName
- type EnrichPersonPhoneNumber
- type EnrichPersonResponse
- type EnrichPersonSocial
- type EnrichPersonX
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnrichOrganization ¶
func EnrichOrganization(services *service.Services) gin.HandlerFunc
@Summary Enrich organization information @Description Enriches organization information using either domain or LinkedIn URL @Tags Enrichment API @Accept json @Produce json @Param linkedinUrl query string false "Organization's LinkedIn URL" example(https://linkedin.com/company/acme) @Param domain query string false "Organization's domain" example(acme.com) @Success 200 {object} EnrichOrganizationResponse "Successfully retrieved enriched data" @Success 200 {object} rest.ErrorResponse "Organization not found (status: warning)" @Failure 400 {object} rest.BaseResponse "Missing or invalid parameters" @Failure 401 {object} rest.BaseResponse "Missing or invalid API key" @Failure 500 {object} rest.BaseResponse "Internal server error" @Router /enrich/v1/organization [get] @Security ApiKeyAuth
func EnrichPerson ¶
func EnrichPerson(services *service.Services) gin.HandlerFunc
@Summary Enrich person information @Description Enriches person information using LinkedIn URL, email, and other optional details @Tags Enrichment API @Accept json @Produce json @Param linkedinUrl query string false "LinkedIn profile URL" example(https://linkedin.com/in/johndoe) @Param email query string false "Email address" example(john.doe@example.com) format(email) @Param firstName query string false "First name" example(John) minLength(1) @Param lastName query string false "Last name" example(Doe) minLength(1) @Param includeMobileNumber query bool false "Include mobile number in results" default(false) @Success 200 {object} EnrichPersonResponse "Successfully retrieved enriched data" @Success 202 {object} EnrichPersonResponse "Processing initiated, check ResultURL for final data" @Success 200 {object} rest.ErrorResponse "Person not found (status: warning)" @Failure 400 {object} rest.BaseResponse "Missing linkedinUrl or email" @Failure 401 {object} rest.BaseResponse "Missing or invalid API key" @Failure 500 {object} rest.BaseResponse "Internal server error" @Router /enrich/v1/person [get] @Security ApiKeyAuth
func EnrichPersonCallback ¶
func EnrichPersonCallback(services *service.Services) gin.HandlerFunc
@Summary Retrieve enrichment results @Description Retrieves the results of an asynchronous person enrichment operation @Tags Enrichment API @Accept json @Produce json @Param id path string true "Result ID" format(uuid) @Success 200 {object} EnrichPersonResponse "Successfully retrieved enriched data" @Success 202 {object} EnrichPersonResponse "Still processing, check again later" @Failure 400 {object} rest.BaseResponse "Invalid result ID" @Failure 401 {object} rest.BaseResponse "Missing or invalid API key" @Failure 404 {object} rest.BaseResponse "Result not found" @Failure 500 {object} rest.BaseResponse "Internal server error" @Router /enrich/v1/person/results/{id} [get] @Security ApiKeyAuth
Types ¶
type EnrichOrganizationData ¶
type EnrichOrganizationData struct { // Organization name // required: true // example: Acme Corporation Name string `json:"name"` // Organization's primary domain // required: true // example: acme.com Domain string `json:"domain"` // Brief description of the organization // required: false // example: A global leader in innovative solutions ShortDescription string `json:"description,omitempty"` // Detailed description of the organization // required: false // example: Acme Corporation provides cutting-edge technology solutions across the globe LongDescription string `json:"longDescription,omitempty"` // Organization's website URL // required: true // example: https://acme.com // format: uri Website string `json:"website"` // Number of employees // required: false // minimum: 0 // example: 5000 Employees int `json:"employees,omitempty"` // Year the organization was founded // required: false // minimum: 1800 // maximum: 2100 // example: 1995 FoundedYear int `json:"foundedYear,omitempty"` // Indicates if the organization is publicly traded // required: false // example: true Public bool `json:"public,omitempty"` // URLs to organization logos // required: false // example: ["https://acme.com/logo.png"] Logos []string `json:"logos,omitempty"` // URLs to organization icons // required: false // example: ["https://acme.com/icon.png"] Icons []string `json:"icons,omitempty"` // Industry classification // required: false Industry EnrichOrganizationIndustry `json:"industry,omitempty"` // Social media presence // required: false // example: ["https://linkedin.com/company/acme"] Socials []string `json:"socials,omitempty"` // Organization location information // required: false Location EnrichOrganizationLocation `json:"location,omitempty"` }
EnrichOrganizationData represents enriched organization information @Description Detailed enriched information about an organization
type EnrichOrganizationIndustry ¶
type EnrichOrganizationIndustry struct { // Primary industry category // required: true // example: Technology Industry string `json:"industry"` }
EnrichOrganizationIndustry represents industry classification @Description Industry classification information
type EnrichOrganizationLocation ¶
type EnrichOrganizationLocation struct { // Indicates if this is the headquarters location // required: true // example: true IsHeadquarter bool `json:"isHeadquarter"` // Country name // required: true // example: United States Country string `json:"country"` // ISO 3166-1 alpha-2 country code // required: true // example: US // pattern: ^[A-Z]{2}$ CountryCodeA2 string `json:"countryCodeA2"` // City name // required: false // example: San Francisco City string `json:"city,omitempty"` // State or region // required: false // example: California Region string `json:"region,omitempty"` // Postal code // required: false // example: 94105 PostalCode string `json:"postalCode,omitempty"` // Primary address line // required: false // example: 123 Main St AddressLine1 string `json:"addressLine1,omitempty"` // Secondary address line // required: false // example: Suite 100 AddressLine2 string `json:"addressLine2,omitempty"` }
EnrichOrganizationLocation represents location information @Description Detailed location information for an organization
type EnrichOrganizationResponse ¶
type EnrichOrganizationResponse struct { // Inherits standard response fields enum.BaseResponse // Enriched organization data // required: true Data EnrichOrganizationData `json:"data"` }
EnrichOrganizationResponse represents the response for organization enrichment @Description Response structure for organization enrichment operations
type EnrichPersonData ¶
type EnrichPersonData struct { // List of email addresses associated with the person // required: false Emails []EnrichPersonEmail `json:"emails"` // Employment history // required: false Jobs []EnrichPersonJob `json:"jobs"` // Geographic location information // required: false Location EnrichPersonLocation `json:"location"` // Person's name information // required: true Name EnrichPersonName `json:"name"` // List of phone numbers // required: false PhoneNumbers []EnrichPersonPhoneNumber `json:"phoneNumbers"` // URL to person's profile picture // required: false // format: uri ProfilePic string `json:"profilePic" example:"https://example.com/profile.jpg"` // Social media presence // required: false Social EnrichPersonSocial `json:"social"` }
EnrichPersonData represents enriched person information @Description Comprehensive enriched information about a person
type EnrichPersonDiscord ¶
type EnrichPersonDiscord struct { // Discord username with discriminator // required: true // pattern: ^.{3,32}#[0-9]{4}$ Username string `json:"username" example:"johndoe#1234"` }
EnrichPersonDiscord represents Discord profile information @Description Discord profile details
type EnrichPersonEmail ¶
type EnrichPersonEmail struct { // Email address // required: true // format: email Address string `json:"address" example:"john.doe@example.com"` // Indicates if the email is deliverable // required: false Deliverable *string `json:"deliverable,omitempty" example:"true"` // Indicates if the email is considered risky // required: false IsRisky *bool `json:"isRisky,omitempty" example:"false"` // Type of email address // required: false // enum: personal,work Type *string `json:"type,omitempty" example:"work"` }
EnrichPersonEmail represents email information @Description Email address with validation details
type EnrichPersonGithub ¶
type EnrichPersonGithub struct { // GitHub username // required: true Username string `json:"username" example:"johndoe"` // Full GitHub profile URL // required: false // format: uri URL string `json:"url" example:"https://github.com/johndoe"` }
EnrichPersonGithub represents GitHub profile information @Description GitHub profile details
type EnrichPersonJob ¶
type EnrichPersonJob struct { // Job title // required: true Title string `json:"title" example:"Software Engineer"` // Seniority level // required: false // enum: Junior,Mid-Level,Senior,Lead,Manager,Director,VP,C-Level Seniority string `json:"seniority" example:"Senior"` // Employment duration // required: true Duration EnrichPersonJobDuration `json:"duration"` // Company name // required: true Company string `json:"company" example:"Tech Corp"` // Company's LinkedIn URL // required: false // format: uri CompanyLinkedin string `json:"companyLinkedin" example:"https://linkedin.com/company/techcorp"` // Company's website // required: false // format: uri CompanyWebsite string `json:"companyWebsite" example:"https://techcorp.com"` // Indicates if this is the current position // required: true IsCurrent bool `json:"isCurrent" example:"true"` }
EnrichPersonJob represents employment information @Description Details about a person's job position
type EnrichPersonJobDuration ¶
type EnrichPersonJobDuration struct { // Starting month (1-12) // required: false // minimum: 1 // maximum: 12 StartMonth *int `json:"startMonth,omitempty" example:"1"` // Starting year // required: false // minimum: 1900 // maximum: 2100 StartYear *int `json:"startYear,omitempty" example:"2020"` // Ending month (1-12) // required: false // minimum: 1 // maximum: 12 EndMonth *int `json:"endMonth,omitempty" example:"12"` // Ending year // required: false // minimum: 1900 // maximum: 2100 EndYear *int `json:"endYear,omitempty" example:"2023"` }
EnrichPersonJobDuration represents employment duration @Description Time period of employment
type EnrichPersonLinkedIn ¶
type EnrichPersonLinkedIn struct { // LinkedIn internal ID // required: false ID string `json:"id" example:"123456789"` // LinkedIn public identifier // required: false PublicID string `json:"publicId" example:"john-doe"` // Full LinkedIn profile URL // required: false // format: uri URL string `json:"url" example:"https://linkedin.com/in/john-doe"` // Number of LinkedIn followers // required: false // minimum: 0 FollowerCount int `json:"followerCount" example:"500"` }
EnrichPersonLinkedIn represents LinkedIn profile information @Description LinkedIn specific profile details
type EnrichPersonLocation ¶
type EnrichPersonLocation struct { // City name // required: false City string `json:"city" example:"San Francisco"` // State or region // required: false Region string `json:"region" example:"California"` // Country name // required: false Country string `json:"country" example:"United States"` // Timezone identifier // required: false // example: America/Los_Angeles Timezone string `json:"timezone" example:"PST"` }
EnrichPersonLocation represents location information @Description Geographic and timezone information about a person
type EnrichPersonName ¶
type EnrichPersonName struct { // First name // required: true // minLength: 1 FirstName string `json:"firstName" example:"John"` // Last name // required: true // minLength: 1 LastName string `json:"lastName" example:"Doe"` // Full name (typically firstName + lastName) // required: false FullName string `json:"fullName" example:"John Doe"` }
EnrichPersonName represents name information @Description Person's name details
type EnrichPersonPhoneNumber ¶
type EnrichPersonPhoneNumber struct { // Phone number in E.164 format // required: true // pattern: ^\+[1-9]\d{1,14}$ Number string `json:"number" example:"+14155552671"` // Type of phone number // required: true // enum: mobile,work,home,other Type string `json:"type" example:"mobile"` }
EnrichPersonPhoneNumber represents phone information @Description Phone number with type classification
type EnrichPersonResponse ¶
type EnrichPersonResponse struct { enum.BaseResponse // Optional message providing additional information // required: false Message string `json:"message,omitempty" example:"Enrichment completed"` // Indicates if all enrichment operations are complete // required: true IsComplete bool `json:"isComplete" example:"true"` // List of fields still being processed // required: false PendingFields []string `json:"pendingFields,omitempty" example:"email,phone number"` // URL to check the final result when processing is incomplete // required: false // format: uri ResultURL string `json:"resultUrl,omitempty" example:"https://api.customeros.ai/enrich/v1/person/results/550e8400-e29b-41d4-a716-446655440000"` // Enriched person data // required: true Data EnrichPersonData `json:"data"` }
EnrichPersonResponse represents the response for person enrichment @Description Response structure for person enrichment operations
type EnrichPersonSocial ¶
type EnrichPersonSocial struct { // LinkedIn profile information // required: false Linkedin EnrichPersonLinkedIn `json:"linkedin"` // X (Twitter) profile information // required: false X EnrichPersonX `json:"x"` // GitHub profile information // required: false Github EnrichPersonGithub `json:"github"` // Discord profile information // required: false Discord EnrichPersonDiscord `json:"discord"` }
EnrichPersonSocial represents social media presence @Description Collection of social media profile information
type EnrichPersonX ¶
type EnrichPersonX struct { // X handle (without @) // required: true Handle string `json:"handle" example:"johndoe"` // Full X profile URL // required: false // format: uri URL string `json:"url" example:"https://x.com/johndoe"` }
EnrichPersonX represents X (Twitter) profile information @Description X (formerly Twitter) profile details