greenhouse

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package greenhouse provides a Go client for the Greenhouse APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddApplicationToCandidate

func AddApplicationToCandidate(c *Client, ctx context.Context, id int, obj *Application) (int, error)

AddApplicationToCandidate adds an application to a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-application-to-candidate-prospect

func AddAttachmentToApplication

func AddAttachmentToApplication(c *Client, ctx context.Context, id int, item *Attachment) error

AddAttachmentToApplication adds an attachment to an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-attachment-to-application

func AddAttachmentToCandidate

func AddAttachmentToCandidate(c *Client, ctx context.Context, id int, obj *Attachment) error

AddAttachmentToCandidate adds an attachment to a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-attachment

func AddEducationToCandidate

func AddEducationToCandidate(c *Client, ctx context.Context, id int, education *Education) error

AddEducationToCandidate adds an education to a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-education

func AddEmailAddressToUser

func AddEmailAddressToUser(c *Client, ctx context.Context, userId int, obj *UserEmailUpdateInfo) error

AddEmailAddressToUser adds an email address to a user. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-e-mail-address-to-user

func AddEmailNoteToCandidate

func AddEmailNoteToCandidate(c *Client, ctx context.Context, id int, email *Email) error

AddEmailNoteToCandidate adds an email note to a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-e-mail-note

func AddEmploymentToCandidate

func AddEmploymentToCandidate(c *Client, ctx context.Context, id int, employment *Employment) error

AddEmploymentToCandidate adds an employment to a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-employment

func AddNoteToCandidate

func AddNoteToCandidate(c *Client, ctx context.Context, id int, note *Note) error

AddNoteToCandidate adds a note to a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-note

func AdvanceApplication

func AdvanceApplication(c *Client, ctx context.Context, id int, from int) error

AdvanceApplication moves an application to the next stage in an approval flow. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-advance-application

func AnonymizeCandidate

func AnonymizeCandidate(c *Client, ctx context.Context, id int, fields []string) (int, error)

AnonymizeCandidate anonymizes the data associated with a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#put-anonymize-candidate

func ChangeUserPermissionLevel

func ChangeUserPermissionLevel(c *Client, ctx context.Context, user *User, level string) error

ChangeUserPermissionLevel changes a user's permission level. It currently only supports changing to Basic. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-change-user-permission-level

func Convert

func Convert(item interface{}) string

Convert (in theory) should be able to handle object type conversions. It was never really implemented and should be removed in future releases.

func Create

func Create(c *Client, ctx context.Context, endpoint string, item interface{}) (int, error)

Create performs a POST and returns the ID of the created object.

func CreateCandidate

func CreateCandidate(c *Client, ctx context.Context, obj *Candidate) (int, error)

CreateCandidate creates a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-candidate

func CreateCandidateTag

func CreateCandidateTag(c *Client, ctx context.Context, obj *CandidateTag) (int, error)

CreateCandidateTag creates a tag. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-new-candidate-tag

func CreateCustomField

func CreateCustomField(c *Client, ctx context.Context, obj *CustomField) (int, error)

CreateCustomField creates a custom field. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-create-custom-field

func CreateCustomFieldOptions

func CreateCustomFieldOptions(c *Client, ctx context.Context, id int, obj *[]CustomFieldOption) (int, error)

CreateCustomFieldOptions creates an option for a custom field. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-create-custom-field-options

func CreateDepartment

func CreateDepartment(c *Client, ctx context.Context, obj *Department) (int, error)

CreateDepartment creates a department. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-department

func CreateFutureJobPermission

func CreateFutureJobPermission(c *Client, ctx context.Context, id int, obj *FutureJobPermission) (int, error)

CreateFutureJobPermission adds a future job permission to a user. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#put-add-a-future-job-permission

func CreateJob

func CreateJob(c *Client, ctx context.Context, obj *JobCreateInfo) (int, error)

CreateJob creates a new job. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-create-job

func CreateJobOpenings

func CreateJobOpenings(c *Client, ctx context.Context, jobId int, obj JobOpeningCreateInfo) (*[]int, error)

CreateJobOpenings adds openings to a job. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-create-new-openings

func CreateJobPermission

func CreateJobPermission(c *Client, ctx context.Context, id int, obj *UserPermission) (int, error)

CreateJobPermission adds a job permission to a user. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#put-add-a-job-permission

func CreateOffice

func CreateOffice(c *Client, ctx context.Context, obj *OfficeCreateInfo) (int, error)

CreateOffice creates a new office. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-office

func CreateProspect

func CreateProspect(c *Client, ctx context.Context, obj *Candidate) (int, error)

CreateProspect creates a prospect. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-prospect

func CreateReplaceApprovalFlow

func CreateReplaceApprovalFlow(c *Client, ctx context.Context, job int, obj *Approval) (int, error)

CreateReplaceApprovalFlow creates or replaces an approval workflow. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#put-create-or-replace-an-approval-flow

func CreateScheduledInterview

func CreateScheduledInterview(c *Client, ctx context.Context, obj *ScheduledInterviewCreateInfo) (int, error)

CreateScheduledInterview creates a new scheduled interview. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-create-scheduled-interview

func CreateTagForCandidate

func CreateTagForCandidate(c *Client, ctx context.Context, candidateId int, tagId int) error

CreateTagForCandidate adds a tag to a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#put-add-a-candidate-tag

func CreateUser

func CreateUser(c *Client, ctx context.Context, obj *UserCreateInfo) (int, error)

CreateUser creates a new user. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-user

func Delete

func Delete(c *Client, ctx context.Context, endpoint string, jsonBody []byte) error

Delete performs a DELETE against the specified endpoint.

func DeleteApplication

func DeleteApplication(c *Client, ctx context.Context, id int) error

DeleteApplication deletes a single application by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#delete-delete-application

func DeleteCandidate

func DeleteCandidate(c *Client, ctx context.Context, id int) error

DeleteCandidate deletes a candidate by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#delete-delete-candidate

func DeleteCandidateTag

func DeleteCandidateTag(c *Client, ctx context.Context, tagId int) error

DeleteCandidateTag deletes a tag. Note that this is not synchronous; it simply kicks off a delete job which may take 24 hours to complete. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#delete-destroy-a-candidate-tag

func DeleteCustomField

func DeleteCustomField(c *Client, ctx context.Context, id int) error

DeleteCustomField deletes a custom field. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#delete-delete-custom-field

func DeleteCustomFieldOptions

func DeleteCustomFieldOptions(c *Client, ctx context.Context, id int, ids []int) error

DeleteCustomFieldOptions deletes options for a custom field. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#delete-remove-custom-field-options

func DeleteEducationFromCandidate

func DeleteEducationFromCandidate(c *Client, ctx context.Context, candidateId int, educationId int) error

DeleteEducationFromCandidate deletes an education from a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#delete-remove-education-from-candidate

func DeleteEmploymentFromCandidate

func DeleteEmploymentFromCandidate(c *Client, ctx context.Context, candidateId int, employmentId int) error

DeleteEmploymentFromCandidate deletes an employment from a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#delete-remove-employment-from-candidate

func DeleteFutureJobPermission

func DeleteFutureJobPermission(c *Client, ctx context.Context, id int, permId int) error

DeleteFutureJobPermission deletes a user's future job permission. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#delete-remove-a-future-job-permission

func DeleteHiringTeamMembers

func DeleteHiringTeamMembers(c *Client, ctx context.Context, id int, obj *map[string][]int) error

DeleteHiringTeamMembers removes members from a hiring team. This is a more atomic operation; instead of replacing an entire team, you can work on one member. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#delete-remove-hiring-team-member

func DeleteJobOpenings

func DeleteJobOpenings(c *Client, ctx context.Context, jobId int, openingIds []int) error

DeleteJobOpenings deletes openings from a job. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#delete-destroy-openings

func DeleteJobPermission

func DeleteJobPermission(c *Client, ctx context.Context, jobId int, permId int) error

DeleteJobPermission deletes a user's job permission. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#delete-remove-a-job-permission

func DeleteScheduledInterview

func DeleteScheduledInterview(c *Client, ctx context.Context, id int) error

DeleteScheduledInterview deletes a scheduled interview. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#delete-remove-scheduled-interview

func DeleteTagFromCandidate

func DeleteTagFromCandidate(c *Client, ctx context.Context, candidateId int, tagId int) error

DeleteTagFromCandidate deletes a tag from a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#delete-remove-tag-from-candidate

func DisableUser

func DisableUser(c *Client, ctx context.Context, id int) error

DisableUser disables a user. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-disable-user

func EnableUser

func EnableUser(c *Client, ctx context.Context, id int) error

EnableUser enables a user. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-enable-user

func Exists

func Exists(c *Client, ctx context.Context, endpoint string) (bool, error)

Exists checks whether the specified object exists at the specified endpoint.

func GenerateQuerystring

func GenerateQuerystring(params map[string]interface{}) (*string, error)

GenerateQuerystring generates a querystring from a list of k-v pairs.

func Get

func Get(c *Client, ctx context.Context, endpoint string) (*resty.Response, error)

Get performs a GET against the specified endpoint.

func GetAllApplications

func GetAllApplications(c *Client, ctx context.Context) (*[]Application, error)

GetAllApplications retrieves all applications. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-applications

func GetAllCandidateTags

func GetAllCandidateTags(c *Client, ctx context.Context) (*[]CandidateTag, error)

GetAllCandidateTags lists all candidate tags. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-candidate-tags

func GetAllCandidates

func GetAllCandidates(c *Client, ctx context.Context) (*[]Candidate, error)

GetAllCandidates retrieves a list of all candidates. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-candidates

func GetAllCloseReasons

func GetAllCloseReasons(c *Client, ctx context.Context) (*[]CloseReason, error)

GetAllCloseReasons retrieves a list of all close reasons. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-close-reasons

func GetAllCustomFields

func GetAllCustomFields(c *Client, ctx context.Context, fieldType string, includeInactive bool) (*[]CustomField, error)

GetAllCustomFields retrieves a list of all custom fields. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-custom-fields

func GetAllDegrees

func GetAllDegrees(c *Client, ctx context.Context) (*[]Degree, error)

GetAllDegrees retrieves a list of all degrees. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-degrees

func GetAllDemographicAnswerOptions

func GetAllDemographicAnswerOptions(c *Client, ctx context.Context) (*[]DemographicAnswerOption, error)

GetAllDemographicAnswerOptions retrieves a list of answer options. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-demographic-answer-options

func GetAllDemographicAnswerOptionsForQuestion

func GetAllDemographicAnswerOptionsForQuestion(c *Client, ctx context.Context, id int) (*[]DemographicAnswerOption, error)

GetAllDemographicAnswerOptionsForQuestion retrieves a list of answer options for a question. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-demographic-answer-options-for-demographic-question

func GetAllDemographicAnswers

func GetAllDemographicAnswers(c *Client, ctx context.Context) (*[]DemographicAnswer, error)

GetAllDemographicAnswers retrieves a list of all answers. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-demographic-answers

func GetAllDemographicAnswersForApplication

func GetAllDemographicAnswersForApplication(c *Client, ctx context.Context) (*[]DemographicAnswer, error)

GetAllDemographicAnswersForApplication retrieves a list of answers in an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-demographic-answers-for-application

func GetAllDemographicQuestionSets

func GetAllDemographicQuestionSets(c *Client, ctx context.Context) (*[]DemographicQuestionSet, error)

GetAllDemographicQuestionSets retrieves a list of all question sets. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-demographic-question-sets

func GetAllDemographicQuestions

func GetAllDemographicQuestions(c *Client, ctx context.Context) (*[]DemographicQuestion, error)

GetAllDemographicQuestions retrieves a list of questions. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-demographic-questions

func GetAllDemographicQuestionsForQuestionSet

func GetAllDemographicQuestionsForQuestionSet(c *Client, ctx context.Context, id int) (*[]DemographicQuestion, error)

GetAllDemographicQuestionsForQuestionSet retrieves a list of questions for a question set. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-demographic-questions-for-demographic-question-set

func GetAllDepartments

func GetAllDepartments(c *Client, ctx context.Context) (*[]Department, error)

GetAllDepartments retrieves a list of all departments. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-departments

func GetAllDisciplines

func GetAllDisciplines(c *Client, ctx context.Context) (*[]Discipline, error)

GetAllDisciplines retrieves a list of all disciplines. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-disciplines

func GetAllEEOC

func GetAllEEOC(c *Client, ctx context.Context) (*[]EEOC, error)

GetAllEEOC retrieves a list of all EEOC data. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-eeoc

func GetAllEmailTemplates

func GetAllEmailTemplates(c *Client, ctx context.Context) (*[]EmailTemplate, error)

GetAllEmailTemplates retrieves a list of all email templates. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-email-templates

func GetAllJobOpenings

func GetAllJobOpenings(c *Client, ctx context.Context, id int, status string) (*[]JobOpening, error)

GetAllJobOpenings retrieves a list of all openings for a job. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-job-openings

func GetAllJobPosts

func GetAllJobPosts(c *Client, ctx context.Context, live bool, active bool) (*[]JobPost, error)

GetAllJobPosts retrieves a list of all job posts for an organization. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-job-posts

func GetAllJobPostsForJob

func GetAllJobPostsForJob(c *Client, ctx context.Context, id int) (*[]JobPost, error)

GetAllJobPostsForJob retrieves all posts for a job. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-job-posts-for-job

func GetAllJobStages

func GetAllJobStages(c *Client, ctx context.Context) (*[]JobStage, error)

GetAllJobStages retrieves a list of all job stages for an organization. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-job-stages

func GetAllJobs

func GetAllJobs(c *Client, ctx context.Context) (*[]Job, error)

GetAllJobs gets a list of all jobs for an organization. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-jobs

func GetAllOffers

func GetAllOffers(c *Client, ctx context.Context) (*[]Offer, error)

GetAllOffers retrieves a list of all offers made by an organization. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-offers

func GetAllOffersForApplication

func GetAllOffersForApplication(c *Client, ctx context.Context, id int) (*[]Offer, error)

GetAllOffersForApplication retrieves a list of all offers made for an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-offers-for-application

func GetAllOffices

func GetAllOffices(c *Client, ctx context.Context) (*[]Office, error)

GetAllOffices retrieves a list of all offices for an organization. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-offices

func GetAllProspectPools

func GetAllProspectPools(c *Client, ctx context.Context) (*[]ProspectPool, error)

GetAllProspectPools retrieves a list of all prospect pools for an organization. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-prospect-pools

func GetAllRejectionReasons

func GetAllRejectionReasons(c *Client, ctx context.Context, include_defaults bool, per_page int) (*[]RejectionReason, error)

GetAllRejectionReasons retrieves a list of all rejection reasons for an organization. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-rejection-reasons

func GetAllScheduledInterviews

func GetAllScheduledInterviews(c *Client, ctx context.Context, actionable bool) (*[]ScheduledInterview, error)

GetAllScheduledInterviews retrieves a list of all scheduled interviews for an organization. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-scheduled-interviews

func GetAllSchools

func GetAllSchools(c *Client, ctx context.Context) (*[]School, error)

GetAllSchoolds retrieves a list of all schools. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-schools

func GetAllScorecards

func GetAllScorecards(c *Client, ctx context.Context) (*[]Scorecard, error)

GetAllScorecards retrieves a list of all scorecards for an organization. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-scorecards

func GetAllSources

func GetAllSources(c *Client, ctx context.Context) (*[]Source, error)

GetAllSources retrieves a list of all sources for an organization, grouped by strategy. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-sources

func GetAllUserRoles

func GetAllUserRoles(c *Client, ctx context.Context) (*[]UserRole, error)

GetAllUserRoles retrieves a list of all roles that can be assigned to a user. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-user-role-object

func GetAllUsers

func GetAllUsers(c *Client, ctx context.Context) (*[]User, error)

GetAllUsers retrieves a list of all users for an organization. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-users

func GetCustomFieldOptions

func GetCustomFieldOptions(c *Client, ctx context.Context, id int, typeStr string) (*[]CustomFieldOption, error)

GetCustomFieldOptions retrieves a list of field options for a custom field. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-custom-field-options

func GetCustomLocationsForJobPost

func GetCustomLocationsForJobPost(c *Client, ctx context.Context, id int) (*[]Location, error)

GetCustomLocationsForJobPost gets a list of locations for a job post. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-custom-locations-for-job-post

func GetFutureJobPermissions

func GetFutureJobPermissions(c *Client, ctx context.Context, id int) (*[]FutureJobPermission, error)

GetFutureJobPermissions retrieves a list of a user's future job permissions. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-future-job-permissions

func GetJobHiringTeam

func GetJobHiringTeam(c *Client, ctx context.Context, id int) (*map[string][]HiringMember, error)

GetJobHiringTeam retrieves the hiring team for a job. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-hiring-team

func GetJobPermissions

func GetJobPermissions(c *Client, ctx context.Context, id int) (*[]UserPermission, error)

GetJobPermissions retrieves a list of all permissions for a user. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-job-permissions

func GetJobStagesForJob

func GetJobStagesForJob(c *Client, ctx context.Context, id int) (*[]JobStage, error)

GetJobStagesForJob retrieves a list of stages for a job. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-job-stages-for-job

func GetLookupInfo

func GetLookupInfo(id int) []byte

GetLookupInfo formats a user lookup. Currently this can only be done by ID, although Greenhouse also supports other attributes, such as name.

func GetScheduledInterviewsForApplication

func GetScheduledInterviewsForApplication(c *Client, ctx context.Context, id int, actionable bool) (*[]ScheduledInterview, error)

GetScheduledInterviewsForApplication retrieves a list of all scheduled interviews for an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-scheduled-interviews-for-application

func GetScorecardsForApplication

func GetScorecardsForApplication(c *Client, ctx context.Context, id int) (*[]Scorecard, error)

GetScorecardsForApplication retrieves a list of all scorecards for an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-scorecards-for-application

func GetTagsForCandidate

func GetTagsForCandidate(c *Client, ctx context.Context, id int) (*[]CandidateTag, error)

GetTagsForCandidate retrieves all tags associated with a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-tags-applied-to-candidate

func HireApplication

func HireApplication(c *Client, ctx context.Context, id int, obj *ApplicationHire) error

HireApplication hires a candidate based on an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-hire-application

func ListApprovalsForJob

func ListApprovalsForJob(c *Client, ctx context.Context, id int) (*[]Approval, error)

ListApprovalsForJob lists all approvals for a job. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-list-approvals-for-job

func MergeCandidates

func MergeCandidates(c *Client, ctx context.Context, targetId int, duplicateId int) error

MergeCandidates will merge two candidates. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#put-merge-candidates

func MoveApplicationDifferentJob

func MoveApplicationDifferentJob(c *Client, ctx context.Context, id int, newJob int, newStage int) error

MoveApplicationDifferentJob moves an application to a different job. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-move-application-different-job

func MoveApplicationSameJob

func MoveApplicationSameJob(c *Client, ctx context.Context, id int, from int, to int) error

MoveApplicationSameJob moves an application to a different stage in the same job. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-move-application-same-job

func MultiGet

func MultiGet(c *Client, ctx context.Context, endpoint string, querystring string, obj interface{}) error

MultiGet performs a GET to retrieve a list of objects, handling pagination in the process.

func Patch

func Patch(c *Client, ctx context.Context, endpoint string, jsonBody []byte) (*resty.Response, error)

Patch performs a PATCH against the specified endpoint.

func PendingApprovalsForUser

func PendingApprovalsForUser(c *Client, ctx context.Context, id int) (*[]Approval, error)

PendingApprovalsForUser retrieves all pending approvals for a user. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-pending-approvals-for-user

func Post

func Post(c *Client, ctx context.Context, endpoint string, jsonBody []byte) (*resty.Response, error)

Post performs a POST against the specified endpoint.

func Put

func Put(c *Client, ctx context.Context, endpoint string, jsonBody []byte) (*resty.Response, error)

Put performs a PUT against the specified endpoint.

func RejectApplication

func RejectApplication(c *Client, ctx context.Context, id int, obj *ApplicationReject) error

RejectApplication rejects a candidate based on an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-reject-application

func ReplaceApproverInApproverGroup

func ReplaceApproverInApproverGroup(c *Client, ctx context.Context, group int, oldUser int, newUser int) error

ReplaceApproverInApproverGroup replaces a single approver in an approver group. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#put-replace-an-approver-in-an-approver-group

func RequestApprovals

func RequestApprovals(c *Client, ctx context.Context, id int) error

RequestApprovals requests approvals as part of an approval flow. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-request-approvals

func SingleGet

func SingleGet(c *Client, ctx context.Context, endpoint string, item interface{}) error

SingleGet performs a GET to retrieve a single object.

func UnrejectApplication

func UnrejectApplication(c *Client, ctx context.Context, id int) error

UnrejectApplication unrejects an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-unreject-application

func Update

func Update(c *Client, ctx context.Context, endpoint string, item interface{}) error

Update performs a Patch against the specified endpoint, handling object marshalling in the process.

func UpdateApplication

func UpdateApplication(c *Client, ctx context.Context, id int, obj *Application) error

UpdateApplication updates an application's properties. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-update-application

func UpdateCandidate

func UpdateCandidate(c *Client, ctx context.Context, id int, obj *Candidate) error

UpdateCandidate updates a candidate's properties. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-edit-candidate

func UpdateCurrentOffer

func UpdateCurrentOffer(c *Client, ctx context.Context, id int, obj *Offer) error

UpdateCurrentOffer updates the current offer for an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-update-current-offer

func UpdateCustomField

func UpdateCustomField(c *Client, ctx context.Context, id int, obj *CustomField) error

UpdateCustomField updates a custom field. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-update-custom-field

func UpdateCustomFieldOptions

func UpdateCustomFieldOptions(c *Client, ctx context.Context, id int, obj *[]CustomFieldOption) error

UpdateCustomFieldOptions updates the options for a custom field. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-update-custom-field-options

func UpdateDepartment

func UpdateDepartment(c *Client, ctx context.Context, id int, obj *Department) error

UpdateDepartment updates a department's properties. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-edit-department

func UpdateHiringTeamMembers

func UpdateHiringTeamMembers(c *Client, ctx context.Context, id int, obj *map[string][]HiringMember) error

UpdateHiringTeamMembers adds members to a hiring team. This is a more atomic operation; instead of replacing an entire team, you can work on one member. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-hiring-team-members

func UpdateJob

func UpdateJob(c *Client, ctx context.Context, id int, obj *JobUpdateInfo) error

UpdateJob updates a job's properties. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-update-job

func UpdateJobHiringTeam

func UpdateJobHiringTeam(c *Client, ctx context.Context, id int, obj *map[string][]HiringMember) error

UpdateJobHiringTeam replaces a job's hiring team. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#put-replace-hiring-team

func UpdateJobOpenings

func UpdateJobOpenings(c *Client, ctx context.Context, jobId int, openingId int, obj *JobOpeningUpdateInfo) error

UpdateJobOpenings updates the openings for a job. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-edit-openings

func UpdateJobPost

func UpdateJobPost(c *Client, ctx context.Context, id int, obj *JobPost) error

UpdateJobPost updates a job post's properties. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-update-job-post

func UpdateJobPostStatus

func UpdateJobPostStatus(c *Client, ctx context.Context, id int, status string) error

UpdateJobPostStatus updates the status of a job post. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-update-job-post-status

func UpdateOffice

func UpdateOffice(c *Client, ctx context.Context, id int, obj *OfficeUpdateInfo) error

UpdateOffice updates an office's properties. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-edit-office

func UpdateRejectionReason

func UpdateRejectionReason(c *Client, ctx context.Context, id int, rejectionReason int) error

UpdateRejectionReason updates an application's rejection reason. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-update-rejection-reason

func UpdateScheduledInterview

func UpdateScheduledInterview(c *Client, ctx context.Context, id int, obj *ScheduledInterviewUpdateInfo) error

UpdateScheduledInterview updates a scheduled interview's properties. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-update-scheduled-interview

func UpdateUser

func UpdateUser(c *Client, ctx context.Context, id int, obj *UserUpdateInfo) error

UpdateUser updates a user's properties. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-edit-user

Types

type Activity

type Activity struct {
	Body      *string `json:"body,omitempty"`
	CreatedAt *string `json:"created_at,omitempty"`
	Id        *int    `json:"id,omitempty"`
	Subject   *string `json:"subject,omitempty"`
	User      *User   `json:"user,omitempty"`
}

Activity represents an object on an activity feed. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-activity-feed-object

type ActivityFeed

type ActivityFeed struct {
	Activities []Activity `json:"activities,omitempty"`
	Emails     []Email    `json:"emails,omitempty"`
	Id         *int       `json:"id,omitempty"`
	Notes      []Note     `json:"notes,omitempty"`
}

ActivityFeed represents a candidate's activity feed. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-activity-feed-object

func GetActivityFeed

func GetActivityFeed(c *Client, ctx context.Context, id int) (*ActivityFeed, error)

GetActivityFeed retrieves an activity feed for a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-activity-feed

type Answer

type Answer struct {
	Answer   *string `json:"answer,omitempty"`
	Question *string `json:"question,omitempty"`
}

Answer represents a question-answer pair on an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-demographic-answer-object

type Application

type Application struct {
	Answers                 []Answer                    `json:"answers,omitempty"`
	AppliedAt               *string                     `json:"applied_at,omitempty"`
	Attachments             []Attachment                `json:"attachments,omitempty"`
	CandidateId             *int                        `json:"candidate_id,omitempty"`
	CreditedTo              *User                       `json:"credited_to,omitempty"`
	CurrentStage            *Stage                      `json:"current_stage,omitempty"`
	CustomFields            map[string]string           `json:"custom_fields,omitempty"`
	Id                      *int                        `json:"id,omitempty"`
	InitialStageId          *int                        `json:"initial_stage_id,omitempty"`
	JobId                   *int                        `json:"job_id,omitempty"`
	JobIds                  []int                       `json:"job_ids,omitempty"`
	Jobs                    []Job                       `json:"jobs,omitempty"`
	JobPostId               *int                        `json:"job_post_id,omitempty"`
	KeyedCustomFields       map[string]KeyedCustomField `json:"keyed_custom_fields,omitempty"`
	LastActivityAt          *string                     `json:"last_activity_at,omitempty"`
	Location                *Location                   `json:"location,omitempty"`
	Prospect                *bool                       `json:"prospect,omitempty"`
	ProspectDetail          *ProspectDetail             `json:"prospect_detail,omitempty"`
	ProspectOwnerId         *int                        `json:"prospect_owner_id,omitempty"`
	ProspectPoolId          *int                        `json:"prospect_pool_id,omitempty"`
	ProspectPoolStageId     *int                        `json:"prospect_pool_stage_id,omitempty"`
	ProspectStageId         *int                        `json:"prospect_stage_id,omitempty"`
	ProspectiveDepartment   *Department                 `json:"prospective_department,omitempty"`
	ProspectiveDepartmentId *int                        `json:"prospective_department_id,omitempty"`
	ProspectiveOffice       *Office                     `json:"prospective_office,omitempty"`
	ProspectiveOfficeId     *int                        `json:"prospective_office_id,omitempty"`
	Referrer                *TypeTypeValue              `json:"referrer,omitempty"`
	RejectedAt              *string                     `json:"rejected_at,omitempty"`
	RejectionDetails        *RejectionDetails           `json:"rejection_details,omitempty"`
	RejectionReason         *RejectionReason            `json:"rejection_reason,omitempty"`
	Source                  *Source                     `json:"source,omitempty"`
	SourceId                *int                        `json:"source_id,omitempty"`
	Status                  *string                     `json:"status,omitempty"`
}

Application represents an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-application-object

func GetApplication

func GetApplication(c *Client, ctx context.Context, id int) (*Application, error)

GetApplication gets a single application by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-application

type ApplicationHire

type ApplicationHire struct {
	CloseReasonId *int    `json:"close_reason_id,omitempty"`
	OpeningId     *int    `json:"opening_id,omitempty"`
	StartDate     *string `json:"start_date,omitempty"`
}

ApplicationHire represents the data needed to hire an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-hire-application

type ApplicationReject

type ApplicationReject struct {
	Notes             *string         `json:"notes,omitempty"`
	RejectionEmail    *RejectionEmail `json:"rejection_email,omitempty"`
	RejectionReasonId *int            `json:"rejection_reason_id,omitempty"`
}

ApplicationReject represents the data needed to reject an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-reject-application

type Approval

type Approval struct {
	ApprovalStatus    *string         `json:"approval_status,omitempty"`
	ApprovalType      *string         `json:"approval_type,omitempty"`
	ApproverGroups    []ApproverGroup `json:"approver_groups,omitempty"`
	Id                *int            `json:"id,omitempty"`
	JobId             *int            `json:"job_id,omitempty"`
	OfferId           *int            `json:"offer_id,omitempty"`
	RequestedByUserId *int            `json:"requested_by_user_id,omitempty"`
	Sequential        *bool           `json:"sequential,omitempty"`
	Version           *int            `json:"version,omitempty"`
}

Approval represents an approval flow. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-approval-flow-object

func RetrieveApprovalFlow

func RetrieveApprovalFlow(c *Client, ctx context.Context, id int) (*Approval, error)

RetrieveApprovalFlow retrieves an approval flow by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-approval-flow

type Approver

type Approver struct {
	EmailAddresses []string `json:"email_addresses,omitempty"`
	EmployeeId     *string  `json:"employee_id,omitempty"`
	Id             *int     `json:"id,omitempty"`
	Name           *string  `json:"name,omitempty"`
}

Approver represents an approver in an approval flow. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-approval-flow-object

type ApproverGroup

type ApproverGroup struct {
	ApprovalsRequired *int       `json:"approvals_required,omitempty"`
	Approvers         []Approver `json:"approvers,omitempty"`
	CreatedAt         *string    `json:"created_at,omitempty"`
	Id                *int       `json:"id,omitempty"`
	JobId             *int       `json:"job_id,omitempty"`
	OfferId           *int       `json:"offer_id,omitempty"`
	Priority          *int       `json:"priority,omitempty"`
	ResolvedAt        *string    `json:"resolved_at,omitempty"`
}

ApproverGroup represents an approver group in an approval flow. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-approval-flow-object

type Attachment

type Attachment struct {
	Content     *string `json:"content,omitempty"`
	ContentType *string `json:"content_type,omitempty"`
	Filename    *string `json:"filename,omitempty"`
	Type        *string `json:"type,omitempty"`
	Url         *string `json:"url,omitempty"`
	Visibility  *string `json:"visibility,omitempty"`
}

Attachment represents an attachment to a candidate or application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-attachment-to-application

type Candidate

type Candidate struct {
	ActivityFeedNotes    []ActivityFeed              `json:"activity_feed_notes,omitempty"`
	Addresses            []TypeTypeValue             `json:"addresses,omitempty"`
	Application          *Application                `json:"application,omitempty"`
	ApplicationIds       []int                       `json:"application_ids,omitempty"`
	Applications         []Application               `json:"applications,omitempty"`
	Attachments          []Attachment                `json:"attachments,omitempty"`
	CanEmail             *bool                       `json:"can_email,omitempty"`
	Company              *string                     `json:"company,omitempty"`
	Coordinator          *User                       `json:"coordinator,omitempty"`
	CreatedAt            *string                     `json:"created_at,omitempty"`
	CustomFields         map[string]interface{}      `json:"custom_fields,omitempty"`
	Educations           []Education                 `json:"educations,omitempty"`
	EmailAddresses       []TypeTypeValue             `json:"email_addresses,omitempty"`
	Employments          []Employment                `json:"employments,omitempty"`
	ExposeInJobBoard     *bool                       `json:"expose_in_job_board,omitempty"`
	FirstName            *string                     `json:"first_name,omitempty"`
	KeyedCustomFields    map[string]KeyedCustomField `json:"keyed_custom_fields,omitempty"`
	Id                   *int                        `json:"id,omitempty"`
	IsPrivate            *bool                       `json:"is_private,omitempty"`
	IsProspect           *bool                       `json:"is_prospect,omitempty"`
	LastActivity         *string                     `json:"last_activity,omitempty"`
	LastName             *string                     `json:"last_name,omitempty"`
	LinkedUserIds        []int                       `json:"linked_user_ids,omitempty"`
	PhoneNumbers         []TypeTypeValue             `json:"phone_numbers,omitempty"`
	PhotoUrl             *string                     `json:"photo_url,omitempty"`
	Recruiter            *User                       `json:"recruiter,omitempty"`
	SocialMediaAddresses []TypeTypeValue             `json:"social_media_addresses,omitempty"`
	Tags                 []string                    `json:"tags,omitempty"`
	Title                *string                     `json:"title,omitempty"`
	UpdatedAt            *string                     `json:"updated_at,omitempty"`
	WebsiteAddresses     []TypeTypeValue             `json:"website_addresses,omitempty"`
}

Candidate represents a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-candidate-object

func GetCandidate

func GetCandidate(c *Client, ctx context.Context, id int) (*Candidate, error)

GetCandidate retrieves a candidate by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-candidate

func GetCandidateByName

func GetCandidateByName(c *Client, ctx context.Context, firstName string, lastName string) (*Candidate, error)

GetCandidateByName searches for a candidate by name.

type CandidateApplication

type CandidateApplication struct {
	Attachments    []Attachment   `json:"attachments,omitempty"`
	InitialStageId *int           `json:"initial_stage_id,omitempty"`
	JobId          *int           `json:"job_id,omitempty"`
	Referrer       *TypeTypeValue `json:"referrer,omitempty"`
	SourceId       *int           `json:"source_id,omitempty"`
}

CandidateApplication represents the information needed to create a candidate application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-application-to-candidate-prospect

type CandidateTag

type CandidateTag TypeIdName

CandidateTag represents a tag. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-candidate-tag-object

func GetCandidateTag

func GetCandidateTag(c *Client, ctx context.Context, id int) (*CandidateTag, error)

GetCandidateTag retrieves a tag by ID.

type Client

type Client struct {
	BaseUrl      string
	Token        string
	OnBehalfOf   int
	RetryCount   int
	RetryWait    int64
	RetryMaxWait int64
	Client       *resty.Client
}

Client creates an API client.

func (*Client) BuildResty

func (c *Client) BuildResty() error

BuildResty builds a Resty client.

type CloseReason

type CloseReason TypeIdName

CloseReason represents a close reason. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-close-reason-object

func GetCloseReason

func GetCloseReason(c *Client, ctx context.Context, id int) (*CloseReason, error)

GetCloseReason gets a close reason by ID.

type CustomField

type CustomField struct {
	Active              *bool               `json:"active,omitempty"`
	ApiOnly             *bool               `json:"api_only,omitempty"`
	CustomFieldOptions  []CustomFieldOption `json:"custom_field_options,omitempty"`
	DepartmentIds       []int               `json:"department_ids,omitempty"`
	Departments         []Department        `json:"departments,omitempty"`
	Description         *string             `json:"description,omitempty"`
	ExposeInJobBoardAPI *bool               `json:"expose_in_job_board_api"`
	FieldType           *string             `json:"field_type,omitempty"`
	GenerateEmailToken  *bool               `json:"generate_email_token,omitempty"`
	Id                  *int                `json:"id,omitempty"`
	Name                *string             `json:"name,omitempty"`
	NameKey             *string             `json:"name_key,omitempty"`
	OfficeIds           []int               `json:"office_ids,omitempty"`
	Offices             []Office            `json:"offices,omitempty"`
	Priority            *int                `json:"priority,omitempty"`
	Private             *bool               `json:"private,omitempty"`
	RequireApproval     *bool               `json:"require_approval,omitempty"`
	Required            *bool               `json:"required,omitempty"`
	TemplateTokenString *string             `json:"template_token_string,omitempty"`
	TriggerNewVersion   *bool               `json:"trigger_new_version,omitempty"`
	ValueType           *string             `json:"value_type,omitempty"`
}

CustomField represents a custom field. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-custom-field-object

func GetCustomField

func GetCustomField(c *Client, ctx context.Context, id int) (*CustomField, error)

GetCustomField retrieves a custom field by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-custom-field

type CustomFieldOption

type CustomFieldOption struct {
	ExternalId *string `json:"external_id,omitempty"`
	Id         *int    `json:"id,omitempty"`
	Name       *string `json:"name,omitempty"`
	Priority   *int    `json:"priority,omitempty"`
}

CustomFieldOption represents a custom field option. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-custom-field-options-object

type Degree

type Degree TypeIdNamePriority

Degree represents an education degree. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-education-objects

type DemographicAnswer

type DemographicAnswer struct {
	ApplicationId             *int    `json:"application_id,omitempty"`
	CreatedAt                 *string `json:"created_at,omitempty"`
	DemographicAnswerOptionId *int    `json:"demographic_answer_option_id,omitempty"`
	DemographicQuestionId     *int    `json:"demographic_question_id,omitempty"`
	FreeFormText              *string `json:"free_form_text,omitempty"`
	Id                        *int    `json:"id,omitempty"`
	UpdatedAt                 *string `json:"updated_at,omitempty"`
}

DemographicAnswer represents the answer to a demographic question. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-demographic-answer-object

func GetDemographicAnswer

func GetDemographicAnswer(c *Client, ctx context.Context, id int) (*DemographicAnswer, error)

GetDemographicAnswer gets an answer by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-demographic-answer

type DemographicAnswerOption

type DemographicAnswerOption struct {
	Active                *bool         `json:"active,omitempty"`
	DemographicQuestionId *int          `json:"demographic_question_id,omitempty"`
	FreeForm              *bool         `json:"free_form,omitempty"`
	Id                    *int          `json:"id,omitempty"`
	Name                  *string       `json:"name,omitempty"`
	Translations          []Translation `json:"translations,omitempty"`
}

DemographicAnswerOption represents an option available in a demographic answer. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-demographic-answer-option-object

func GetDemographicAnswerOption

func GetDemographicAnswerOption(c *Client, ctx context.Context, id int) (*DemographicAnswerOption, error)

GetDemographicAnswerOption retrieves an answer option by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-demographic-answer-option

type DemographicQuestion

type DemographicQuestion struct {
	Active                   *bool         `json:"active,omitempty"`
	AnswerType               *string       `json:"answer_type,omitempty"`
	DemographicQuestionSetId *int          `json:"demographic_question_set_id,omitempty"`
	Id                       *int          `json:"id,omitempty"`
	Name                     *string       `json:"name,omitempty"`
	Required                 *bool         `json:"required,omitempty"`
	Translations             []Translation `json:"translations,omitempty"`
}

DemographicQuestion represents a demographic question. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-demographic-question-object

func GetDemographicQuestion

func GetDemographicQuestion(c *Client, ctx context.Context, id int) (*DemographicQuestion, error)

GetDemographicQuestion retrieves a question by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-demographic-question

type DemographicQuestionSet

type DemographicQuestionSet struct {
	Active      *bool   `json:"active,omitempty"`
	Description *string `json:"description,omitempty"`
	Id          *int    `json:"id,omitempty"`
	Title       *string `json:"title,omitempty"`
}

DemographicQuestionSet represents a set of demographic questions. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-demographic-question-set-object

func GetDemographicQuestionSet

func GetDemographicQuestionSet(c *Client, ctx context.Context, id int) (*DemographicQuestionSet, error)

GetDemographicQuestionSet retrieves a question set by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-demographic-question-set

type Department

type Department struct {
	ChildDepartmentExternalIds []string `json:"child_department_external_ids,omitempty"`
	ChildIds                   []int    `json:"child_ids,omitempty"`
	ExternalId                 *string  `json:"external_id,omitempty"`
	Id                         *int     `json:"id,omitempty"`
	Name                       *string  `json:"name,omitempty"`
	ParentDepartmentExternalId *string  `json:"parent_department_external_id,omitempty"`
	ParentId                   *int     `json:"parent_id,omitempty"`
}

Department represents a department. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-department-object

func GetDepartment

func GetDepartment(c *Client, ctx context.Context, id int) (*Department, error)

GetDepartment retrieves a single department by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-department

type Discipline

type Discipline TypeIdNamePriority

Discipline represents an education discipline. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-education-objects

type EEOC

type EEOC struct {
	ApplicationId    *int        `json:"application_id,omitempty"`
	CandidateId      *int        `json:"candidate_id,omitempty"`
	DisabilityStatus *EEOCAnswer `json:"disability_status,omitempty"`
	Gender           *EEOCAnswer `json:"gender,omitempty"`
	Race             *EEOCAnswer `json:"race,omitempty"`
	SubmittedAt      *string     `json:"submitted_at,omitempty"`
	VeteranStatus    *EEOCAnswer `json:"veteran_status,omitempty"`
}

EEOC represents an EEOC object. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-eeoc-object

func GetEEOCForApplication

func GetEEOCForApplication(c *Client, ctx context.Context, applicationId int) (*EEOC, error)

GetEEOCForApplication retrieves EEOC data for an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-eeoc-data-for-application

type EEOCAnswer

type EEOCAnswer struct {
	Description *string `json:"description,omitempty"`
	Id          *int    `json:"id,omitempty"`
	Message     *string `json:"message,omitempty"`
}

EEOCAnswer represents an answer to a question in the EEOC object. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-eeoc-object

type Education

type Education struct {
	Degree       *string `json:"degree,omitempty"`
	DegreeId     *int    `json:"degree_id,omitempty"`
	Discipline   *string `json:"discipline,omitempty"`
	DisciplineId *int    `json:"discipline_id,omitempty"`
	EndDate      *string `json:"end_date,omitempty"`
	EndMonth     *string `json:"end_month,omitempty"`
	EndYear      *string `json:"end_year,omitempty"`
	Id           *int    `json:"id,omitempty"`
	SchoolId     *int    `json:"school_id,omitempty"`
	SchoolName   *string `json:"school_name,omitempty"`
	StartDate    *string `json:"start_date,omitempty"`
	StartMonth   *string `json:"start_month,omitempty"`
	StartYear    *string `json:"start_year,omitempty"`
}

Education represents a candidate's education. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-candidate Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-education

type Email

type Email struct {
	Body      *string `json:"body,omitempty"`
	Cc        *string `json:"cc,omitempty"`
	CreatedAt *string `json:"created_at,omitempty"`
	From      *string `json:"from,omitempty"`
	Id        *int    `json:"id,omitempty"`
	Subject   *string `json:"subject,omitempty"`
	To        *string `json:"to,omitempty"`
	UserId    *int    `json:"user_id,omitempty"`
	User      *User   `json:"user,omitempty"`
}

Email represents an email note in an activity feed. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-activity-feed-object

type EmailTemplate

type EmailTemplate struct {
	Body        *string  `json:"body,omitempty"`
	Cc          []string `json:"cc,omitempty"`
	CreatedAt   *string  `json:"created_at,omitempty"`
	Default     *bool    `json:"default,omitempty"`
	Description *string  `json:"description,omitempty"`
	From        *string  `json:"from,omitempty"`
	HtmlBody    *string  `json:"html_body,omitempty"`
	Id          *int     `json:"id,omitempty"`
	Name        *string  `json:"name,omitempty"`
	Type        *string  `json:"type,omitempty"`
	UpdatedAt   *string  `json:"updated_at,omitempty"`
	User        *User    `json:"user,omitempty"`
}

EmailTemplate represents an email template. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-email-template-object

func GetEmailTemplate

func GetEmailTemplate(c *Client, ctx context.Context, id int) (*EmailTemplate, error)

GetEmailTemplate retrieves an email template by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-email-template

type Employment

type Employment struct {
	CompanyName *string `json:"company_name,omitempty"`
	EndDate     *string `json:"end_date,omitempty"`
	Id          *int    `json:"id,omitempty"`
	StartDate   *string `json:"start_date,omitempty"`
	Title       *string `json:"title,omitempty"`
}

Employment represents a candidate's employment. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-candidate Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-employment

type FutureJobPermission

type FutureJobPermission struct {
	DepartmentId         *int    `json:"department_id,omitempty"`
	ExternalDepartmentId *string `json:"external_department_id,omitempty"`
	ExternalOfficeId     *string `json:"external_office_id,omitempty"`
	Id                   *int    `json:"id,omitempty"`
	OfficeId             *int    `json:"office_id,omitempty"`
	UserRoleId           *int    `json:"user_role_id,omitempty"`
}

FutureJobPermission represents a user's future job permission. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-future-job-permission-object

func GetFutureJobPermission

func GetFutureJobPermission(c *Client, ctx context.Context, userId int, permId int) (*FutureJobPermission, error)

GetFutureJobPermission retrieves a single future job permission by ID.

type HiringMember

type HiringMember struct {
	Active                           *bool   `json:"active,omitempty"`
	EmployeeId                       *string `json:"employee_id,omitempty"`
	FirstName                        *string `json:"first_name,omitempty"`
	Id                               *int    `json:"id,omitempty"`
	LastName                         *string `json:"last_name,omitempty"`
	Name                             *string `json:"name,omitempty"`
	Responsible                      *bool   `json:"responsible,omitempty"`
	ResponsibleForActiveCandidates   *bool   `json:"responsible_for_active_candidates,omitempty"`
	ResponsibleForFutureCandidates   *bool   `json:"responsible_for_future_candidates,omitempty"`
	ResponsibleForInactiveCandidates *bool   `json:"responsible_for_inactive_candidates,omitempty"`
	UserId                           *int    `json:"user_id,omitempty"`
}

HiringMember represents the member of a job's hiring team. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-hiring-team Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-hiring-team-members

type HiringTeam

type HiringTeam struct {
	Members []HiringMember `json:"members,omitempty"`
	Name    *string        `json:"name,omitempty"`
}

HiringTeam represents a job's hiring team. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-hiring-team

type Interview

type Interview struct {
	DefaultInterviewerUsers []Interviewer `json:"default_interviewer_users,omitempty"`
	EstimatedMinutes        *int          `json:"estimated_minutes,omitempty"`
	Id                      *int          `json:"id,omitempty"`
	InterviewKit            *InterviewKit `json:"interview_kit,omitempty"`
	Name                    *string       `json:"name,omitempty"`
	Schedulable             *bool         `json:"schedulable,omitempty"`
}

Interview represents an interview as part of a job stage. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-job-stage-object

type InterviewKit

type InterviewKit struct {
	Content   *string             `json:"content,omitempty"`
	Id        *int                `json:"id,omitempty"`
	Questions []InterviewQuestion `json:"questions,omitempty"`
}

InterviewKit represents a set of questions to be asked during an interview. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-job-stage-object

type InterviewQuestion

type InterviewQuestion struct {
	Id       *int    `json:"id,omitempty"`
	Question *string `json:"question,omitempty"`
}

InterviewQuestion represents an interview question in an interview kit.

type Interviewer

type Interviewer struct {
	User
	Email          *string `json:"email,omitempty"`
	ResponseStatus *string `json:"response_status,omitempty"`
	ScorecardId    *int    `json:"scorecard_id,omitempty"`
	UserId         *int    `json:"user_id,omitempty"`
}

Interviewer is a special User type to represent an interviewer.

type Job

type Job struct {
	ClosedAt          *string                     `json:"closed_at,omitempty"`
	Confidential      *bool                       `json:"confidential,omitempty"`
	CopiedFromId      *int                        `json:"copied_from_id,omitempty"`
	CreatedAt         *string                     `json:"created_at,omitempty"`
	CustomFields      map[string]interface{}      `json:"custom_fields,omitempty"`
	Departments       []Department                `json:"departments,omitempty"`
	HiringTeam        map[string][]HiringMember   `json:"hiring_team,omitempty"`
	Id                *int                        `json:"id,omitempty"`
	IsTemplate        *bool                       `json:"is_template,omitempty"`
	KeyedCustomFields map[string]KeyedCustomField `json:"keyed_custom_fields,omitempty"`
	Name              *string                     `json:"name,omitempty"`
	Notes             *string                     `json:"notes,omitempty"`
	Offices           []Office                    `json:"offices,omitempty"`
	OpenedAt          *string                     `json:"opened_at,omitempty"`
	Openings          []JobOpening                `json:"openings,omitempty"`
	RequisitionId     *string                     `json:"requisition_id,omitempty"`
	Status            *string                     `json:"status,omitempty"`
	UpdatedAt         *string                     `json:"updated_at,omitempty"`
}

Job represents a job. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-job-object

func GetJob

func GetJob(c *Client, ctx context.Context, id int) (*Job, error)

GetJob retrieves a job by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-job

type JobBoard

type JobBoard struct {
	CompanyName *string `json:"company_name,omitempty"`
	Id          *int    `json:"id,omitempty"`
	UrlToken    *string `json:"url_token,omitempty"`
}

JobBoard represents a job board. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-tracking-link-object

type JobCreateInfo

type JobCreateInfo struct {
	DepartmentId         *int     `json:"department_id,omitempty"`
	ExternalDepartmentId *string  `json:"external_department_id,omitempty"`
	ExternalOfficeIds    []string `json:"external_office_ids,omitempty"`
	JobName              *string  `json:"job_name,omitempty"`
	JobPostName          *string  `json:"job_post_name,omitempty"`
	NumberOpenings       *int     `json:"number_of_openings,omitempty"`
	OfficeIds            []int    `json:"office_ids,omitempty"`
	OpeningIds           []string `json:"opening_ids,omitempty"`
	RequisitionId        *string  `json:"requisition_id,omitempty"`
	TemplateJobId        *int     `json:"template_job_id,omitempty"`
}

JobCreateInfo represents the information needed to create a job. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-create-job

type JobOpening

type JobOpening struct {
	ApplicationId *int              `json:"application_id,omitempty"`
	ClosedAt      *string           `json:"closed_at,omitempty"`
	CloseReason   *CloseReason      `json:"close_reason,omitempty"`
	CustomFields  map[string]string `json:"custom_fields,omitempty"`
	Id            *int              `json:"id,omitempty"`
	OpenedAt      *string           `json:"opened_at,omitempty"`
	OpeningId     *string           `json:"opening_id,omitempty"`
	Status        *string           `json:"status,omitempty"`
}

JobOpening represents a job opening. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-job-opening-object

func GetJobOpening

func GetJobOpening(c *Client, ctx context.Context, jobId int, openingId int) (*JobOpening, error)

GetJobOpening retrieves an opening by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-single-opening-for-job

type JobOpeningCreateInfo

type JobOpeningCreateInfo struct {
	Openings []Opening `json:"openings,omitempty"`
}

JobOpeningCreateInfo represents the information needed to create openings. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-create-new-openings

type JobOpeningDeleteInfo

type JobOpeningDeleteInfo struct {
	Ids []int `json:"ids,omitempty"`
}

JobOpeningDeleteInfo represents the information needed to delete openings. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#delete-destroy-openings

type JobOpeningUpdateInfo

type JobOpeningUpdateInfo struct {
	CloseReasonId *int                `json:"close_reason_id,omitempty"`
	CustomFields  []map[string]string `json:"custom_fields,omitempty"`
	Id            *int                `json:"opening_id,omitempty"`
	Status        *string             `json:"status,omitempty"`
}

JobOpeningUpdateInfo represents the information needed to update openings. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-edit-openings

type JobPost

type JobPost struct {
	Active                   *bool                 `json:"active,omitempty"`
	Content                  *string               `json:"content,omitempty"`
	CreatedAt                *string               `json:"created_at,omitempty"`
	DemographicQuestionSetId *int                  `json:"demographic_question_set_id,omitempty"`
	External                 *bool                 `json:"external,omitempty"`
	FirstPublishedAt         *string               `json:"first_published_at,omitempty"`
	Id                       *int                  `json:"id,omitempty"`
	Internal                 *bool                 `json:"internal,omitempty"`
	InternalContent          *string               `json:"internal_content,omitempty"`
	JobId                    *int                  `json:"job_id,omitempty"`
	Live                     *bool                 `json:"live,omitempty"`
	Location                 *string               `json:"location,omitempty"`
	Questions                []DemographicQuestion `json:"questions,omitempty"`
	Title                    *string               `json:"title,omitempty"`
	UpdatedAt                *string               `json:"updated_at,omitempty"`
}

JobPost represents a job post. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-job-post-object

func GetJobPost

func GetJobPost(c *Client, ctx context.Context, id int) (*JobPost, error)

GetJobPost retrieves a job post by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-job-post

func GetJobPostForJob

func GetJobPostForJob(c *Client, ctx context.Context, id int) (*JobPost, error)

GetJobPostsForJob retrieves the post associates with a job. This should probably never be implemented since Greenhouse supports multiple posts per job as of 2016. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-job-post-for-job

type JobPostUpdateInfo

type JobPostUpdateInfo struct {
}

JobPostUpdateInfo represents the information needed to update a job post. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-update-job-post

type JobStage

type JobStage struct {
	CreatedAt  *string     `json:"created_at,omitempty"`
	Id         *int        `json:"id,omitempty"`
	Interviews []Interview `json:"interviews,omitempty"`
	JobId      *int        `json:"job_id,omitempty"`
	Name       *string     `json:"name,omitempty"`
	Priority   *int        `json:"priority,omitempty"`
	UpdatedAt  *string     `json:"updated_at,omitempty"`
}

JobStage represents a job stage. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-job-stage-object

func GetJobStage

func GetJobStage(c *Client, ctx context.Context, id int) (*JobStage, error)

GetJobStage retrieves a job stage by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-job-stage

type JobUpdateInfo

type JobUpdateInfo struct {
	Anywhere                *bool         `json:"anywhere,omitempty"`
	CustomFields            []CustomField `json:"custom_fields,omitempty"`
	DepartmentId            *int          `json:"department_id,omitempty"`
	ExternalDepartmentId    *string       `json:"external_department_id,omitempty"`
	ExternalOfficeIds       []string      `json:"external_office_ids,omitempty"`
	HowToSellThisJob        *string       `json:"how_to_sell_this_job,omitempty"`
	Name                    *string       `json:"name,omitempty"`
	Notes                   *string       `json:"notes,omitempty"`
	OfficeIds               []int         `json:"office_ids,omitempty"`
	RequisitionId           *string       `json:"requisition_id,omitempty"`
	TeamandResponsibilities *string       `json:"team_and_responsibilities,omitempty"`
}

JobUpdateInfo represents the information needed to update a job. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-update-job

type KeyedCustomField

type KeyedCustomField struct {
	Name  *string      `json:"name,omitempty"`
	Type  *string      `json:"type,omitempty"`
	Value *interface{} `json:"value,omitempty"`
}

KeyedCustomField represents a keyed custom field. These are used throughout the API and are basically just a k-v map.

type Location

type Location struct {
	Name *string `json:"name,omitempty"`
}

Location represents the name of a location. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-office-object

type Note

type Note struct {
	Body       *string `json:"body,omitempty"`
	CreatedAt  *string `json:"created_at,omitempty"`
	Id         *int    `json:"id,omitempty"`
	Private    *bool   `json:"private,omitempty"`
	User       *User   `json:"user,omitempty"`
	UserId     *int    `json:"userid,omitempty"`
	Visibility *string `json:"visibility,omitempty"`
}

Note represents a Note activity in the activity feed. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-activity-feed-object

type Offer

type Offer struct {
	ApplicationId     *int                   `json:"application_id,omitempty"`
	CandidateId       *int                   `json:"candidate_id,omitempty"`
	CreatedAt         *string                `json:"created_at,omitempty"`
	CustomFields      map[string]interface{} `json:"custom_fields,omitempty"`
	Id                *int                   `json:"id,omitempty"`
	JobId             *int                   `json:"job_id,omitempty"`
	KeyedCustomFields map[string]interface{} `json:"keyed_custom_fields,omitempty"`
	Opening           *JobOpening            `json:"opening,omitempty"`
	ResolvedAt        *string                `json:"resolved_at,omitempty"`
	SentAt            *string                `json:"sent_at,omitempty"`
	StartsAt          *string                `json:"starts_at,omitempty"`
	Status            *string                `json:"status,omitempty"`
	Version           *int                   `json:"version,omitempty"`
}

Offer represents an offer made to a candidate. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-offer-object

func GetCurrentOfferForApplication

func GetCurrentOfferForApplication(c *Client, ctx context.Context, id int) (*Offer, error)

GetCurrentOfferForApplication retrieves the current offer for an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-current-offer-for-application

func GetOffer

func GetOffer(c *Client, ctx context.Context, id int) (*Offer, error)

GetOffer retrieves an offer by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-offer

type Office

type Office struct {
	ChildIds               []int     `json:"child_ids,omitempty"`
	ChildOfficeExternalIds []string  `json:"child_office_external_ids,omitempty"`
	ExternalId             *string   `json:"external_id,omitempty"`
	Id                     *int      `json:"id,omitempty"`
	Location               *Location `json:"location,omitempty"`
	Name                   *string   `json:"name,omitempty"`
	ParentId               *int      `json:"parent_id,omitempty"`
	ParentOfficeExternalId *string   `json:"parent_office_external_id,omitempty"`
	PrimaryContactUserId   *int      `json:"primary_contact_user_id,omitempty"`
}

Office represents an office. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-office-object

func GetOffice

func GetOffice(c *Client, ctx context.Context, id int) (*Office, error)

GetOffice retrieves an office by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-office

type OfficeCreateInfo

type OfficeCreateInfo struct {
	ExternalId           *string `json:"external_id,omitempty"`
	ExternalParentId     *string `json:"external_parent_id,omitempty"`
	Location             *string `json:"location,omitempty"`
	Name                 *string `json:"name,omitempty"`
	ParentId             *int    `json:"parent_id,omitempty"`
	PrimaryContactUserId *int    `json:"primary_contact_user_id,omitempty"`
}

OfficeCreateInfo represents the information needed to create an office. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-office

type OfficeUpdateInfo

type OfficeUpdateInfo struct {
	ExternalId *string `json:"external_id,omitempty"`
	Location   *string `json:"location,omitempty"`
	Name       *string `json:"name,omitempty"`
}

OfficeUpdateInfo represents the information needed to update an office. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-edit-office

type Opening

type Opening struct {
	CustomFields []map[string]string `json:"custom_fields,omitempty"`
	Id           *int                `json:"opening_id,omitempty"`
}

Opening represents the information needed to create a job opening. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-create-new-openings

type ProspectApplication

type ProspectApplication struct {
	JobIds                  []int          `json:"job_ids,omitempty"`
	Prospect                *bool          `json:"prospect,omitempty"`
	ProspectiveDepartmentId *int           `json:"prospective_department_id,omitempty"`
	ProspectiveOfficeId     *int           `json:"prospective_office_id,omitempty"`
	ProspectOwnerId         *int           `json:"prospect_owner_id,omitempty"`
	ProspectPoolId          *int           `json:"prospect_pool_id,omitempty"`
	ProspectPoolStageId     *int           `json:"prospect_pool_stage_id,omitempty"`
	Referrer                *TypeTypeValue `json:"referrer,omitempty"`
	SourceId                *int           `json:"source_id,omitempty"`
}

ProspectApplication represents the data required to create a prospect application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-application-to-candidate-prospect

type ProspectDetail

type ProspectDetail struct {
	ProspectOwner *TypeIdName `json:"prospect_owner,omitempty"`
	ProspectPool  *TypeIdName `json:"prospect_pool,omitempty"`
	ProspectStage *TypeIdName `json:"prospect_stage,omitempty"`
}

ProspectDetail represents detail about a prospect as used in an application. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-application

type ProspectPool

type ProspectPool struct {
	Active         *bool   `json:"active,omitempty"`
	Id             *int    `json:"id,omitempty"`
	Name           *string `json:"name,omitempty"`
	ProspectStages []Stage `json:"prospect_stages,omitempty"`
}

ProspectPool represents a prospect pool. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-prospect-pools-object

func GetProspectPool

func GetProspectPool(c *Client, ctx context.Context, id int) (*ProspectPool, error)

GetProspectPool retrieves a prospect pool by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-prospect-pool

type RejectionDetails

type RejectionDetails struct {
	CustomFields      map[string]string           `json:"custom_fields,omitempty"`
	KeyedCustomFields map[string]KeyedCustomField `json:"keyed_custom_fields,omitempty"`
}

RejectionDetails represents information about an application rejection. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-application

type RejectionEmail

type RejectionEmail struct {
	EmailTemplateId *string `json:"email_template_id,omitempty"`
	SendEmailAt     *string `json:"send_email_at,omitempty"`
}

RejectionEmail represents a rejection email. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-reject-application

type RejectionReason

type RejectionReason struct {
	Id   *int        `json:"id,omitempty"`
	Name *string     `json:"name,omitempty"`
	Type *TypeIdName `json:"type,omitempty"`
}

RejectionReason represents a rejection reason. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-reject-application

type RespObj

type RespObj struct {
	Id int `json:"id"`
}

RespObj represents a response object.

type ScheduledInterview

type ScheduledInterview struct {
	ApplicationId        *int                    `json:"application_id,omitempty"`
	End                  *ScheduledInterviewDate `json:"end,omitempty"`
	ExternalEventId      *string                 `json:"external_event_id,omitempty"`
	Id                   *int                    `json:"id,omitempty"`
	Interviewers         []Interviewer           `json:"interviewers,omitempty"`
	Location             *string                 `json:"location,omitempty"`
	Organizer            *User                   `json:"organizer,omitempty"`
	Start                *ScheduledInterviewDate `json:"start,omitempty"`
	Status               *string                 `json:"status,omitempty"`
	VideoConferencingUrl *string                 `json:"video_conferencing_url,omitempty"`
}

ScheduledInterview represents a scheduled interview. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-scheduled-interview-object

func GetScheduledInterview

func GetScheduledInterview(c *Client, ctx context.Context, id int) (*ScheduledInterview, error)

GetScheduledInterview retrieves a scheduled interview by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-scheduled-interview

type ScheduledInterviewCreateInfo

type ScheduledInterviewCreateInfo struct {
	ApplicationId   *int          `json:"application_id,omitempty"`
	End             *string       `json:"end,omitempty"`
	ExternalEventId *string       `json:"external_event_id,omitempty"`
	Interviewers    []Interviewer `json:"interviewers,omitempty"`
	InterviewId     *int          `json:"interview_id,omitempty"`
	Start           *string       `json:"start,omitempty"`
}

ScheduledInterviewCreateInfo represents the information needed to create a scheduled interview. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-create-scheduled-interview

type ScheduledInterviewDate

type ScheduledInterviewDate struct {
	Date     *string `json:"date,omitempty"`
	DateTime *string `json:"date_time,omitempty"`
}

ScheduledInterviewDate represents a date object for a scheduled interview.

type ScheduledInterviewUpdateInfo

type ScheduledInterviewUpdateInfo struct {
	End             *string       `json:"end,omitempty"`
	ExternalEventId *string       `json:"external_event_id,omitempty"`
	Interviewers    []Interviewer `json:"interviewers,omitempty"`
	Location        *string       `json:"location,omitempty"`
	Start           *string       `json:"start,omitempty"`
}

ScheduledInterviewUpdateInfo represents the information needed to update a scheduled interview. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-update-scheduled-interview

type School

type School TypeIdNamePriority

School represents a school. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-education-objects

type Scorecard

type Scorecard struct {
	ApplicationId         *int                 `json:"application_id,omitempty"`
	Attributes            []ScorecardAttribute `json:"attributes,omitempty"`
	CandidateId           *int                 `json:"candidate_id,omitempty"`
	CreatedAt             *string              `json:"created_at,omitempty"`
	Id                    *int                 `json:"id,omitempty"`
	Interview             *string              `json:"interview,omitempty"`
	InterviewedAt         *string              `json:"interviewed_at,omitempty"`
	InterviewStep         *Stage               `json:"interview_step,omitempty"`
	Interviewer           *User                `json:"interviewer,omitempty"`
	OverallRecommendation *string              `json:"overall_recommendation,omitempty"`
	Questions             []ScorecardQuestion  `json:"questions,omitempty"`
	Ratings               map[string][]string  `json:"ratings,omitempty"`
	SubmittedAt           *string              `json:"submitted_at,omitempty"`
	SubmittedBy           *User                `json:"submitted_by,omitempty"`
	UpdatedAt             *string              `json:"updated_at,omitempty"`
}

Scorecard represents a scorecard. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-scorecard-object

func GetScorecard

func GetScorecard(c *Client, ctx context.Context, id int) (*Scorecard, error)

GetScorecard retrieves a scorecard by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-scorecard

type ScorecardAttribute

type ScorecardAttribute struct {
	Name   *string `json:"name,omitempty"`
	Note   *string `json:"note,omitempty"`
	Rating *string `json:"rating,omitempty"`
	Type   *string `json:"type,omitempty"`
}

ScorecardAttribute represents attributes present in a scorecard. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-scorecard-object

type ScorecardQuestion

type ScorecardQuestion struct {
	Answer   *string `json:"answer,omitempty"`
	Id       *int    `json:"id,omitempty"`
	Question *string `json:"question,omitempty"`
}

ScorecardQuestion represents a question present in a scorecard. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-scorecard-object

type Source

type Source struct {
	TypeIdName
	PublicName *string     `json:"public_name,omitempty"`
	Type       *TypeIdName `json:"type,omitempty"`
}

Source represents a hiring source. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-source-object

type Stage

type Stage TypeIdName

Stage represents an application stage. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-advance-application

type TrackingLink struct {
	CreatedAt       *string   `json:"created_at,omitempty"`
	CreditedTo      *User     `json:"credited_to,omitempty"`
	Id              *int      `json:"id,omitempty"`
	JobBoard        *JobBoard `json:"job_board,omitempty"`
	JobId           *int      `json:"job_id,omitempty"`
	JobPostId       *int      `json:"job_post_id,omitempty"`
	RelatedPostId   *int      `json:"related_post_id,omitempty"`
	RelatedPostType *string   `json:"related_post_type,omitempty"`
	Source          *Source   `json:"source,omitempty"`
	Token           *string   `json:"token,omitempty"`
	UpdatedAt       *string   `json:"updated_at,omitempty"`
}

TrackingLink represents a tracking link. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-tracking-link-object

func GetTrackingLinkData

func GetTrackingLinkData(c *Client, ctx context.Context, token string) (*TrackingLink, error)

GetTrackingLinkData retrieves link data for a specified token. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-tracking-link-data-for-token

type Translation

type Translation struct {
	Language *string `json:"language,omitempty"`
	Name     *string `json:"name,omitempty"`
}

Translation represents the translation of a question in a demographic answer. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-demographic-answer-option-object

type TypeIdName

type TypeIdName struct {
	Id   *int    `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
}

TypeIdName is a generic type for objects that have an ID and Name.

type TypeIdNamePriority

type TypeIdNamePriority struct {
	TypeIdName
	Priority *int `json:"priority,omitempty"`
}

TypeIdNamePriority is a generic type for objects that have an ID, Name, and Priority.

type TypeTypeValue

type TypeTypeValue struct {
	Type  *string `json:"type,omitempty"`
	Value *string `json:"value,omitempty"`
}

TypeTypeValue is a generic type for objects that have a Type and Value.

type User

type User struct {
	CreatedAt          *string  `json:"created_at,omitempty"`
	Disabled           *bool    `json:"disabled,omitempty"`
	Emails             []string `json:"emails,omitempty"`
	EmployeeId         *string  `json:"employee_id,omitempty"`
	FirstName          *string  `json:"first_name,omitempty"`
	Id                 *int     `json:"id,omitempty"`
	LastName           *string  `json:"last_name,omitempty"`
	LinkedCandidateIds []int    `json:"linked_candidate_ids,omitempty"`
	Name               *string  `json:"name,omitempty"`
	PrimaryEmail       *string  `json:"primary_email_address,omitempty"`
	SiteAdmin          *bool    `json:"site_admin,omitempty"`
	UpdatedAt          *string  `json:"updated_at,omitempty"`
}

User represents a user. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-user-object

func GetUser

func GetUser(c *Client, ctx context.Context, id int) (*User, error)

GetUser retrieves a single user by ID. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#get-retrieve-user

type UserCreateInfo

type UserCreateInfo struct {
	Email     *string `json:"email,omitempty"`
	FirstName *string `json:"first_name,omitempty"`
	LastName  *string `json:"last_name,omitempty"`
	SendEmail *bool   `json:"send_email_invite,omitempty"`
}

UserCreateInfo represents the information needed to create a user. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-user

type UserEmailUpdateInfo

type UserEmailUpdateInfo struct {
	Email            *string `json:"email,omitempty"`
	SendVerification *bool   `json:"send_verification,omitempty"`
}

UserEmailUpdateInfo represents the information needed to update an email address. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#post-add-e-mail-address-to-user

type UserPermission

type UserPermission struct {
	Id         *int `json:"id,omitempty"`
	JobId      *int `json:"job_id,omitempty"`
	UserRoleId *int `json:"user_role_id,omitempty"`
}

UserPermission represents a user permission. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-job-permission-object

func GetJobPermission

func GetJobPermission(c *Client, ctx context.Context, userId int, permId int) (*UserPermission, error)

GetJobPermission retrieves a single permission by ID.

type UserRole

type UserRole struct {
	Id   *int    `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

UserRole represents a user role. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#the-user-role-object

type UserUpdateInfo

type UserUpdateInfo struct {
	FirstName *string `json:"first_name,omitempty"`
	LastName  *string `json:"last_name,omitempty"`
}

UserUpdateInfo represents the information needed to update user. Greenhouse API docs: https://developers.greenhouse.io/harvest.html#patch-edit-user

Jump to

Keyboard shortcuts

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