recruit

package
v1.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2023 License: MIT Imports: 7 Imported by: 0

README

Zoho RECRUIT V1 API

NOTE: Preatty much stable and tested. PRs welcome.

This API wrapper should provide access to Zoho RECRUIT. Because some fields exist only in add-ons for RECRUIT, or are custom fields, which cannot be easily differentiated, all fields that are recieved in a record which have no direct corresponding field in the defined struct will be available in a map[string]interface{} field. This may extend to all fields being accessible in a field called "RAW" or some-such, which can then be manually type-asserted against.

Note: These APIs result entire API response in JSON format. It is expected that client application will parse the API response to get the desired fields. fields they need.

Usage

import (
    "log"
    "fmt"
    "github.com/schmorrison/Zoho"
)

func main() {
    // get access/refresh tokens
    z := zoho.New()
    scopes := []zoho.ScopeString{
        zoho.BuildScope(zoho.Recruit, zoho.FullAccessScope, zoho.AllMethod, zoho.NoOp),
    }
    if err := z.AuthorizationCodeRequest("yourClientID", "yourClientSecret", scopes, "http://localhost:8080/oauthredirect"); err != nil {
        log.Fatal(err)
    }

    // Create a new Recruit object and provide the Zoho struct
    c := recruit.New(z)

    // While untested, getting data should work like so
    params := map[string]zoho.Parameter{}
    _, err := c.GetJobOpenings(params)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Println(data)
}

TODO

  • Write a TODO list
  • Comment code with full details
  • Add page context values to returned data, or methods to interact with it via module
  • Create godoc for recruit APIs
  • Identify Recruit APIs which are used most

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	*zoho.Zoho
	// contains filtered or unexported fields
}

API is used for interacting with the Zoho recruit API the exposed methods are primarily access to recruit modules which provide access to recruit Methods

func New

func New(z *zoho.Zoho) *API

New returns a *recruit.API with the provided zoho.Zoho as an embedded field

func (*API) GetAllMetadata

func (c *API) GetAllMetadata() (data AllMetadataResponse, err error)

GetAllMetadata returns the metadata for fields, layouts, and related lists for the specified module. It lists the entire fields available and related list for that module. https://www.zoho.com/recruit/developer-guide/apiv2/module-meta.html https://recruit.zoho.%s/v2/settings/modules

func (*API) GetClientsRecordById

func (c *API) GetClientsRecordById(id string) (data ClientsRecordsResponse, err error)

GetClientsRecord returns the record specified by ID https://www.zoho.com/recruit/developer-guide/apiv2/get-records.html https://recruit.zoho.eu/recruit/v2/Clients/{id}

func (*API) GetClientsRecords

func (c *API) GetClientsRecords(params map[string]zoho.Parameter) (data ClientsRecordsResponse, err error)

GetClientsRecords returns a list of all records https://www.zoho.com/recruit/developer-guide/apiv2/get-records.html https://recruit.zoho.eu/recruit/v2/Clients

func (*API) GetContactsRecordById

func (c *API) GetContactsRecordById(id string) (data ContactsRecordsResponse, err error)

GetContactsRecord returns the record specified by ID https://www.zoho.com/recruit/developer-guide/apiv2/get-records.html https://recruit.zoho.eu/recruit/v2/Contacts/{id}

func (*API) GetContactsRecords

func (c *API) GetContactsRecords(params map[string]zoho.Parameter) (data ContactsRecordsResponse, err error)

GetContactsRecords returns a list of all records https://www.zoho.com/recruit/developer-guide/apiv2/get-records.html https://recruit.zoho.eu/recruit/v2/Contacts

func (*API) GetCustomViewsMetadata

func (c *API) GetCustomViewsMetadata(moduleId string, params map[string]zoho.Parameter) (data CustomViewsMetadataResponse, err error)

GetCustomViewsMetadata returns the custom views data of a particular module. https://www.zoho.com/recruit/developer-guide/apiv2/custom-view-meta.html https://recruit.zoho.eu/recruit/v2/settings/custom_views/{module_id}?module={module}

func (*API) GetFieldsMetadata

func (c *API) GetFieldsMetadata(params map[string]zoho.Parameter) (data FieldsMetadataResponse, err error)

GetFieldsMetadata returns field metadata for the specified module. https://www.zoho.com/recruit/developer-guide/apiv2/field-meta.html https://recruit.zoho.eu/recruit/v2/settings/fields

func (*API) GetInterviewsRecordById

func (c *API) GetInterviewsRecordById(id string) (data InterviewsRecordsResponse, err error)

GetInterviewsRecord returns the record specified by ID https://www.zoho.com/recruit/developer-guide/apiv2/get-records.html https://recruit.zoho.eu/recruit/v2/Interviews/{id}

func (*API) GetInterviewsRecords

func (c *API) GetInterviewsRecords(params map[string]zoho.Parameter) (data InterviewsRecordsResponse, err error)

GetInterviewsRecords returns a list of all records https://www.zoho.com/recruit/developer-guide/apiv2/get-records.html https://recruit.zoho.eu/recruit/v2/Interviews

func (*API) GetModuleMetadata

func (c *API) GetModuleMetadata(module string) (data ModuleMetadataResponse, err error)

GetModuleMetadata returns the metadata for a specific module. https://www.zoho.com/recruit/developer-guide/apiv2/module-meta.html https://recruit.zoho.eu/recruit/v2/settings/modules/{module}

func (*API) GetOrganizationDetails

func (c *API) GetOrganizationDetails() (data OrganizationResponse, err error)

GetOrganizationDetails returns organization's data https://www.zoho.com/recruit/developer-guide/apiv2/get-org-data.html https://recruit.zoho.eu/recruit/v2/org

func (*API) SearchRecords

func (c *API) SearchRecords(request interface{}, module Module, params map[string]zoho.Parameter) (data interface{}, err error)

https://www.zoho.com/recruit/developer-guide/apiv2/search-records.html

func (*API) UpsertCandidates

func (c *API) UpsertCandidates(request UpsertCandidateRequest) (data UpsertCandidateResponse, err error)

Upsert = Insert or Update https://www.zoho.com/recruit/developer-guide/apiv2/upsert-records.html

func (*API) UpsertRecords

func (c *API) UpsertRecords(request UpsertRecords, module Module) (data InsertRecordsResponse, err error)

UpsertRecords will insert the provided records in the request, if they already exist it will be updated https://www.zoho.com/recruit/developer-guide/apiv2/upsert-records.html

When performing an upsert, because the natural state of the records fields in this package is to 'omitempty' when encoding json, if you want to empty the fields contents in zoho you will need to embed the records type in a struct in your own package, and override the field with a field that has a json tag that does not contain 'omitempty'. eg.

type struct Candidate {
    zohorecruit.Candidate
    CustomField string `json:"Custom_Field"`
 }

func (*API) XMLSearchJobOpenings

func (c *API) XMLSearchJobOpenings(params map[string]zoho.Parameter) (data JobOpeningsResponse, err error)

============================== ABANDONED DUE TO ZOHO API v1 not properly working ============================== https://help.zoho.com/portal/en/kb/recruit/developer-guide/api-methods/articles/getsearchrecords

type AddTagsResponse

type AddTagsResponse struct {
	Data []struct {
		Code    string `json:"code"`
		Details struct {
			ID   int64    `json:"id"`
			Tags []string `json:"tags"`
		} `json:"details"`
		Message string `json:"message"`
		Status  string `json:"status"`
	} `json:"data"`
}

type AllMetadataResponse

type AllMetadataResponse struct {
	Modules []struct {
		Convertable   bool   `json:"convertable,omitempty"`
		Editable      bool   `json:"editable,omitempty"`
		Deletable     bool   `json:"deletable,omitempty"`
		WebLink       string `json:"web_link,omitempty"`
		SingularLabel string `json:"singular_label,omitempty"`
		ModifiedTime  Time   `json:"modified_time,omitempty"`
		Viewable      bool   `json:"viewable,omitempty"`
		APISupported  bool   `json:"api_supported,omitempty"`
		Createable    bool   `json:"createable,omitempty"`
		PluralLabel   string `json:"plural_label,omitempty"`
		APIName       string `json:"api_name,omitempty"`
		ModifiedBy    string `json:"modified_by,omitempty"`
		GeneratedType string `json:"generated_type,omitempty"`
		ID            string `json:"id,omitempty"`
		ModuleName    string `json:"module_name,omitempty"`
	} `json:"modules,omitempty"`
}

type AssociateCandidatesRequest

type AssociateCandidatesRequest struct {
	Data []AssociateCandidatesResponseData `json:"data"`
}

type AssociateCandidatesResponse

type AssociateCandidatesResponse struct {
	Data []struct {
		Code    string `json:"code"`
		Details struct {
			Jobid string `json:"jobid"`
			Ids   string `json:"ids"`
			Error []struct {
				Code    string `json:"code"`
				Details struct {
					ID string `json:"id"`
				} `json:"details"`
				Message string `json:"message"`
				Status  string `json:"status"`
			} `json:"error"`
		} `json:"details"`
		Message string `json:"message"`
		Status  string `json:"status"`
	} `json:"data"`
}

type AssociateCandidatesResponseData

type AssociateCandidatesResponseData struct {
	Jobids   []string `json:"jobids"`
	Ids      []string `json:"ids"`
	Comments string   `json:"comments"`
}

type AssociateRecordsResponse

type AssociateRecordsResponse struct {
	Data []struct {
		Salary         interface{} `json:"Salary"`
		CurrencySymbol string      `json:"$currency_symbol"`
		AccountManager struct {
			Name string `json:"name"`
			ID   string `json:"id"`
		} `json:"Account_Manager"`
		NoOfCandidatesHired int       `json:"No_of_Candidates_Hired"`
		TargetDate          string    `json:"Target_Date"`
		LastActivityTime    time.Time `json:"Last_Activity_Time"`
		Industry            string    `json:"Industry"`
		ModifiedBy          struct {
			Name string `json:"name"`
			ID   string `json:"id"`
		} `json:"Modified_By"`
		ProcessFlow     bool        `json:"$process_flow"`
		ExpectedRevenue interface{} `json:"Expected_Revenue"`
		IsHotJobOpening bool        `json:"Is_Hot_Job_Opening"`
		AccountName     struct {
			Name string `json:"name"`
			ID   string `json:"id"`
		} `json:"Account_Name"`
		ZipCode       interface{} `json:"Zip_Code"`
		ID            string      `json:"id"`
		Skillset      string      `json:"Skillset"`
		Approved      bool        `json:"$approved"`
		Publish       bool        `json:"Publish"`
		DateOpened    string      `json:"Date_Opened"`
		PotentialName string      `json:"Potential_Name"`
		Approval      struct {
			Delegate bool `json:"delegate"`
			Approve  bool `json:"approve"`
			Reject   bool `json:"reject"`
			Resubmit bool `json:"resubmit"`
		} `json:"$approval"`
		ModifiedTime             time.Time     `json:"Modified_Time"`
		ActualRevenue            interface{}   `json:"Actual_Revenue"`
		CreatedTime              time.Time     `json:"Created_Time"`
		Followed                 bool          `json:"$followed"`
		NoOfCandidatesAssociated int           `json:"No_of_Candidates_Associated"`
		Editable                 bool          `json:"$editable"`
		IsLocked                 bool          `json:"Is_Locked"`
		City                     interface{}   `json:"City"`
		JobOpeningStatus         string        `json:"Job_Opening_Status"`
		RevenuePerPosition       int           `json:"Revenue_per_Position"`
		ContactName              interface{}   `json:"Contact_Name"`
		AssociatedTags           []interface{} `json:"Associated_Tags"`
		AssignedRecruiter        []interface{} `json:"Assigned_Recruiter"`
		MissedRevenue            interface{}   `json:"Missed_Revenue"`
		JobOpeningID             string        `json:"Job_Opening_ID"`
		JobDescription           string        `json:"Job_Description"`
		WorkExperience           interface{}   `json:"Work_Experience"`
		JobType                  string        `json:"Job_Type"`
		State                    interface{}   `json:"State"`
		NumberOfPositions        string        `json:"Number_of_Positions"`
		Country                  interface{}   `json:"Country"`
		CreatedBy                struct {
			Name string `json:"name"`
			ID   string `json:"id"`
		} `json:"Created_By"`
		IsAttachmentPresent bool `json:"Is_Attachment_Present"`
	} `json:"data"`
	Info PageInfo `json:"info,omitempty"`
}

type AssociatedCandidatesResponse

type AssociatedCandidatesResponse struct {
	Data []struct {
		Origin                   string      `json:"Origin"`
		Email                    string      `json:"Email"`
		CurrencySymbol           string      `json:"$currency_symbol"`
		LastActivityTime         time.Time   `json:"Last_Activity_Time"`
		HighestQualificationHeld interface{} `json:"Highest_Qualification_Held"`
		SkillSet                 interface{} `json:"Skill_Set"`
		Converted                bool        `json:"$converted"`
		ProcessFlow              bool        `json:"$process_flow"`
		UpdatedOn                time.Time   `json:"Updated_On"`
		CurrentEmployer          string      `json:"Current_Employer"`
		Street                   interface{} `json:"Street"`
		ZipCode                  interface{} `json:"Zip_Code"`
		ID                       string      `json:"id"`
		ExperienceInYears        int         `json:"Experience_in_Years"`
		Approved                 bool        `json:"$approved"`
		Approval                 struct {
			Delegate bool `json:"delegate"`
			Approve  bool `json:"approve"`
			Reject   bool `json:"reject"`
			Resubmit bool `json:"resubmit"`
		} `json:"$approval"`
		CandidateStatus string      `json:"Candidate_Status"`
		CandidateID     string      `json:"Candidate_ID"`
		LastMailedTime  interface{} `json:"Last_Mailed_Time"`
		CreatedTime     time.Time   `json:"Created_Time"`
		Followed        bool        `json:"$followed"`
		CandidateOwner  struct {
			Name string `json:"name"`
			ID   string `json:"id"`
		} `json:"Candidate_Owner"`
		Editable       bool          `json:"$editable"`
		IsLocked       bool          `json:"Is_Locked"`
		City           string        `json:"City"`
		IsUnqualified  bool          `json:"Is_Unqualified"`
		AssociatedTags []interface{} `json:"Associated_Tags"`
		AdditionalInfo interface{}   `json:"Additional_Info"`
		State          interface{}   `json:"State"`
		Country        interface{}   `json:"Country"`
		CreatedBy      struct {
			Name string `json:"name"`
			ID   string `json:"id"`
		} `json:"Created_By"`
		SecondaryEmail      interface{} `json:"Secondary_Email"`
		IsAttachmentPresent bool        `json:"Is_Attachment_Present"`
		Rating              interface{} `json:"Rating"`
		AppliedWithLinkedin interface{} `json:"$applied_with_linkedin"`
		Website             interface{} `json:"Website"`
		Twitter             interface{} `json:"Twitter"`
		CurrentJobTitle     string      `json:"Current_Job_Title"`
		Salutation          interface{} `json:"Salutation"`
		Source              string      `json:"Source"`
		FirstName           string      `json:"First_Name"`
		FullName            string      `json:"Full_Name"`
		ModifiedBy          struct {
			Name string `json:"name"`
			ID   string `json:"id"`
		} `json:"Modified_By"`
		SkypeID         interface{} `json:"Skype_ID"`
		Phone           interface{} `json:"Phone"`
		EmailOptOut     bool        `json:"Email_Opt_Out"`
		ConvertedDetail struct {
		} `json:"$converted_detail"`
		CareerPageInviteStatus      string      `json:"Career_Page_Invite_Status"`
		Mobile                      string      `json:"Mobile"`
		LastName                    string      `json:"Last_Name"`
		CurrentSalary               interface{} `json:"Current_Salary"`
		AssociatedAnySocialProfiles interface{} `json:"Associated_any_Social_Profiles"`
		Fax                         interface{} `json:"Fax"`
		ExpectedSalary              interface{} `json:"Expected_Salary"`
	} `json:"data"`
	Info PageInfo `json:"info,omitempty"`
}

type AttachmentCategory

type AttachmentCategory string
const (
	Contracts        AttachmentCategory = "Contracts"
	Cover_Letter     AttachmentCategory = "Cover_Letter"
	Formatted_Resume AttachmentCategory = "Formatted_Resume"
	Offer            AttachmentCategory = "Offer"
	Others           AttachmentCategory = "Others"
	Resume           AttachmentCategory = "Resume"
)

type AutoNumber

type AutoNumber string

type CandidateRelatedRecordsResponse

type CandidateRelatedRecordsResponse struct {
	Data []struct {
		AttachType struct {
			Name string `json:"name"`
			ID   string `json:"id"`
		} `json:"$attach_type"`
		ModifiedTime    time.Time `json:"Modified_Time"`
		FileName        string    `json:"File_Name"`
		Size            string    `json:"Size"`
		CreatedTime     time.Time `json:"Created_Time"`
		LinkDocs        int       `json:"$link_docs"`
		ParentID        string    `json:"Parent_Id"`
		Editable        bool      `json:"$editable"`
		AttachmentOwner struct {
			Name string `json:"name"`
			ID   string `json:"id"`
		} `json:"Attachment_Owner"`
		FileID     string `json:"$file_id"`
		Type       string `json:"$type"`
		SeModule   string `json:"$se_module"`
		ModifiedBy struct {
			Name string `json:"name"`
			ID   string `json:"id"`
		} `json:"Modified_By"`
		ID        string `json:"id"`
		CreatedBy struct {
			Name string `json:"name"`
			ID   string `json:"id"`
		} `json:"Created_By"`
		LinkURL interface{} `json:"$link_url"`
	} `json:"data"`
	Info PageInfo `json:"info,omitempty"`
}

type CandidateRequestData

type CandidateRequestData struct {
	CandidateId       string `json:"CandidateId,omitempty"`
	ApplicationDate   string `json:"ApplicationDate,omitempty"`
	FirstName         string `json:"First_Name,omitempty"`
	LastName          string `json:"Last_Name,omitempty"`
	City              string `json:"City,omitempty"`
	Email             string `json:"Email,omitempty"`
	Mobile            string `json:"Mobile,omitempty"`
	Street            string `json:"Street,omitempty"`
	CurrentEmployer   string `json:"Current_Employer,omitempty"`
	CurrentJobTitle   string `json:"Current_Job_Title,omitempty"`
	ExpectedSalary    string `json:"Expected_Salary,omitempty"`
	CurrencySymbol    string `json:"$currency_symbol,omitempty"`
	ExperienceInYears string `json:"Experience_in_Years,omitempty"`
	CandidateStatus   string `json:"Candidate_Status,omitempty"`
	Source            string `json:"Source,omitempty"`
}

type CandidatesResponse

type CandidatesResponse struct {
	Data []struct {
		Origin                   string `json:"Origin,omitempty"`
		Email                    string `json:"Email,omitempty"`
		CurrencySymbol           string `json:"$currency_symbol,omitempty"`
		Last_Activity_Time       Time   `json:"Last_Activity_Time,omitempty"`
		HighestQualificationHeld string `json:"Highest_Qualification_Held,omitempty"`
		SkillSet                 string `json:"Skill_Set,omitempty"`
		Converted                bool   `json:"$converted,omitempty"`
		ProcessFlow              bool   `json:"$process_flow,omitempty"`
		Updated_On               Time   `json:"Updated_On,omitempty"`
		CurrentEmployer          string `json:"Current_Employer,omitempty"`
		Street                   string `json:"Street,omitempty"`
		ZipCode                  string `json:"Zip_Code,omitempty"`
		ID                       string `json:"id,omitempty"`
		ExperienceInYears        int    `json:"Experience_in_Years,omitempty"`
		Approved                 bool   `json:"$approved,omitempty"`
		Approval                 struct {
			Delegate bool `json:"delegate,omitempty"`
			Approve  bool `json:"approve,omitempty"`
			Reject   bool `json:"reject,omitempty"`
			Resubmit bool `json:"resubmit,omitempty"`
		} `json:"$approval,omitempty"`
		CandidateStatus string `json:"Candidate_Status,omitempty"`
		CandidateID     string `json:"Candidate_ID,omitempty"`
		LastMailedTime  Time   `json:"Last_Mailed_Time,omitempty"`
		CreatedTime     string `json:"Created_Time,omitempty"`
		Followed        string `json:"followed,omitempty"`
		CandidateOwner  struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Candidate_Owner,omitempty"`
		Editable       bool       `json:"$editable,omitempty"`
		IsLocked       bool       `json:"Is_Locked,omitempty"`
		City           string     `json:"City,omitempty"`
		IsUnqualified  bool       `json:"Is_Unqualified,omitempty"`
		AssociatedTags []struct{} `json:"Associated_Tags,omitempty"`
		AdditionalInfo string     `json:"Additional_Info,omitempty"`
		State          string     `json:"State,omitempty"`
		Country        string     `json:"Country,omitempty"`
		CreatedBy      struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Created_By,omitempty"`
		SecondaryEmail      string `json:"Secondary_Email,omitempty"`
		IsAttachmentPresent bool   `json:"Is_Attachment_Present,omitempty"`
		Rating              int    `json:"Rating,omitempty"`
		AppliedWithLinkedin string `json:"$applied_with_linkedin,omitempty"`
		Website             string `json:"Website,omitempty"`
		Twitter             string `json:"Twitter,omitempty"`
		CurrentJobTitle     string `json:"Current_Job_Title,omitempty"`
		Salutation          string `json:"Salutation,omitempty"`
		Source              string `json:"Source,omitempty"`
		FirstName           string `json:"First_Name,omitempty"`
		FullName            string `json:"Full_Name,omitempty"`
		ModifiedBy          struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Modified_By,omitempty"`
		SkypeID                     string   `json:"Skype_ID,omitempty"`
		Phone                       string   `json:"Phone,omitempty"`
		Email_Opt_Out               bool     `json:"Email_Opt_Out,omitempty"`
		IsStatusSplitDone           bool     `json:"isStatusSplitDone,omitempty"`
		ConvertedDetail             struct{} `json:"#converted_detail,omitempty"`
		CareerPageInviteStatus      string   `json:"Career_Page_Invite_Status,omitempty"`
		Mobile                      string   `json:"Mobile,omitempty"`
		LastName                    string   `json:"Last_Name,omitempty"`
		CurrentSalary               string   `json:"Current_Salary,omitempty"`
		AssociatedAnySocialProfiles bool     `json:"Associated_any_Social_Profiles,omitempty"`
		Fax                         string   `json:"Fax,omitempty"`
		ExpectedSalary              string   `json:"Expected_Salary,omitempty"`
	} `json:"data,omitempty"`
	Info PageInfo `json:"info,omitempty"`
}

type Checkbox

type Checkbox bool

type ClientsRecordsResponse

type ClientsRecordsResponse struct {
	Data []struct {
		ClientName     string `json:"Client_Name,omitempty"`
		CurrencySymbol string `json:"$currency_symbol,omitempty"`
		ShippingState  string `json:"Shipping_State,omitempty"`
		Website        string `json:"Website,omitempty"`
		AccountManager struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Account_Manager,omitempty"`
		Source           string `json:"Source,omitempty"`
		LastActivityTime Time   `json:"Last_Activity_Time,omitempty"`
		Industry         string `json:"Industry,omitempty"`
		ModifiedBy       struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Modified_By,omitempty"`
		ProcessFlow    bool   `json:"$process_flow,omitempty"`
		BillingCountry string `json:"Billing_Country,omitempty"`
		ContactNumber  string `json:"Contact_Number,omitempty"`
		ID             string `json:"id,omitempty"`
		Approved       bool   `json:"$approved,omitempty"`
		Approval       struct {
			Delegate bool `json:"delegate,omitempty"`
			Approve  bool `json:"approve,omitempty"`
			Reject   bool `json:"reject,omitempty"`
			Resubmit bool `json:"resubmit,omitempty"`
		} `json:"$approval,omitempty"`
		IsStatusSplitDone bool       `json:"isStatusSplitDone,omitempty"`
		ModifiedTime      Time       `json:"Modified_Time,omitempty"`
		BillingStreet     string     `json:"Billing_Street,omitempty"`
		LastMailedTime    string     `json:"Last_Mailed_Time,omitempty"`
		CreatedTime       Time       `json:"Created_Time,omitempty"`
		Followed          bool       `json:"$followed,omitempty"`
		Editable          bool       `json:"$editable,omitempty"`
		BillingCode       string     `json:"Billing_Code,omitempty"`
		ParentAccount     string     `json:"Parent_Account,omitempty"`
		About             string     `json:"About,omitempty"`
		AssociatedTags    []struct{} `json:"Associated_Tags,omitempty"`
		ShippingCity      string     `json:"Shipping_City,omitempty"`
		ShippingCountry   string     `json:"Shipping_Country,omitempty"`
		ShippingCode      string     `json:"Shipping_Code,omitempty"`
		BillingCity       string     `json:"Billing_City,omitempty"`
		BillingState      string     `json:"Billing_State,omitempty"`
		CreatedBy         struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Created_By,omitempty"`
		Fax                 string `json:"Fax,omitempty"`
		IsAttachmentPresent bool   `json:"Is_Attachment_Present,omitempty"`
		ShippingStreet      string `json:"Shipping_Street,omitempty"`
	} `json:"data,omitempty"`
	Info PageInfo `json:"info,omitempty"`
}

ClientsRecordsResponse is the data returned by GetClientsRecords & GetClientsRecordById

type ContactsRecordsResponse

type ContactsRecordsResponse struct {
	Data []struct {
		Salary     string `json:"Salary,omitempty"`
		ClientName struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Client_Name,omitempty"`
		Email            string `json:"Email,omitempty"`
		CurrencySymbol   string `json:"$currency_symbol,omitempty"`
		MailingZip       string `json:"Mailing_Zip,omitempty"`
		IsPrimaryContact bool   `json:"Is_primary_contact,omitempty"`
		MailingState     string `json:"Mailing_State,omitempty"`
		Twitter          string `json:"Twitter,omitempty"`
		OtherZip         string `json:"Other_Zip,omitempty"`
		MailingStreet    string `json:"Mailing_Street,omitempty"`
		OtherState       string `json:"Other_State,omitempty"`
		Salutation       string `json:"Salutation,omitempty"`
		OtherCountry     string `json:"Other_Country,omitempty"`
		Source           string `json:"Source,omitempty"`
		LastActivityTime Time   `json:"Last_Activity_Time,omitempty"`
		FirstName        string `json:"First_Name,omitempty"`
		FullName         string `json:"Full_Name,omitempty"`
		Department       string `json:"Department,omitempty"`
		ModifiedBy       struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Modified_By,omitempty"`
		SkypeID        string `json:"Skype_ID,omitempty"`
		ProcessFlow    bool   `json:"$process_flow,omitempty"`
		WorkPhone      string `json:"Work_Phone,omitempty"`
		MailingCountry string `json:"Mailing_Country,omitempty"`
		ID             string `json:"id,omitempty"`
		EmailOptOut    bool   `json:"Email_Opt_Out,omitempty"`
		Approved       bool   `json:"$approved,omitempty"`
		Approval       struct {
			Delegate bool `json:"delegate,omitempty"`
			Approve  bool `json:"approve,omitempty"`
			Reject   bool `json:"reject,omitempty"`
			Resubmit bool `json:"resubmit,omitempty"`
		} `json:"$approval,omitempty"`
		IsStatusSplitDone      bool       `json:"isStatusSplitDone,omitempty"`
		ModifiedTime           Time       `json:"Modified_Time,omitempty"`
		MailingCity            string     `json:"Mailing_City,omitempty"`
		LastMailedTime         string     `json:"Last_Mailed_Time,omitempty"`
		OtherCity              string     `json:"Other_City,omitempty"`
		CreatedTime            Time       `json:"Created_Time,omitempty"`
		ClientPortalUserStatus string     `json:"Client_Portal_User_Status,omitempty"`
		Followed               bool       `json:"$followed,omitempty"`
		Editable               bool       `json:"$editable,omitempty"`
		OtherStreet            string     `json:"Other_Street,omitempty"`
		JobTitle               string     `json:"Job_Title,omitempty"`
		Mobile                 string     `json:"Mobile,omitempty"`
		AssociatedTags         []struct{} `json:"Associated_Tags,omitempty"`
		ContactOwner           struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Contact_Owner,omitempty"`
		LastName                    string `json:"Last_Name,omitempty"`
		AssociatedAnySocialProfiles bool   `json:"Associated_any_Social_Profiles,omitempty"`
		CreatedBy                   struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Created_By,omitempty"`
		Fax                 string `json:"Fax,omitempty"`
		SecondaryEmail      string `json:"Secondary_Email,omitempty"`
		IsAttachmentPresent bool   `json:"Is_Attachment_Present,omitempty"`
	} `json:"data,omitempty"`
	Info PageInfo `json:"info,omitempty"`
}

ContactsRecordsResponse is the data returned by GetContactsRecords & GetContactsRecordById

type CreateTagsRequest

type CreateTagsRequest struct {
	Tags []Tags `json:"tags"`
}

type CreateTagsResponse

type CreateTagsResponse struct {
	Tags []struct {
		Code    string `json:"code"`
		Details struct {
			CreatedTime  time.Time `json:"created_time"`
			ModifiedTime time.Time `json:"modified_time"`
			ModifiedBy   struct {
				Name string `json:"name"`
				ID   string `json:"id"`
			} `json:"modified_by"`
			ID        string `json:"id"`
			CreatedBy struct {
				Name string `json:"name"`
				ID   string `json:"id"`
			} `json:"created_by"`
		} `json:"details"`
		Message string `json:"message"`
		Status  string `json:"status"`
	} `json:"tags"`
}

type Currency

type Currency float64

type CustomViewsMetadataResponse

type CustomViewsMetadataResponse struct {
	CustomViews []struct {
		DisplayValue  string      `json:"display_value"`
		SharedType    interface{} `json:"shared_type"`
		Criteria      interface{} `json:"criteria"`
		SystemName    string      `json:"system_name"`
		SharedDetails interface{} `json:"shared_details"`
		SortBy        string      `json:"sort_by"`
		Offline       bool        `json:"offline"`
		Default       bool        `json:"default"`
		SystemDefined bool        `json:"system_defined"`
		Name          string      `json:"name"`
		ID            string      `json:"id"`
		Category      string      `json:"category"`
		Fields        []string    `json:"fields"`
		Favorite      interface{} `json:"favorite"`
		SortOrder     string      `json:"sort_order"`
		IsSearch      bool        `json:"is_search"`
	} `json:"custom_views"`
}

type Date

type Date = zoho.Date

type Decimal

type Decimal float64

type DeleteCandidateResponse

type DeleteCandidateResponse struct {
	Data []struct {
		Code    string `json:"code"`
		Details struct {
			ID string `json:"id"`
		} `json:"details"`
		Message string `json:"message"`
		Status  string `json:"status"`
	} `json:"data"`
}

type DeleteTagResponse

type DeleteTagResponse struct {
	Tags struct {
		Code    string `json:"code"`
		Details struct {
			ID int64 `json:"id"`
		} `json:"details"`
		Message string `json:"message"`
		Status  string `json:"status"`
	} `json:"tags"`
}

type DeletedCandidatesResponse

type DeletedCandidatesResponse struct {
	Data []struct {
		DeletedBy struct {
			Name string `json:"id,omitempty"`
			ID   string `json:"id2,omitempty"`
		} `json:"deleted_by,omitempty"`
		ID          string `json:"id,omitempty"`
		DisplayName string `json:"display_name,omitempty"`
		Type        string `json:"type,omitempty"`
		CreatedBy   struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"created_by,omitempty"`
		DeletedTime Time `json:"deleted_time,omitempty"`
	} `json:"data,omitempty"`
	Info PageInfo `json:"info,omitempty"`
}

type Email

type Email string

Email is the field type in Zoho that defines an email address field

func (Email) MarshalJSON

func (s Email) MarshalJSON() ([]byte, error)

func (*Email) UnmarshalJSON

func (s *Email) UnmarshalJSON(data []byte) error

type Error

type Error struct {
	Code    string   `json:"code,omitempty"`
	Details struct{} `json:"details,omitempty"`
	Message string   `json:"message,omitempty"`
	Status  string   `json:"status,omitempty"`
}

type FieldsMetadataResponse

type FieldsMetadataResponse struct {
	Fields []struct {
		SystemMandatory       bool        `json:"system_mandatory"`
		Webhook               bool        `json:"webhook"`
		JSONType              string      `json:"json_type"`
		FieldLabel            string      `json:"field_label"`
		Tooltip               interface{} `json:"tooltip"`
		CreatedSource         string      `json:"created_source"`
		FieldReadOnly         bool        `json:"field_read_only"`
		DisplayLabel          string      `json:"display_label"`
		ReadOnly              bool        `json:"read_only"`
		BusinesscardSupported bool        `json:"businesscard_supported"`
		Currency              struct {
		} `json:"currency"`
		ID          string `json:"id"`
		CustomField bool   `json:"custom_field"`
		Lookup      struct {
		} `json:"lookup"`
		ConvertMapping struct {
			Potentials interface{} `json:"Potentials"`
			Contacts   interface{} `json:"Contacts"`
			Accounts   interface{} `json:"Accounts"`
		} `json:"convert_mapping"`
		Visible  bool `json:"visible"`
		Length   int  `json:"length"`
		ViewType struct {
			View        bool `json:"view"`
			Edit        bool `json:"edit"`
			QuickCreate bool `json:"quick_create"`
			Create      bool `json:"create"`
		} `json:"view_type"`
		APIName string `json:"api_name"`
		Unique  struct {
		} `json:"unique"`
		DataType string `json:"data_type"`
		Formula  struct {
		} `json:"formula"`
		DecimalPlace       interface{}   `json:"decimal_place"`
		MassUpdate         bool          `json:"mass_update"`
		BlueprintSupported bool          `json:"blueprint_supported"`
		PickListValues     []interface{} `json:"pick_list_values"`
		AutoNumber         struct {
		} `json:"auto_number"`
	} `json:"fields"`
}

type InsertCandidateRequest

type InsertCandidateRequest struct {
	Data    []CandidateRequestData `json:"data"`
	Trigger []string               `json:"trigger"`
}

type InsertCandidateResponse

type InsertCandidateResponse struct {
	Data []struct {
		Code    string `json:"code"`
		Details struct {
			ModifiedTime time.Time `json:"Modified_Time"`
			ModifiedBy   struct {
				Name string `json:"name"`
				ID   string `json:"id"`
			} `json:"Modified_By"`
			CreatedTime time.Time `json:"Created_Time"`
			ID          string    `json:"id"`
			CreatedBy   struct {
				Name string `json:"name"`
				ID   string `json:"id"`
			} `json:"Created_By"`
		} `json:"details"`
		Message string `json:"message"`
		Status  string `json:"status"`
	} `json:"data"`
}

type InsertCandidatesData

type InsertCandidatesData struct {
	Origin                   string    `json:"Origin"`
	Email                    string    `json:"Email"`
	CurrencySymbol           string    `json:"$currency_symbol"`
	LastActivityTime         time.Time `json:"Last_Activity_Time"`
	HighestQualificationHeld string    `json:"Highest_Qualification_Held"`
	SkillSet                 string    `json:"Skill_Set"`
	Converted                bool      `json:"$converted"`
	ProcessFlow              bool      `json:"$process_flow"`
	UpdatedOn                time.Time `json:"Updated_On"`
	CurrentEmployer          string    `json:"Current_Employer"`
	Street                   string    `json:"Street"`
	ZipCode                  string    `json:"Zip_Code"`
	ID                       string    `json:"id"`
	ExperienceInYears        int       `json:"Experience_in_Years"`
	Approved                 bool      `json:"$approved"`
	Approval                 struct {
		Delegate bool `json:"delegate"`
		Approve  bool `json:"approve"`
		Reject   bool `json:"reject"`
		Resubmit bool `json:"resubmit"`
	} `json:"$approval"`
	CandidateStatus string      `json:"Candidate_Status"`
	CandidateID     string      `json:"Candidate_ID"`
	LastMailedTime  interface{} `json:"Last_Mailed_Time"`
	CreatedTime     time.Time   `json:"Created_Time"`
	Followed        bool        `json:"$followed"`
	CandidateOwner  struct {
		Name string `json:"name"`
		ID   string `json:"id"`
	} `json:"Candidate_Owner"`
	Editable       bool          `json:"$editable"`
	IsLocked       bool          `json:"Is_Locked"`
	City           string        `json:"City"`
	IsUnqualified  bool          `json:"Is_Unqualified"`
	AssociatedTags []interface{} `json:"Associated_Tags"`
	AdditionalInfo string        `json:"Additional_Info"`
	State          string        `json:"State"`
	Country        string        `json:"Country"`
	CreatedBy      struct {
		Name string `json:"name"`
		ID   string `json:"id"`
	} `json:"Created_By"`
	SecondaryEmail      string      `json:"Secondary_Email"`
	IsAttachmentPresent bool        `json:"Is_Attachment_Present"`
	Rating              int         `json:"Rating"`
	AppliedWithLinkedin interface{} `json:"$applied_with_linkedin"`
	Website             string      `json:"Website"`
	Twitter             string      `json:"Twitter"`
	CurrentJobTitle     string      `json:"Current_Job_Title"`
	Salutation          string      `json:"Salutation"`
	Source              string      `json:"Source"`
	FirstName           string      `json:"First_Name"`
	FullName            string      `json:"Full_Name"`
	ModifiedBy          struct {
		Name string `json:"name"`
		ID   string `json:"id"`
	} `json:"Modified_By"`
	SkypeID            string        `json:"Skype_ID"`
	ExperienceDetails  []interface{} `json:"Experience_Details"`
	Phone              string        `json:"Phone"`
	EmailOptOut        bool          `json:"Email_Opt_Out"`
	EducationalDetails []interface{} `json:"Educational_Details"`
	ConvertedDetail    struct {
	} `json:"$converted_detail"`
	CareerPageInviteStatus      string      `json:"Career_Page_Invite_Status"`
	Mobile                      string      `json:"Mobile"`
	LastName                    string      `json:"Last_Name"`
	CurrentSalary               interface{} `json:"Current_Salary"`
	AssociatedAnySocialProfiles bool        `json:"Associated_any_Social_Profiles"`
	Fax                         string      `json:"Fax"`
	ExpectedSalary              interface{} `json:"Expected_Salary"`
}

type InsertRecords

type InsertRecords struct {
	Data    interface{} `json:"data,omitempty"`
	Trigger []string    `json:"trigger,omitempty"`
}

type InsertRecordsResponse

type InsertRecordsResponse struct {
	Data []InsertRecordsResponseData `json:"data,omitempty"`
}

type InsertRecordsResponseData

type InsertRecordsResponseData struct {
	Message string `json:"message,omitempty"`
	Details struct {
		CreatedBy struct {
			ID   string `json:"id,omitempty"`
			Name string `json:"name,omitempty"`
		} `json:"created_by,omitempty"`
		ID         string `json:"id,omitempty"`
		ModifiedBy struct {
			ID   string `json:"id,omitempty"`
			Name string `json:"name,omitempty"`
		} `json:"modified_by,omitempty"`
		ModifiedTime time.Time `json:"modified_time,omitempty"`
		CreatedTime  time.Time `json:"created_time,omitempty"`
	} `json:"details,omitempty"`
	Status string `json:"status,omitempty"`
	Code   string `json:"code,omitempty"`
}

type InterviewsRecordsResponse

type InterviewsRecordsResponse struct {
	Data []struct {
		ClientName struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Client_Name,omitempty"`
		CurrencySymbol           string    `json:"$currency_symbol,omitempty"`
		VideoInterviewIsReviewed bool      `json:"$video_interview_isreviewed,omitempty"`
		StartDateTime            time.Time `json:"Start_DateTime,omitempty"`
		InterviewDuration        struct {
			Mins int `json:"mins,omitempty"`
			Hrs  int `json:"hrs,omitempty"`
			Days int `json:"days,omitempty"`
		} `json:"$interview_duration,omitempty"`
		InterviewEvaluationDone   bool `json:"$interview_evaluationdone,omitempty"`
		EndDateTime               Time `json:"End_DateTime,omitempty"`
		LastActivityTime          Time `json:"Last_Activity_Time,omitempty"`
		InterviewEnableEvaluation bool `json:"$interview_enableevaluation,omitempty"`
		ModifiedBy                struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Modified_By,omitempty"`
		CandidateName struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Candidate_Name,omitempty"`
		ProcessFlow    bool `json:"$process_flow,omitempty"`
		InterviewOwner struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Interview_Owner,omitempty"`
		Feedback         string `json:"Feedback,omitempty"`
		ScheduleComments string `json:"Schedule_Comments,omitempty"`
		InterviewType    int    `json:"$interview_type,omitempty"`
		ReviewedBy       string `json:"Reviewed_By,omitempty"`
		ID               string `json:"id,omitempty"`
		Approved         bool   `json:"$approved,omitempty"`
		Approval         struct {
			Delegate bool `json:"delegate,omitempty"`
			Approve  bool `json:"approve,omitempty"`
			Reject   bool `json:"reject,omitempty"`
			Resubmit bool `json:"resubmit,omitempty"`
		} `json:"$approval,omitempty"`
		IsStatusSplitDone bool       `json:"isStatusSplitDone,omitempty"`
		ModifiedTime      Time       `json:"Modified_Time,omitempty"`
		Venue             string     `json:"Venue,omitempty"`
		CreatedTime       Time       `json:"Created_Time,omitempty"`
		Followed          bool       `json:"$followed,omitempty"`
		Taxable           bool       `json:"$taxable,omitempty"`
		Editable          bool       `json:"$editable,omitempty"`
		IsLocked          bool       `json:"Is_Locked,omitempty"`
		InterviewName     string     `json:"Interview_Name,omitempty"`
		QuestionnaireName string     `json:"Questionnaire_Name,omitempty"`
		AssociatedTags    []struct{} `json:"Associated_Tags,omitempty"`
		InterviewStatus   string     `json:"Interview_Status,omitempty"`
		JobOpeningName    struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Job_Opening_Name,omitempty"`
		ReviewedTime string `json:"Reviewed_Time,omitempty"`
		Interviewer  []struct {
			Name     string `json:"name,omitempty"`
			ID       string `json:"id,omitempty"`
			Email    string `json:"email,omitempty"`
			PhotoSrc string `json:"photoSrc,omitempty"`
		} `json:"Interviewer,omitempty"`
		Created_By struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Created_By,omitempty"`
		IsAttachmentPresent       bool     `json:"Is_Attachment_Present,omitempty"`
		InterviewTimeTillReview   struct{} `json:"$interview_timetillreview,omitempty"`
		VideoInterviewIsSubmitted bool     `json:"video_interview_issubmitted,omitempty"`
	} `json:"data,omitempty"`
	Info PageInfo `json:"info,omitempty"`
}

InterviewsRecordsResponse is the data returned by GetInterviewsRecords & GetInterviewsRecordById

type JobOpening

type JobOpening struct {
	ClientName struct {
		Name string `json:"name,omitempty"`
		ID   string `json:"id,omitempty"`
	} `json:"Client_Name,omitempty"`
	Salary         interface{} `json:"Salary,omitempty"`
	CurrencySymbol string      `json:"$currency_symbol,omitempty"`
	AccountManager struct {
		Name string `json:"name,omitempty"`
		ID   string `json:"id,omitempty"`
	} `json:"Account_Manager,omitempty"`
	NoOfCandidatesHired int       `json:"No_of_Candidates_Hired,omitempty"`
	TargetDate          string    `json:"Target_Date,omitempty"`
	LastActivityTime    time.Time `json:"Last_Activity_Time,omitempty"`
	Industry            string    `json:"Industry,omitempty"`
	ModifiedBy          struct {
		Name string `json:"name,omitempty"`
		ID   string `json:"id,omitempty"`
	} `json:"Modified_By,omitempty"`
	ProcessFlow     bool   `json:"$process_flow,omitempty"`
	ExpectedRevenue int    `json:"Expected_Revenue,omitempty"`
	IsHotJobOpening bool   `json:"Is_Hot_Job_Opening,omitempty"`
	ZipCode         string `json:"Zip_Code,omitempty"`
	ID              string `json:"id,omitempty"`
	Approved        bool   `json:"$approved,omitempty"`
	Publish         bool   `json:"Publish,omitempty"`
	DateOpened      string `json:"Date_Opened,omitempty"`
	Approval        struct {
		Delegate bool `json:"delegate,omitempty"`
		Approve  bool `json:"approve,omitempty"`
		Reject   bool `json:"reject,omitempty"`
		Resubmit bool `json:"resubmit,omitempty"`
	} `json:"$approval,omitempty"`
	ModifiedTime             time.Time   `json:"Modified_Time,omitempty"`
	ActualRevenue            interface{} `json:"Actual_Revenue,omitempty"`
	RemoteJob                bool        `json:"Remote_Job,omitempty"`
	CreatedTime              time.Time   `json:"Created_Time,omitempty"`
	Followed                 bool        `json:"$followed,omitempty"`
	NoOfCandidatesAssociated int         `json:"No_of_Candidates_Associated,omitempty"`
	Editable                 bool        `json:"$editable,omitempty"`
	IsLocked                 bool        `json:"Is_Locked,omitempty"`
	City                     string      `json:"City,omitempty"`
	JobOpeningStatus         string      `json:"Job_Opening_Status,omitempty"`
	RevenuePerPosition       int         `json:"Revenue_per_Position,omitempty"`
	ContactName              struct {
		Name string `json:"name,omitempty"`
		ID   string `json:"id,omitempty"`
	} `json:"Contact_Name,omitempty"`
	AssociatedTags []struct {
		Name string `json:"name,omitempty"`
		ID   string `json:"id,omitempty"`
	} `json:"Associated_Tags,omitempty"`
	AssignedRecruiter []struct {
		Name     string `json:"name,omitempty"`
		ID       string `json:"id,omitempty"`
		Email    string `json:"email,omitempty"`
		PhotoSrc string `json:"photoSrc,omitempty"`
	} `json:"Assigned_Recruiter,omitempty"`
	MissedRevenue     interface{} `json:"Missed_Revenue,omitempty"`
	JobOpeningID      string      `json:"Job_Opening_ID,omitempty"`
	JobDescription    string      `json:"Job_Description,omitempty"`
	WorkExperience    string      `json:"Work_Experience,omitempty"`
	JobType           string      `json:"Job_Type,omitempty"`
	JobOpeningName    string      `json:"Job_Opening_Name,omitempty"`
	NumberOfPositions string      `json:"Number_of_Positions,omitempty"`
	State             string      `json:"State,omitempty"`
	Country           string      `json:"Country,omitempty"`
	CreatedBy         struct {
		Name string `json:"name,omitempty"`
		ID   string `json:"id,omitempty"`
	} `json:"Created_By,omitempty"`
	IsAttachmentPresent bool `json:"Is_Attachment_Present,omitempty"`
}

type JobOpeningsResponse

type JobOpeningsResponse struct {
	Data []JobOpening `json:"data,omitempty"`
	Info PageInfo     `json:"info,omitempty"`
}

type Layout

type Layout struct {
	Name string `json:"name,omitempty"`
	ID   string `json:"id,omitempty"`
}

type Long

type Long int64

type Lookup

type Lookup struct {
	Name string `json:"name,omitempty"`
	ID   string `json:"id,omitempty"`
}

type Module

type Module string
const (
	CandidatesModule   Module = "Candidates"
	ClientsModule      Module = "Clients"
	ContactsModule     Module = "Contacts"
	CustomModule1      Module = "CustomModule1"
	CustomModule2      Module = "CustomModule2"
	CustomModule3      Module = "CustomModule3"
	CustomModule4      Module = "CustomModule4"
	CustomModule5      Module = "CustomModule5"
	InterviewsModule   Module = "Interviews"
	JobOpeningsModule  Module = "JobOpenings"  // this is used mostly
	Job_OpeningsModule Module = "Job_Openings" // inconsistency in Zoho API
)

type ModuleMetadataResponse

type ModuleMetadataResponse struct {
	Modules []struct {
		ImportMy              bool        `json:"Import_My"`
		GlobalSearchSupported bool        `json:"global_search_supported"`
		Deletable             bool        `json:"deletable"`
		Creatable             bool        `json:"creatable"`
		ModifiedTime          interface{} `json:"modified_time"`
		PluralLabel           string      `json:"plural_label"`
		PresenceSubMenu       bool        `json:"presence_sub_menu"`
		Export                bool        `json:"Export"`
		ID                    string      `json:"id"`
		RelatedListProperties struct {
			SortBy    interface{} `json:"sort_by"`
			Fields    []string    `json:"fields"`
			SortOrder interface{} `json:"sort_order"`
		} `json:"related_list_properties"`
		Properties           []string `json:"$properties"`
		PerPage              int      `json:"per_page"`
		Convertable          bool     `json:"convertable"`
		Editable             bool     `json:"editable"`
		EmailTemplateSupport bool     `json:"emailTemplate_support"`
		Profiles             []struct {
			Name string `json:"name"`
			ID   string `json:"id"`
		} `json:"profiles"`
		FilterSupported bool `json:"filter_supported"`
		DisplayField    struct {
			APIName string `json:"api_name"`
			ID      string `json:"id"`
		} `json:"display_field"`
		WebLink          interface{} `json:"web_link"`
		SequenceNumber   int         `json:"sequence_number"`
		SingularLabel    string      `json:"singular_label"`
		Viewable         bool        `json:"viewable"`
		APISupported     bool        `json:"api_supported"`
		APIName          string      `json:"api_name"`
		QuickCreate      bool        `json:"quick_create"`
		ModifiedBy       interface{} `json:"modified_by"`
		GeneratedType    string      `json:"generated_type"`
		ScoringSupported bool        `json:"scoring_supported"`
		ModuleName       string      `json:"module_name"`
		Attachmenttypes  []struct {
			SequenceNumber int    `json:"sequence_number"`
			CustomField    bool   `json:"custom_field"`
			APIName        string `json:"api_name"`
			Isauto         bool   `json:"isauto"`
			FieldLabel     string `json:"field_label"`
			Publish        bool   `json:"publish"`
			ViewType       struct {
				View     bool `json:"view"`
				Download bool `json:"download"`
				Edit     bool `json:"edit"`
				Create   bool `json:"create"`
				Delete   bool `json:"delete"`
			} `json:"view_type"`
			SePresence bool   `json:"se_presence"`
			ID         string `json:"id"`
			Isdefault  bool   `json:"isdefault"`
			Bulk       bool   `json:"bulk"`
			Required   bool   `json:"required"`
		} `json:"attachmenttypes"`
		ImportMyOrg bool `json:"Import_MyOrg"`
		CustomView  struct {
			DisplayValue  string      `json:"display_value"`
			SharedType    interface{} `json:"shared_type"`
			Criteria      interface{} `json:"criteria"`
			SystemName    string      `json:"system_name"`
			SharedDetails interface{} `json:"shared_details"`
			SortBy        interface{} `json:"sort_by"`
			Offline       bool        `json:"offline"`
			Default       bool        `json:"default"`
			SystemDefined bool        `json:"system_defined"`
			Name          string      `json:"name"`
			ID            string      `json:"id"`
			Category      string      `json:"category"`
			Fields        []string    `json:"fields"`
			Favorite      interface{} `json:"favorite"`
			SortOrder     interface{} `json:"sort_order"`
			IsSearch      bool        `json:"is_search"`
		} `json:"custom_view"`
		ParentModule struct {
		} `json:"parent_module"`
	} `json:"modules"`
}

ModuleMetadataResponse is the data returned by GetModuleMetadata

type MultiLine

type MultiLine string

MultiLine is the field type in Zoho that defines a multiline input field, like text area in HTML

func (MultiLine) MarshalJSON

func (s MultiLine) MarshalJSON() ([]byte, error)

func (*MultiLine) UnmarshalJSON

func (s *MultiLine) UnmarshalJSON(data []byte) error

type MultiSelect

type MultiSelect []string

type NotesResponse

type NotesResponse struct {
	Data []struct {
		IsStatusSplitDone bool   `json:"isStatusSplitDone,omitempty"`
		Modified_Time     Time   `json:"Modified_Time,omitempty"`
		Attachments       string `json:"$attachments,omitempty"`
		Created_Time      Time   `json:"Created_Time,omitempty"`
		ParentID          struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Parent_Id,omitempty"`
		Editable  bool   `json:"$editable,omitempty"`
		SeModule  string `json:"$se_module,omitempty"`
		NoteOwner struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Note_Owner,omitempty"`
		ModifiedBy struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Modified_By,omitempty"`
		Size      string `json:"$size,omitempty"`
		VoiceNote bool   `json:"$voice_note,omitempty"`
		ID        string `json:"id,omitempty"`
		CreatedBy struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"Created_By,omitempty"`
		NoteTitle      string `json:"Note_Title,omitempty"`
		NoteContent    string `json:"Note_Content,omitempty"`
		IsSystemAction bool   `json:"is_system_action,omitempty"`
	} `json:"data,omitempty"`
	Info PageInfo `json:"info,omitempty"`
}

NotesResponse is the data returned by GetNotes

type Number

type Number int

type OrganizationResponse

type OrganizationResponse struct {
	Org []struct {
		EmployeeCount  string      `json:"employee_count"`
		Zip            interface{} `json:"zip"`
		Country        interface{} `json:"country"`
		Website        string      `json:"website"`
		City           interface{} `json:"city"`
		Mobile         interface{} `json:"mobile"`
		Description    interface{} `json:"description"`
		Type           string      `json:"type"`
		TimeZone       string      `json:"time_zone"`
		McStatus       bool        `json:"mc_status"`
		CountryCode    string      `json:"country_code"`
		LicenseDetails struct {
			TrialType   string    `json:"trial_type"`
			TrialExpiry time.Time `json:"trial_expiry"`
			Paid        bool      `json:"paid"`
			PaidType    string    `json:"paid_type"`
			NoOfUsers   int       `json:"no_of_users"`
		} `json:"license_details"`
		Zgid          string      `json:"zgid"`
		Phone         string      `json:"phone"`
		Street        interface{} `json:"street"`
		CompanyName   string      `json:"company_name"`
		PrimaryUserid string      `json:"primary_userid"`
		Alias         interface{} `json:"alias"`
		PrimaryEmail  string      `json:"primary_email"`
		EditorMode    string      `json:"editor_mode"`
		State         interface{} `json:"state"`
		Fax           interface{} `json:"fax"`
	} `json:"org"`
}

OrganizationResponse is the data returned by GetOrganizationDetails

type Owner

type Owner struct {
	Name string `json:"name,omitempty"`
	ID   string `json:"id,omitempty"`
}

type PageInfo

type PageInfo struct {
	PerPage     int  `json:"per_page,omitempty"`
	Count       int  `json:"count,omitempty"`
	Page        int  `json:"page,omitempty"`
	MoreRecords bool `json:"more_records,omitempty"`
}

type Percent

type Percent float64

type Phone

type Phone string

Phone is the field type in Zoho that defines a phone number field

func (Phone) MarshalJSON

func (s Phone) MarshalJSON() ([]byte, error)

func (*Phone) UnmarshalJSON

func (s *Phone) UnmarshalJSON(data []byte) error

type PickList

type PickList string

PickList is the field type in Zoho that defines a dropdown that has been selected

func (PickList) MarshalJSON

func (s PickList) MarshalJSON() ([]byte, error)

func (*PickList) UnmarshalJSON

func (s *PickList) UnmarshalJSON(data []byte) error

type RelatedRecord

type RelatedRecord string
const (
	Activities          RelatedRecord = "Activities"
	Activity_History    RelatedRecord = "Activity_History"
	Attachments         RelatedRecord = "Attachments"
	Campaigns           RelatedRecord = "Campaigns"
	Contacts            RelatedRecord = "Contacts"
	Custom_Related_List RelatedRecord = "Custom_Related_List"
	Interviews          RelatedRecord = "Interviews"
	Invited_Events      RelatedRecord = "Invited_Events"
	Notes               RelatedRecord = "Notes"
	Offers              RelatedRecord = "Offers"
)

type RemoveTagsResponse

type RemoveTagsResponse struct {
	Data []struct {
		Code    string `json:"code"`
		Details struct {
			ID   int64    `json:"id"`
			Tags []string `json:"tags"`
		} `json:"details"`
		Message string `json:"message"`
		Status  string `json:"status"`
	} `json:"data"`
}

type SingleLine

type SingleLine string

SingleLine is the field type in Zoho that defines a single line input field

func (SingleLine) MarshalJSON

func (s SingleLine) MarshalJSON() ([]byte, error)

func (*SingleLine) UnmarshalJSON

func (s *SingleLine) UnmarshalJSON(data []byte) error

type Tags

type Tags struct {
	Name string `json:"name"`
}

type TagsListResponse

type TagsListResponse struct {
	Data struct {
		Tags []struct {
			CreatedTime  time.Time `json:"created_time"`
			ModifiedTime time.Time `json:"modified_time"`
			ModifiedBy   struct {
				Name string `json:"name"`
				ID   string `json:"id"`
			} `json:"modified_by"`
			Name      string `json:"name"`
			ID        string `json:"id"`
			CreatedBy struct {
				Name string `json:"name"`
				ID   string `json:"id"`
			} `json:"created_by"`
		} `json:"tags"`
		Info PageInfo `json:"info"`
	} `json:"data"`
}

type Time

type Time = zoho.Time

type URL

type URL string

type UpdateRecordsResponseData

type UpdateRecordsResponseData struct {
	Message string `json:"message,omitempty"`
	Details struct {
		ExpectedDataType string `json:"expected_data_type,omitempty"`
		APIName          string `json:"api_name"`
	} `json:"details,omitempty"`
	Status string `json:"status,omitempty"`
	Code   string `json:"code,omitempty"`
}

type UpdateTagRequest

type UpdateTagRequest struct {
	Tags []struct {
		Name string `json:"name"`
	} `json:"tags"`
}

type UpdateTagResponse

type UpdateTagResponse struct {
	Tags []struct {
		Code    string `json:"code"`
		Details struct {
			CreatedTime  time.Time `json:"created_time"`
			ModifiedTime time.Time `json:"modified_time"`
			ModifiedBy   struct {
				Name string `json:"name"`
				ID   string `json:"id"`
			} `json:"modified_by"`
			Name      string `json:"name"`
			ID        int64  `json:"id"`
			CreatedBy struct {
				Name string `json:"name"`
				ID   string `json:"id"`
			} `json:"created_by"`
		} `json:"details"`
		Message string `json:"message"`
		Status  string `json:"status"`
	} `json:"tags"`
}

type UploadAttachmentResponse

type UploadAttachmentResponse struct {
	Data []struct {
		Code    string `json:"code"`
		Details struct {
			ModifiedTime time.Time `json:"Modified_Time"`
			ModifiedBy   struct {
				Name string `json:"name"`
				ID   string `json:"id"`
			} `json:"Modified_By"`
			CreatedTime time.Time `json:"Created_Time"`
			ID          string    `json:"id"`
			CreatedBy   struct {
				Name string `json:"name"`
				ID   string `json:"id"`
			} `json:"Created_By"`
		} `json:"details"`
		Message string `json:"message"`
		Status  string `json:"status"`
	} `json:"data"`
}

type UpsertCandidateRequest

type UpsertCandidateRequest struct {
	Data                 []CandidateRequestData `json:"data"`
	DuplicateCheckFields []string               `json:"duplicate_check_fields"`
	Trigger              []string               `json:"trigger"`
}

type UpsertCandidateResponse

type UpsertCandidateResponse struct {
	Data []struct {
		Code           string `json:"code"`
		DuplicateField string `json:"duplicate_field"`
		Action         string `json:"action"`
		Details        struct {
			ModifiedTime time.Time `json:"Modified_Time"`
			ModifiedBy   struct {
				Name string `json:"name"`
				ID   string `json:"id"`
			} `json:"Modified_By"`
			CreatedTime time.Time `json:"Created_Time"`
			ID          string    `json:"id"`
			CreatedBy   struct {
				Name string `json:"name"`
				ID   string `json:"id"`
			} `json:"Created_By"`
		} `json:"details"`
		Message string `json:"message"`
		Status  string `json:"status"`
	} `json:"data"`
}

type UpsertRecords

type UpsertRecords struct {
	Data                 interface{} `json:"data,omitempty"`
	DuplicateCheckFields []string    `json:"duplicate_check_fields,omitempty"`
	Trigger              []string    `json:"trigger,omitempty"`
}

type UsersResponse

type UsersResponse struct {
	Users []struct {
		DecimalSeparator string `json:"decimal_separator,omitempty"`
		Role             struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"role,omitempty"`
		CustomizeInfo struct {
			NotesDesc       interface{} `json:"notes_desc,omitempty"`
			ShowRightPanel  interface{} `json:"show_right_panel,omitempty"`
			BcView          interface{} `json:"bc_view,omitempty"`
			ShowHome        bool        `json:"show_home,omitempty"`
			ShowDetailView  interface{} `json:"show_detail_view,omitempty"`
			UnpinRecentItem interface{} `json:"unpin_recent_item,omitempty"`
		} `json:"customize_info,omitempty"`
		Signature interface{} `json:"signature,omitempty"`
		Profile   struct {
			Name string `json:"name,omitempty"`
			ID   string `json:"id,omitempty"`
		} `json:"profile,omitempty"`
		LastName        string        `json:"last_name,omitempty"`
		NameFormat      string        `json:"name_format,omitempty"`
		Language        string        `json:"language,omitempty"`
		Locale          string        `json:"locale,omitempty"`
		TimeZone        string        `json:"time_zone,omitempty"`
		PersonalAccount bool          `json:"personal_account,omitempty"`
		Zuid            string        `json:"zuid,omitempty"`
		Confirm         bool          `json:"confirm,omitempty"`
		DefaultTabGroup string        `json:"default_tab_group,omitempty"`
		FullName        string        `json:"full_name,omitempty"`
		Territories     []interface{} `json:"territories,omitempty"`
		Dob             string        `json:"dob,omitempty"`
		DateFormat      string        `json:"date_format,omitempty"`
		Theme           struct {
			NormalTab struct {
				FontColor  string `json:"font_color,omitempty"`
				Background string `json:"background,omitempty"`
			} `json:"normal_tab,omitempty"`
			SelectedTab struct {
				FontColor  string `json:"font_color,omitempty"`
				Background string `json:"background,omitempty"`
			} `json:"selected_tab,omitempty"`
			NewBackground interface{} `json:"new_background,omitempty"`
			Background    string      `json:"background,omitempty"`
			Screen        string      `json:"screen,omitempty"`
			Type          string      `json:"type,omitempty"`
		} `json:"theme,omitempty"`
		ID            string      `json:"id,omitempty"`
		CountryLocale string      `json:"country_locale,omitempty"`
		FirstName     interface{} `json:"first_name,omitempty"`
		Email         string      `json:"email,omitempty"`
		Status        string      `json:"status,omitempty"`
	} `json:"users,omitempty"`
	Info PageInfo `json:"info,omitempty"`
}

UsersResponse is the data returned by GetUsers

type XMLGetRecordsResponse

type XMLGetRecordsResponse struct {
	XMLName xml.Name `xml:"response"`
	Text    string   `xml:",chardata"`
	URI     string   `xml:"uri,attr"`
	Result  struct {
		Text        string `xml:",chardata"`
		JobOpenings struct {
			Text string `xml:",chardata"`
			Row  struct {
				Text string `xml:",chardata"`
				No   string `xml:"no,attr"`
				FL   []struct {
					Text string `xml:",chardata"`
					Val  string `xml:"val,attr"`
				} `xml:"FL"`
			} `xml:"row"`
		} `xml:"JobOpenings"`
	} `xml:"result"`
}

type XMLJobOpeningsResponse

type XMLJobOpeningsResponse struct {
	XMLName xml.Name `xml:"response"`
	Text    string   `xml:",chardata"`
	URI     string   `xml:"uri,attr"`
	Result  struct {
		Text        string `xml:",chardata"`
		JobOpenings struct {
			Text string `xml:",chardata"`
			Row  struct {
				Text string `xml:",chardata"`
				No   string `xml:"no,attr"`
				FL   []struct {
					Text string `xml:",chardata"`
					Val  string `xml:"val,attr"`
				} `xml:"FL"`
			} `xml:"row"`
		} `xml:"JobOpenings"`
	} `xml:"result"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL