pipedrive

package
v0.0.0-...-8350139 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VisibleToOwnersAndFollowers = 1
	VisibleToWholeCompany       = 3
)

Variables

This section is empty.

Functions

func Stringify

func Stringify(message interface{}) string

Types

type ActiveFlag

type ActiveFlag uint8

Active flags

const (
	ActiveFlagEnabled  ActiveFlag = 1
	ActiveFlagDisabled ActiveFlag = 0
)

type ActivitiesCreateOptions

type ActivitiesCreateOptions struct {
	Subject      string      `json:"subject,omitempty"`
	Done         uint8       `json:"done,omitempty"`
	Type         string      `json:"type,omitempty"`
	DueDate      string      `json:"due_date,omitempty"`
	DueTime      string      `json:"due_time,omitempty"`
	Duration     string      `json:"duration,omitempty"`
	UserID       uint        `json:"user_id,omitempty"`
	DealID       uint        `json:"user_id,omitempty"`
	PersonID     uint        `json:"person_id,omitempty"`
	Participants interface{} `json:"participants,omitempty"`
	OrgID        uint        `json:"org_id,omitempty"`
}

ActivitiesCreateOptions specifices the optional parameters to the ActivitiesService.Update method.

type ActivitiesReponse

type ActivitiesReponse struct {
	Success        bool           `json:"success"`
	Data           []Activity     `json:"data"`
	AdditionalData AdditionalData `json:"additional_data,omitempty"`
}

ActivitiesReponse represents multiple activities response.

type ActivitiesService

type ActivitiesService service

ActivitiesService handles activities related methods of the Pipedrive API.

Pipedrive API dcos: https://developers.pipedrive.com/docs/api/v1/#!/Activities

func (*ActivitiesService) Create

Create an activity.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Activities/post_activities

func (*ActivitiesService) Delete

func (s *ActivitiesService) Delete(ctx context.Context, id int) (*Response, error)

Delete an activity. Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Activities/delete_activities_id

func (*ActivitiesService) DeleteMultiple

func (s *ActivitiesService) DeleteMultiple(ctx context.Context, ids []int) (*Response, error)

DeleteMultiple activities in bulk.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Activities/delete_activities

func (*ActivitiesService) GetByID

GetByID returns details of a specific activity.

https://developers.pipedrive.com/docs/api/v1/#!/Activities/get_activities

func (*ActivitiesService) List

List returns all activities assigned to a particular user

https://developers.pipedrive.com/docs/api/v1/#!/Activities/get_activities

func (*ActivitiesService) Update

Update an activity

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Activities/put_activities_id

type Activity

type Activity struct {
	ID                 int            `json:"id"`
	CompanyID          int            `json:"company_id"`
	UserID             int            `json:"user_id"`
	Done               bool           `json:"done"`
	Type               string         `json:"type"`
	ReferenceType      string         `json:"reference_type"`
	ReferenceID        int            `json:"reference_id"`
	DueDate            string         `json:"due_date"`
	DueTime            string         `json:"due_time"`
	Duration           string         `json:"duration"`
	AddTime            string         `json:"add_time"`
	MarkedAsDoneTime   string         `json:"marked_as_done_time"`
	Subject            string         `json:"subject"`
	OrgID              int            `json:"org_id"`
	PersonID           int            `json:"person_id"`
	DealID             int            `json:"deal_id"`
	ActiveFlag         bool           `json:"active_flag"`
	UpdateTime         string         `json:"update_time"`
	GcalEventID        interface{}    `json:"gcal_event_id"`
	GoogleCalendarID   interface{}    `json:"google_calendar_id"`
	GoogleCalendarEtag interface{}    `json:"google_calendar_etag"`
	Note               string         `json:"note"`
	CreatedByUserID    int            `json:"created_by_user_id"`
	Participants       []Participants `json:"participants"`
	OrgName            string         `json:"org_name"`
	PersonName         string         `json:"person_name"`
	DealTitle          string         `json:"deal_title"`
	OwnerName          string         `json:"owner_name"`
	PersonDropboxBcc   string         `json:"person_dropbox_bcc"`
	DealDropboxBcc     string         `json:"deal_dropbox_bcc"`
	AssignedToUserID   int            `json:"assigned_to_user_id"`
}

Activity represents a Pipedrive activity.

func (Activity) String

func (a Activity) String() string

type ActivityField

type ActivityField struct {
	ID                 int         `json:"id"`
	Key                string      `json:"key"`
	Name               string      `json:"name"`
	OrderNr            int         `json:"order_nr"`
	PicklistData       interface{} `json:"picklist_data,omitempty"`
	FieldType          string      `json:"field_type"`
	AddTime            string      `json:"add_time"`
	UpdateTime         string      `json:"update_time"`
	ActiveFlag         bool        `json:"active_flag"`
	EditFlag           bool        `json:"edit_flag"`
	IndexVisibleFlag   bool        `json:"index_visible_flag"`
	DetailsVisibleFlag bool        `json:"details_visible_flag"`
	AddVisibleFlag     bool        `json:"add_visible_flag"`
	ImportantFlag      bool        `json:"important_flag"`
	BulkEditAllowed    bool        `json:"bulk_edit_allowed"`
	MandatoryFlag      bool        `json:"mandatory_flag"`
	Options            []struct {
		ID    string `json:"id"`
		Label string `json:"label"`
	} `json:"options,omitempty"`
}

ActivityField represents a Pipedrive activity field.

type ActivityFieldsResponse

type ActivityFieldsResponse struct {
	Success        bool            `json:"success"`
	Data           []ActivityField `json:"data"`
	AdditionalData AdditionalData  `json:"additional_data"`
}

ActivityFieldsResponse represents multiple activity fields response.

type ActivityFieldsService

type ActivityFieldsService service

ActivityFieldsService handles activity fields related methods of the Pipedrive API.

Pipedrive API dcos: https://developers.pipedrive.com/docs/api/v1/#!/ActivityFields

func (*ActivityFieldsService) List

List returns all fields for activity.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/ActivityFields/get_activityFields

type ActivityResponse

type ActivityResponse struct {
	Success bool     `json:"success"`
	Data    Activity `json:"data"`
}

ActivityResponse represents single activity response.

type ActivityType

type ActivityType struct {
	ID           int         `json:"id"`
	OrderNr      int         `json:"order_nr"`
	Name         string      `json:"name"`
	KeyString    string      `json:"key_string"`
	IconKey      string      `json:"icon_key"`
	ActiveFlag   bool        `json:"active_flag"`
	Color        interface{} `json:"color"`
	IsCustomFlag bool        `json:"is_custom_flag"`
	AddTime      string      `json:"add_time"`
	UpdateTime   interface{} `json:"update_time"`
}

ActivityType represents a Pipedrive activity type.

func (ActivityType) String

func (at ActivityType) String() string

type ActivityTypeResponse

type ActivityTypeResponse struct {
	Success bool         `json:"success"`
	Data    ActivityType `json:"data"`
}

ActivityTypeResponse represents single activity type response.

type ActivityTypesAddOptions

type ActivityTypesAddOptions struct {
	Name    string `url:"name"`
	IconKey string `url:"icon_key"`
	Color   string `url:"color,omitempty"`
}

ActivityTypesAddOptions specifices the optional parameters to the ActivityTypesService.Create method.

type ActivityTypesEditOptions

type ActivityTypesEditOptions struct {
	Name    string `url:"name,omitempty"`
	IconKey string `url:"icon_key,omitempty"`
	Color   string `url:"color,omitempty"`
	OrderNr uint   `url:"order_nr,omitempty"`
}

ActivityTypesEditOptions specifices the optional parameters to the ActivityTypesService.Update method.

type ActivityTypesResponse

type ActivityTypesResponse struct {
	Success        bool           `json:"success"`
	Data           []ActivityType `json:"data"`
	AdditionalData AdditionalData `json:"additional_data,omitempty"`
}

ActivityTypesResponse represents multiple activity types response.

type ActivityTypesService

type ActivityTypesService service

ActivityTypesService handles activities related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/ActivityTypes

func (*ActivityTypesService) Create

Create a new activity type.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/ActivityTypes/post_activityTypes

func (*ActivityTypesService) Delete

func (s *ActivityTypesService) Delete(ctx context.Context, id int) (*Response, error)

Delete an activity type.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/ActivityTypes/delete_activityTypes_id

func (*ActivityTypesService) DeleteMultiple

func (s *ActivityTypesService) DeleteMultiple(ctx context.Context, ids []int) (*Response, error)

DeleteMultiple deletes activity types in bulk.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/ActivityTypes/delete_activityTypes

func (*ActivityTypesService) List

List all activity types.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/ActivityTypes/get_activityTypes

type AdditionalData

type AdditionalData struct {
	User struct {
		Profile struct {
			ID              int         `json:"id"`
			Email           string      `json:"email"`
			Name            string      `json:"name"`
			IsAdmin         bool        `json:"is_admin"`
			DefaultCurrency string      `json:"default_currency"`
			IconURL         interface{} `json:"icon_url"`
			Activated       bool        `json:"activated"`
		} `json:"profile"`
		Locale struct {
			Language        string `json:"language"`
			Country         string `json:"country"`
			Uses12HourClock bool   `json:"uses_12_hour_clock"`
		} `json:"locale"`
		Timezone struct {
			Name   string `json:"name"`
			Offset int    `json:"offset"`
		} `json:"timezone"`
	} `json:"user"`
	MultipleCompanies   bool       `json:"multiple_companies"`
	DefaultCompanyID    int        `json:"default_company_id"`
	CompanyID           int        `json:"company_id"`
	SinceTimestamp      string     `json:"since_timestamp"`
	LastTimestampOnPage string     `json:"last_timestamp_on_page"`
	Pagination          Pagination `json:"pagination"`
}

type Authorization

type Authorization struct {
	UserID    int    `json:"user_id"`
	CompanyID int    `json:"company_id"`
	APIToken  string `json:"api_token"`
	AddTime   string `json:"add_time"`
	Company   struct {
		Info struct {
			ID                 int         `json:"id"`
			Name               string      `json:"name"`
			CreatorCompanyID   interface{} `json:"creator_company_id"`
			PlanID             int         `json:"plan_id"`
			Identifier         string      `json:"identifier"`
			Domain             string      `json:"domain"`
			BillingCurrency    string      `json:"billing_currency"`
			AddTime            string      `json:"add_time"`
			Status             string      `json:"status"`
			TrialEnds          string      `json:"trial_ends"`
			CancelledFlag      bool        `json:"cancelled_flag"`
			CancelTime         interface{} `json:"cancel_time"`
			Country            string      `json:"country"`
			PromoCode          string      `json:"promo_code"`
			UsedPromoCodeKey   string      `json:"used_promo_code_key"`
			AccountIsOpen      bool        `json:"account_is_open"`
			AccountIsNotPaying bool        `json:"account_is_not_paying"`
		} `json:"info"`
		Features []string `json:"features"`
		Settings struct {
			ShowGettingStartedVideo                 bool          `json:"show_getting_started_video"`
			ListLimit                               int           `json:"list_limit"`
			BetaApp                                 bool          `json:"beta_app"`
			FileUploadDestination                   string        `json:"file_upload_destination"`
			CalltoLinkSyntax                        string        `json:"callto_link_syntax"`
			AutofillDealExpectedCloseDate           bool          `json:"autofill_deal_expected_close_date"`
			PersonDuplicateCondition                string        `json:"person_duplicate_condition"`
			OrganizationDuplicateCondition          string        `json:"organization_duplicate_condition"`
			AddFollowersWhenImporting               bool          `json:"add_followers_when_importing"`
			SearchBackend                           string        `json:"search_backend"`
			BillingManagedBySales                   bool          `json:"billing_managed_by_sales"`
			MaxDealAgeInAverageProgressCalculation  int           `json:"max_deal_age_in_average_progress_calculation"`
			ThirdPartyLinks                         []interface{} `json:"third_party_links"`
			ElasticWriteTargetDuringMigration       string        `json:"elastic_write_target_during_migration"`
			AutoCreateNewPersonsFromForwarderEmails bool          `json:"auto_create_new_persons_from_forwarder_emails"`
			CompanyAdvancedDebugLogs                bool          `json:"company_advanced_debug_logs"`
			DealBlockOrder                          []struct {
				Type    string `json:"type"`
				Visible bool   `json:"visible"`
			} `json:"deal_block_order"`
			PersonBlockOrder []struct {
				Type    string `json:"type"`
				Visible bool   `json:"visible"`
			} `json:"person_block_order"`
			OrganizationBlockOrder []struct {
				Type    string `json:"type"`
				Visible bool   `json:"visible"`
			} `json:"organization_block_order"`
			NylasSync          bool `json:"nylas_sync"`
			OnboardingComplete bool `json:"onboarding_complete"`
		} `json:"settings"`
	} `json:"company"`
}

Authorization represents a Pipedrive authorization.

func (Authorization) String

func (a Authorization) String() string

type AuthorizationsListOptions

type AuthorizationsListOptions struct {
	Email    string `url:"email,omitempty"`
	Password string `url:"password,omitempty"`
}

AuthorizationsListOptions specifices the optional parameters to the AuthorizationsService.List method.

type AuthorizationsResponse

type AuthorizationsResponse struct {
	Success        bool            `json:"success"`
	Data           []Authorization `json:"data"`
	AdditionalData AdditionalData  `json:"additional_data"`
}

AuthorizationsResponse represents multiple authorizations response.

type AuthorizationsService

type AuthorizationsService service

AuthorizationsService handles authorization related methods of the Pipedrive API.

Pipedrive API dcos: https://developers.pipedrive.com/docs/api/v1/#!/Authorizations

func (*AuthorizationsService) List

List returns all authorizations for a particular user.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Authorizations/post_authorizations

type Client

type Client struct {

	// Base URL for API requests. Defaults to the public Pipedrive API, but can be
	// set to a domain endpoint to use. BaseURL should
	// always be specified with a trailing slash.
	BaseURL *url.URL

	Deals             *DealService
	Currencies        *CurrenciesService
	NoteFields        *NoteFieldsService
	Notes             *NotesService
	Recents           *RecentsService
	SearchResults     *SearchResultsService
	Users             *UsersService
	Filters           *FiltersService
	Activities        *ActivitiesService
	ActivityFields    *ActivityFieldsService
	ActivityTypes     *ActivityTypesService
	Authorizations    *AuthorizationsService
	Stages            *StagesService
	Webhooks          *WebhooksService
	UserConnections   *UserConnectionsService
	GoalsService      *GoalsService
	PipelinesService  *PipelinesService
	UserSettings      *UserSettingsService
	Files             *FilesService
	ProductFields     *ProductFieldsService
	Products          *ProductsService
	PersonFields      *PersonFieldsService
	OrganizationField *OrganizationFieldsService
	DealFields        *DealFieldsService
	Persons           *PersonsService
	Organizations     *OrganizationsService
	// contains filtered or unexported fields
}

func NewClient

func NewClient(options *Config) *Client

func (*Client) Do

func (c *Client) Do(ctx context.Context, request *http.Request, v interface{}) (*Response, error)

Do sends an API request and returns the API response. T

The provided ctx must be non-nil. If it is canceled or times out, ctx.Err() will be returned.

func (*Client) NewRequest

func (c *Client) NewRequest(method, url string, opt interface{}, body interface{}) (*http.Request, error)

func (*Client) SetOptions

func (c *Client) SetOptions(options ...func(*Client) error) error

type Config

type Config struct {
	APIKey        string
	CompanyDomain string
}

type CreateRemoteLinkedFileOptions

type CreateRemoteLinkedFileOptions struct {
	FileType       string `url:"file_type,omitempty"`
	Title          string `url:"title,omitempty"`
	ItemType       string `url:"item_type,omitempty"`
	ItemID         uint   `url:"item_id,omitempty"`
	RemoteLocation string `url:"remote_location,omitempty"`
}

CreateRemoteLinkedFileOptions specifices the optional parameters to the FilesService.CreateRemoteLinkedFile method.

type CurrenciesListOptions

type CurrenciesListOptions struct {
	Term string `url:"term,omitempty"`
}

CurrenciesListOptions specifices the optional parameters to the CurrenciesService.List method.

type CurrenciesResponse

type CurrenciesResponse struct {
	Success   bool       `json:"success,omitempty"`
	Data      []Currency `json:"data,omitempty"`
	Error     string     `json:"error"`
	ErrorInfo string     `json:"error_info"`
}

CurrenciesResponse represents multiple currencies response.

type CurrenciesService

type CurrenciesService service

CurrenciesService handles currencies related methods of the Pipedrive API.

Pipedrive API dcos: https://developers.pipedrive.com/docs/api/v1/#!/Currencies

func (*CurrenciesService) List

List returns all supported currencies in given account which should be used when saving monetary values with other objects.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Currencies/get_currencies

type Currency

type Currency struct {
	ID            int    `json:"id,omitempty"`
	Code          string `json:"code,omitempty"`
	Name          string `json:"name,omitempty"`
	DecimalPoints int    `json:"decimal_points,omitempty"`
	Symbol        string `json:"symbol"`
	ActiveFlag    bool   `json:"active_flag,omitempty"`
	IsCustomFlag  bool   `json:"is_custom_flag,omitempty"`
}

Currency represents a Pipedrive currency.

func (Currency) String

func (c Currency) String() string

type Deal

type Deal struct {
	ID            int `json:"id"`
	CreatorUserID struct {
		ID         int    `json:"id"`
		Name       string `json:"name"`
		Email      string `json:"email"`
		HasPic     bool   `json:"has_pic"`
		PicHash    string `json:"pic_hash"`
		ActiveFlag bool   `json:"active_flag"`
		Value      int    `json:"value"`
	} `json:"creator_user_id"`
	UserID struct {
		ID         int    `json:"id"`
		Name       string `json:"name"`
		Email      string `json:"email"`
		HasPic     bool   `json:"has_pic"`
		PicHash    string `json:"pic_hash"`
		ActiveFlag bool   `json:"active_flag"`
		Value      int    `json:"value"`
	} `json:"user_id"`
	PersonID struct {
		Name  string `json:"name"`
		Email []struct {
			Value   string `json:"value"`
			Primary bool   `json:"primary"`
		} `json:"email"`
		Phone []struct {
			Value   string `json:"value"`
			Primary bool   `json:"primary"`
		} `json:"phone"`
		Value int `json:"value"`
	} `json:"person_id"`
	OrgID struct {
		Name        string      `json:"name"`
		PeopleCount int         `json:"people_count"`
		OwnerID     int         `json:"owner_id"`
		Address     interface{} `json:"address"`
		CcEmail     string      `json:"cc_email"`
		Value       int         `json:"value"`
	} `json:"org_id"`
	StageID                  int         `json:"stage_id"`
	Title                    string      `json:"title"`
	Value                    float64     `json:"value"`
	Currency                 string      `json:"currency"`
	AddTime                  string      `json:"add_time"`
	UpdateTime               string      `json:"update_time"`
	StageChangeTime          string      `json:"stage_change_time"`
	Active                   bool        `json:"active"`
	Deleted                  bool        `json:"deleted"`
	Status                   string      `json:"status"`
	Probability              interface{} `json:"probability"`
	NextActivityDate         interface{} `json:"next_activity_date"`
	NextActivityTime         interface{} `json:"next_activity_time"`
	NextActivityID           interface{} `json:"next_activity_id"`
	LastActivityID           int         `json:"last_activity_id"`
	LastActivityDate         string      `json:"last_activity_date"`
	LostReason               string      `json:"lost_reason"`
	VisibleTo                string      `json:"visible_to"`
	CloseTime                string      `json:"close_time"`
	PipelineID               int         `json:"pipeline_id"`
	WonTime                  interface{} `json:"won_time"`
	FirstWonTime             interface{} `json:"first_won_time"`
	LostTime                 string      `json:"lost_time"`
	ProductsCount            int         `json:"products_count"`
	FilesCount               int         `json:"files_count"`
	NotesCount               int         `json:"notes_count"`
	FollowersCount           int         `json:"followers_count"`
	EmailMessagesCount       int         `json:"email_messages_count"`
	ActivitiesCount          int         `json:"activities_count"`
	DoneActivitiesCount      int         `json:"done_activities_count"`
	UndoneActivitiesCount    int         `json:"undone_activities_count"`
	ReferenceActivitiesCount int         `json:"reference_activities_count"`
	ParticipantsCount        int         `json:"participants_count"`
	ExpectedCloseDate        interface{} `json:"expected_close_date"`
	LastIncomingMailTime     interface{} `json:"last_incoming_mail_time"`
	LastOutgoingMailTime     interface{} `json:"last_outgoing_mail_time"`
	StageOrderNr             int         `json:"stage_order_nr"`
	PersonName               string      `json:"person_name"`
	OrgName                  string      `json:"org_name"`
	NextActivitySubject      interface{} `json:"next_activity_subject"`
	NextActivityType         interface{} `json:"next_activity_type"`
	NextActivityDuration     interface{} `json:"next_activity_duration"`
	NextActivityNote         interface{} `json:"next_activity_note"`
	FormattedValue           string      `json:"formatted_value"`
	RottenTime               interface{} `json:"rotten_time"`
	WeightedValue            int         `json:"weighted_value"`
	FormattedWeightedValue   string      `json:"formatted_weighted_value"`
	OwnerName                string      `json:"owner_name"`
	CcEmail                  string      `json:"cc_email"`
	OrgHidden                bool        `json:"org_hidden"`
	PersonHidden             bool        `json:"person_hidden"`
	OfflineCommunication     string      `json:"b556c5618b88cd3d33f99b996b5b2fdbc8ba3c7e"`
	ServicePrice             float64     `json:"6906ddfb72aaef6810b35703de142db0f435c314"`
	AgencyInCharge           struct {
		Name        string      `json:"name"`
		PeopleCount int         `json:"people_count"`
		OwnerID     int         `json:"owner_id"`
		Address     interface{} `json:"address"`
		CcEmail     string      `json:"cc_email"`
		Value       float32     `json:"value"`
	} `json:"eb2a2df8945c29118a01d324c58fbf6cef7bfd43"`
	WantedStartTime     string `json:"a3114acce61bb930180af173b395d76f42af8794"`
	RequirementAnalysis string `json:"56d3d40c37c0db60fff576ae73ba2fea0d58dc09"`
	DepartureCurrentCT  string `json:"ffd2a712d781417ef17a33b3540d3ecd8d945f76"`
	ArrivalNextCT       string `json:"f5bb67b24aec5f9733be8b3402bf1fe5b1ac6ed6"`
	LeadSource          uint   `json:"5d4fbabc9b032aeb3df515d9c66994d6892ee062"`
	TemporaryLink       string `json:"4fe88fad67d8dcbc17d18d9ee1faac55122249fd"`
	RideCosts           string `json:"31443a48d1405182dfccac9bf378bbe8216ffc9a"`
}

Deal represents a Pipedrive deal.

func (Deal) String

func (d Deal) String() string

type DealCreateOptions

type DealCreateOptions struct {
	Title               string    `json:"title"`
	Value               string    `json:"value"`
	Currency            string    `json:"currency"`
	UserID              uint      `json:"user_id"`
	PersonID            uint      `json:"person_id"`
	OrgID               uint      `json:"org_id"`
	StageID             uint      `json:"stage_id"`
	Status              string    `json:"status"`
	Probability         uint      `json:"probability"`
	LostReason          string    `json:"lost_reason"`
	AddTime             Timestamp `json:"add_time"`
	VisibleTo           VisibleTo `json:"visible_to"`
	RequirementAnalysis string    `json:"56d3d40c37c0db60fff576ae73ba2fea0d58dc09"`
	WantedStartTime     Timestamp `json:"a3114acce61bb930180af173b395d76f42af8794"`
	TemporaryLink       string    `json:"4fe88fad67d8dcbc17d18d9ee1faac55122249fd,omitempty"`
	LeadSource          uint      `json:"5d4fbabc9b032aeb3df515d9c66994d6892ee062,omitempty"`
}

DealCreateOptions specifices the optional parameters to the DealsService.Create method.

type DealField

type DealField struct {
	ID                 int         `json:"id"`
	Key                string      `json:"key"`
	Name               string      `json:"name"`
	OrderNr            int         `json:"order_nr,omitempty"`
	PicklistData       interface{} `json:"picklist_data,omitempty"`
	FieldType          string      `json:"field_type"`
	AddTime            string      `json:"add_time,omitempty"`
	UpdateTime         string      `json:"update_time,omitempty"`
	ActiveFlag         bool        `json:"active_flag"`
	EditFlag           bool        `json:"edit_flag"`
	IndexVisibleFlag   bool        `json:"index_visible_flag,omitempty"`
	DetailsVisibleFlag bool        `json:"details_visible_flag,omitempty"`
	AddVisibleFlag     bool        `json:"add_visible_flag,omitempty"`
	ImportantFlag      bool        `json:"important_flag,omitempty"`
	BulkEditAllowed    bool        `json:"bulk_edit_allowed,omitempty"`
	SearchableFlag     bool        `json:"searchable_flag,omitempty"`
	FilteringAllowed   bool        `json:"filtering_allowed,omitempty"`
	SortableFlag       bool        `json:"sortable_flag,omitempty"`
	UseField           string      `json:"use_field,omitempty"`
	Link               string      `json:"link,omitempty"`
	MandatoryFlag      bool        `json:"mandatory_flag"`
	IsSubfield         bool        `json:"is_subfield,omitempty"`
	Options            []struct {
		ID    string `json:"id"`
		Label string `json:"label"`
	} `json:"options,omitempty"`
	BulkEditAllowedConditions struct {
		Status string `json:"status"`
	} `json:"bulk_edit_allowed_conditions,omitempty"`
}

DealField represents a Pipedrive deal.

func (DealField) String

func (d DealField) String() string

type DealFieldCreateOptions

type DealFieldCreateOptions struct {
	Name      string    `url:"name,omitempty"`
	FieldType FieldType `url:"field_type,omitempty"`
	Options   string    `url:"options,omitempty"`
}

DealFieldCreateOptions specifices the optional parameters to the DealFieldsService.Create method.

type DealFieldResponse

type DealFieldResponse struct {
	Success        bool           `json:"success"`
	Data           DealField      `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

DealFieldResponse represents single deal field response.

type DealFieldUpdateOptions

type DealFieldUpdateOptions struct {
	Name    string `url:"name,omitempty"`
	Options string `url:"options,omitempty"`
}

DealFieldUpdateOptions specifices the optional parameters to the DealFieldsService.Update method.

type DealFieldsResponse

type DealFieldsResponse struct {
	Success        bool           `json:"success"`
	Data           []DealField    `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

DealFieldsResponse represents multiple deal fields response.

type DealFieldsService

type DealFieldsService service

DealFieldsService handles deal fields related methods of the Pipedrive API.

Pipedrive API dcos: https://developers.pipedrive.com/docs/api/v1/#!/DealFields

func (*DealFieldsService) Create

Create a new deal field.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/DealFields/post_dealFields

func (*DealFieldsService) Delete

func (s *DealFieldsService) Delete(ctx context.Context, id uint) (*Response, error)

Delete a deal field.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/DealFields/delete_dealFields_id

func (*DealFieldsService) DeleteMultiple

func (s *DealFieldsService) DeleteMultiple(ctx context.Context, ids []int) (*Response, error)

DeleteMultiple deletes deal fields in bulk.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/DealFields/delete_dealFields

func (*DealFieldsService) GetByID

GetByID returns specific deal field.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/DealFields/get_dealFields_id

func (*DealFieldsService) List

List all deal fields.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/DealFields/get_dealFields

func (*DealFieldsService) Update

Update a deal field.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/DealFields/put_dealFields_id

type DealProbability

type DealProbability uint8

Deal probability

const (
	DealProbabilityEnabled  DealProbability = 1
	DealProbabilityDisabled DealProbability = 0
)

type DealResponse

type DealResponse struct {
	Success        bool           `json:"success,omitempty"`
	Data           Deal           `json:"data,omitempty"`
	AdditionalData AdditionalData `json:"additional_data,omitempty"`
}

DealResponse represents single deal response.

type DealService

type DealService service

DealService handles deals related methods of the Pipedrive API.

Pipedrive API dcos: https://developers.pipedrive.com/docs/api/v1/#!/Deals

func (*DealService) Create

Create a new deal.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Deals/post_deals

func (*DealService) Delete

func (s *DealService) Delete(ctx context.Context, id int) (*Response, error)

Delete a deal.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Deals/delete_deals_id

func (*DealService) DeleteAttachedProduct

func (s *DealService) DeleteAttachedProduct(ctx context.Context, dealID int, productAttachmentID int) (*Response, error)

DeleteAttachedProduct deletes attached product.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Deals/delete_deals_id_products_product_attachment_id

func (*DealService) DeleteFollower

func (s *DealService) DeleteFollower(ctx context.Context, id int, followerID int) (*Response, error)

DeleteFollower of a deal.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Deals/delete_deals_id_followers_follower_id

func (*DealService) DeleteMultiple

func (s *DealService) DeleteMultiple(ctx context.Context, ids []int) (*Response, error)

DeleteMultiple deletes deals in bulk.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Deals/delete_deals

func (*DealService) DeleteParticipant

func (s *DealService) DeleteParticipant(ctx context.Context, dealID int, participantID int) (*Response, error)

DeleteParticipant deletes participant in a deal.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Deals/delete_deals_id_participants_deal_participant_id

func (*DealService) Duplicate

func (s *DealService) Duplicate(ctx context.Context, id int) (*DealResponse, *Response, error)

Duplicate a deal.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Deals/post_deals_id_duplicate

func (*DealService) Find

func (s *DealService) Find(ctx context.Context, term string) (*DealsResponse, *Response, error)

Find deals by name.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Deals/get_deals_find

func (*DealService) List

func (s *DealService) List(ctx context.Context, filterID int) (*DealsResponse, *Response, error)

List deals.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Deals/get_deals

func (*DealService) ListUpdates

func (s *DealService) ListUpdates(ctx context.Context, id int) (*DealsResponse, *Response, error)

ListUpdates about a deal.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Deals/get_deals_id_flow

func (*DealService) Merge

func (s *DealService) Merge(ctx context.Context, id int, opt *DealsMergeOptions) (*Response, error)

Merge two deals.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Deals/put_deals_id_merge

func (*DealService) Update

func (s *DealService) Update(ctx context.Context, id int, opt *DealsUpdateOptions) (*Response, error)

Update a deal. Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Deals/put_deals_id

type DealsMergeOptions

type DealsMergeOptions struct {
	MergeWithID uint `url:"merge_with_id,omitempty"`
}

DealsMergeOptions specifices the optional parameters to the DealService.Merge method.

type DealsResponse

type DealsResponse struct {
	Success        bool           `json:"success,omitempty"`
	Data           []Deal         `json:"data,omitempty"`
	AdditionalData AdditionalData `json:"additional_data,omitempty"`
}

DealsResponse represents multiple deals response.

type DealsUpdateOptions

type DealsUpdateOptions struct {
	Title               string `json:"title,omitempty"`
	Value               string `json:"value,omitempty"`
	Currency            string `json:"currency,omitempty"`
	UserID              uint   `json:"user_id,omitempty"`
	PersonID            uint   `json:"person_id,omitempty"`
	OrganizationID      uint   `json:"org_id,omitempty"`
	StageID             uint   `json:"stage_id,omitempty"`
	Status              string `json:"status,omitempty"`
	LostReason          string `json:"lost_reason,omitempty"`
	VisibleTo           uint   `json:"visible_to,omitempty"`
	RequirementAnalysis string `json:"56d3d40c37c0db60fff576ae73ba2fea0d58dc09,omitempty"`
	TemporaryLink       string `json:"4fe88fad67d8dcbc17d18d9ee1faac55122249fd,omitempty"`
}

DealsUpdateOptions specifices the optional parameters to the DealService.Update method.

type DeleteMultipleOptions

type DeleteMultipleOptions struct {
	Ids string `url:"ids,omitempty"`
}

type DeletePermissionSetAssignmentOptions

type DeletePermissionSetAssignmentOptions struct {
	PermissionSetID uint `url:"permission_set_id,omitempty"`
}

DeletePermissionSetAssignmentOptions specifices the optional parameters to the UsersService.DeletePermissionSetAssignment method.

type DeleteRoleAssignmentOptions

type DeleteRoleAssignmentOptions struct {
	RoleID uint `url:"role_id,omitempty"`
}

DeleteRoleAssignmentOptions specifices the optional parameters to the UsersService.DeleteRoleAssignment method.

type Email

type Email struct {
	Label   string `json:"label"`
	Value   string `json:"value"`
	Primary bool   `json:"primary"`
}

type ErrorFields

type ErrorFields struct {
	Error     string `json:"error"`
	ErrorInfo string `json:"error_info"`
}

type ErrorResponse

type ErrorResponse struct {
	Response *http.Response
	Message  string
}

ErrorResponse reports one or more errors caused by an API request.

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

type EventAction

type EventAction string

Type of actions.

const (
	ACTION_ADDED   EventAction = "added"
	ACTION_UPDATED EventAction = "updated"
	ACTION_MERGED  EventAction = "merged"
	ACTION_DELETED EventAction = "deleted"
	ACTION_ALL     EventAction = "all"
)

type EventObject

type EventObject string

Type of objects.

const (
	OBJECT_ACTIVITY      EventObject = "activity"
	OBJECT_ACTIVTIY_TYPE EventObject = "activity_type"
	OBJECT_DEAL          EventObject = "deal"
	OBJECT_NOTE          EventObject = "note"
	OBJECT_ORGANIZATION  EventObject = "organization"
	OBJECT_PERSON        EventObject = "person"
	OBJECT_PIPELINE      EventObject = "pipeline"
	OBJECT_PRODUCT       EventObject = "product"
	OBJECT_STAGE         EventObject = "stage"
	OBJECT_USER          EventObject = "user"
	OBJECT_ALL_          EventObject = "*"
)

type FieldType

type FieldType string

Field types

const (
	FieldTypeVarchar     FieldType = "varchar"
	FieldTypeVarcharAuto FieldType = "varchar_auto"
	FieldTypeText        FieldType = "text"
	FieldTypeDouble      FieldType = "double"
	FieldTypeMonetary    FieldType = "monetary"
	FieldTypeDate        FieldType = "date"
	FieldTypeSet         FieldType = "set"
	FieldTypeEnum        FieldType = "enum"
	FieldTypeUser        FieldType = "user"
	FieldTypeOrg         FieldType = "org"
	FieldTypePeople      FieldType = "people"
	FieldTypePhone       FieldType = "phone"
	FieldTypeTime        FieldType = "time"
	FieldTypeTimerange   FieldType = "timerange"
	FieldTypeDaterange   FieldType = "daterange"
)

type File

type File struct {
	ID             int         `json:"id"`
	UserID         int         `json:"user_id"`
	DealID         int         `json:"deal_id"`
	PersonID       int         `json:"person_id"`
	OrgID          int         `json:"org_id"`
	ProductID      interface{} `json:"product_id"`
	EmailMessageID interface{} `json:"email_message_id"`
	ActivityID     interface{} `json:"activity_id"`
	NoteID         interface{} `json:"note_id"`
	LogID          interface{} `json:"log_id"`
	AddTime        string      `json:"add_time"`
	UpdateTime     string      `json:"update_time"`
	FileName       string      `json:"file_name"`
	FileType       string      `json:"file_type"`
	FileSize       int         `json:"file_size"`
	ActiveFlag     bool        `json:"active_flag"`
	InlineFlag     bool        `json:"inline_flag"`
	RemoteLocation string      `json:"remote_location"`
	RemoteID       string      `json:"remote_id"`
	Cid            interface{} `json:"cid"`
	S3Bucket       interface{} `json:"s3_bucket"`
	MailMessageID  interface{} `json:"mail_message_id"`
	DealName       string      `json:"deal_name"`
	PersonName     string      `json:"person_name"`
	OrgName        string      `json:"org_name"`
	ProductName    interface{} `json:"product_name"`
	URL            string      `json:"url"`
	Name           string      `json:"name"`
	Description    interface{} `json:"description"`
}

File represents a Pipedrive file.

func (File) String

func (f File) String() string

type FileResponse

type FileResponse struct {
	Success        bool           `json:"success"`
	Data           File           `json:"data"`
	AdditionalData AdditionalData `json:"additional_data,omitempty"`
}

FileResponse represents single file response.

type FilesResponse

type FilesResponse struct {
	Success        bool           `json:"success"`
	Data           []File         `json:"data"`
	AdditionalData AdditionalData `json:"additional_data,omitempty"`
}

FilesResponse represents multiple files response.

type FilesService

type FilesService service

FilesService handles files related methods of the Pipedrive API.

Pipedrive API dcos: https://developers.pipedrive.com/docs/api/v1/#!/Files

func (*FilesService) CreateRemoteLinkedFile

func (s *FilesService) CreateRemoteLinkedFile(ctx context.Context, opt *CreateRemoteLinkedFileOptions) (*FileResponse, *Response, error)

CreateRemoteLinkedFile creates a remote file and link it to an item.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Files/post_files_remote

func (*FilesService) Delete

func (s *FilesService) Delete(ctx context.Context, id int) (*Response, error)

Delete marks a file as deleted.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Files/delete_files_id

func (*FilesService) GetByID

func (s *FilesService) GetByID(ctx context.Context, id int) (*FileResponse, *Response, error)

GetByID returns specific file.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Files/get_files_id

func (*FilesService) GetDownloadLinkByID

func (s *FilesService) GetDownloadLinkByID(id int) (string, *http.Request, error)

GetDownloadLinkByID returns link for specific file.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Files/get_files_id_download

func (*FilesService) LinkRemoteFileToItem

func (s *FilesService) LinkRemoteFileToItem(ctx context.Context, opt *LinkRemoteFileToItemOptions) (*FileResponse, *Response, error)

LinkRemoteFileToItem links an existing remote file (googledrive, etc) to the item you supply.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Files/post_files_remoteLink

func (*FilesService) List

List all files.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Files/get_files

func (*FilesService) Update

Update the properties of a file.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Files/put_files_id

func (*FilesService) Upload

func (s *FilesService) Upload(ctx context.Context, fileName string, filePath string) (*FileResponse, *Response, error)

Upload a file.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Files/post_files

type Filter

type Filter struct {
	ID            int         `json:"id"`
	Name          string      `json:"name"`
	ActiveFlag    bool        `json:"active_flag"`
	Type          string      `json:"type"`
	TemporaryFlag interface{} `json:"temporary_flag"`
	UserID        int         `json:"user_id"`
	AddTime       string      `json:"add_time"`
	UpdateTime    string      `json:"update_time"`
	VisibleTo     string      `json:"visible_to"`
	CustomViewID  int         `json:"custom_view_id"`
}

Filter represents a Pipedrive filter.

func (Filter) String

func (f Filter) String() string

type FilterConditions

type FilterConditions struct {
	Glue       string `json:"glue"`
	Conditions []struct {
		Glue       string `json:"glue"`
		Conditions []struct {
			Object     string      `json:"object"`
			FieldID    string      `json:"field_id"`
			Operator   string      `json:"operator"`
			Value      string      `json:"value"`
			ExtraValue interface{} `json:"extra_value"`
		} `json:"conditions"`
	} `json:"conditions"`
}

FilterConditions represents filter conditions.

type FilterCreateOptions

type FilterCreateOptions struct {
	Name       string `url:"name,omitempty"`
	Conditions string `url:"conditions,omitempty"`
	Type       string `url:"type,omitempty"`
}

FilterCreateOptions specifices the optional parameters to the FiltersService.Create method.

type FilterOptions

type FilterOptions struct {
	FilterID int    `url:"filter_id"`
	Status   string `url:"status"`
}

type FilterResponse

type FilterResponse struct {
	Success bool `json:"success"`
	Data    struct {
		Filter
		Conditions FilterConditions `json:"conditions"`
	} `json:"data"`
}

FilterResponse represents single filter response.

type FilterUpdateOptions

type FilterUpdateOptions struct {
	Name       string `url:"name,omitempty"`
	Conditions string `url:"conditions,omitempty"`
}

FilterUpdateOptions specifices the optional parameters to the FiltersService.Update method.

type FiltersListOptions

type FiltersListOptions struct {
	Type string `url:"type,omitempty"`
}

FiltersListOptions specifices the optional parameters to the FiltersService.List method.

type FiltersResponse

type FiltersResponse struct {
	Success        bool           `json:"success"`
	Data           []Filter       `json:"data"`
	AdditionalData AdditionalData `json:"additional_data,omitempty"`
}

FiltersResponse represents multiple filters response.

type FiltersService

type FiltersService service

FiltersService handles activities related methods of the Pipedrive API.

Pipedrive API dcos: https://developers.pipedrive.com/docs/api/v1/#!/Filters

func (*FiltersService) Create

Create a filter.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Filters/post_filters

func (*FiltersService) Delete

func (s *FiltersService) Delete(ctx context.Context, id int) (*Response, error)

Delete a filter.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Filters/delete_filters_id

func (*FiltersService) DeleteMultiple

func (s *FiltersService) DeleteMultiple(ctx context.Context, ids []int) (*Response, error)

DeleteMultiple deletes multiple filters in bulk.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Filters/delete_filters

func (*FiltersService) GetByID

func (s *FiltersService) GetByID(ctx context.Context, id int) (*FilterResponse, *Response, error)

GetByID returns specific filter.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Filters/get_filters_id

func (*FiltersService) List

List filters.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Filters/get_filters

func (*FiltersService) Update

Update a specific filter.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Filters/put_filters_id

type Goal

type Goal struct {
	ID              int         `json:"id"`
	CompanyID       int         `json:"company_id"`
	UserID          int         `json:"user_id"`
	StageID         interface{} `json:"stage_id"`
	ActiveGoalID    int         `json:"active_goal_id"`
	Period          string      `json:"period"`
	Expected        int         `json:"expected"`
	ActiveFlag      bool        `json:"active_flag"`
	AddTime         string      `json:"add_time"`
	GoalType        string      `json:"goal_type"`
	ExpectedSum     int         `json:"expected_sum"`
	Currency        string      `json:"currency"`
	ExpectedType    string      `json:"expected_type"`
	CreatedByUserID int         `json:"created_by_user_id"`
	PipelineID      interface{} `json:"pipeline_id"`
	MasterExpected  int         `json:"master_expected"`
	Delivered       int         `json:"delivered"`
	DeliveredSum    int         `json:"delivered_sum"`
	PeriodStart     string      `json:"period_start"`
	PeriodEnd       string      `json:"period_end"`
	UserName        string      `json:"user_name"`
	Percentage      int         `json:"percentage,omitempty"`
}

Goal represents a Pipedrive goal.

func (Goal) String

func (g Goal) String() string

type GoalCreateOptions

type GoalCreateOptions struct {
	GoalType     string `url:"goal_type"`
	ExpectedType string `url:"expected_type"`
	UserID       uint   `url:"user_io"`
	StageID      uint   `url:"expected_type"`
	Period       string `url:"period"`
	Expected     uint   `url:"expected"`
	Currency     string `url:"currency"`
	PipelineID   uint   `url:"pipeline_id"`
}

GoalCreateOptions specifices the optional parameters to the GoalsService.Create method.

type GoalGetResultsByIDOptions

type GoalGetResultsByIDOptions struct {
	PeriodStart string `url:"period_start"`
	PeriodEnd   uint8  `url:"period_end"`
}

GoalGetResultsByIDOptions specifices the optional parameters to the GoalGetResultsByIdOptions.GetResultsByID method.

type GoalResponse

type GoalResponse struct {
	Success bool `json:"success"`
	Data    Goal `json:"data"`
}

GoalResponse represents single goal response.

type GoalsListOptions

type GoalsListOptions struct {
	UserID   uint  `url:"user_id,omitempty"`
	Everyone uint8 `url:"everyone,omitempty"`
}

GoalsListOptions specifices the optional parameters to the GoalsService.List method.

type GoalsResponse

type GoalsResponse struct {
	Success        bool           `json:"success"`
	Data           []Goal         `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

GoalsResponse represents multiple goals response.

type GoalsService

type GoalsService service

GoalsService handles goals related methods of the Pipedrive API.

Pipedrive API dcos: https://developers.pipedrive.com/docs/api/v1/#!/Goals

func (*GoalsService) Create

Create a new goal, returns the ID upon success.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Goals/post_goals

func (*GoalsService) Delete

func (s *GoalsService) Delete(ctx context.Context, id int) (*Response, error)

Delete marks goal as deleted.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Goals/delete_goals_id

func (*GoalsService) GetByID

func (s *GoalsService) GetByID(ctx context.Context, id int) (*GoalResponse, *Response, error)

GetByID returns data about a specific goal.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Goals/get_goals_id

func (*GoalsService) GetResultsByID

func (s *GoalsService) GetResultsByID(ctx context.Context, id int, opt *GoalGetResultsByIDOptions) (*GoalsResponse, *Response, error)

GetResultsByID lists results of a specific goal.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Goals/get_goals_id_results

func (*GoalsService) List

List all goals.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Goals/get_goals

func (*GoalsService) Update

Update the properties of a goal.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Goals/put_goals_id

type LinkRemoteFileToItemOptions

type LinkRemoteFileToItemOptions struct {
	ItemType       string `url:"item_type"`
	ItemID         uint   `url:"item_id"`
	RemoteID       uint   `url:"remote_id"`
	RemoteLocation string `url:"remote_location"`
}

LinkRemoteFileToItemOptions specifices the optional parameters to the FilesService.LinkRemoteFileToItem method.

type Note

type Note struct {
	ID                       int       `json:"id,omitempty"`
	UserID                   int       `json:"user_id,omitempty"`
	DealID                   int       `json:"deal_id,omitempty"`
	PersonID                 int       `json:"person_id,omitempty"`
	OrgID                    int       `json:"org_id,omitempty"`
	Content                  string    `json:"content,omitempty"`
	AddTime                  Timestamp `json:"add_time,omitempty"`
	UpdateTime               Timestamp `json:"update_time,omitempty"`
	ActiveFlag               bool      `json:"active_flag,omitempty"`
	PinnedToDealFlag         bool      `json:"pinned_to_deal_flag,omitempty"`
	PinnedToPersonFlag       bool      `json:"pinned_to_person_flag,omitempty"`
	PinnedToOrganizationFlag bool      `json:"pinned_to_organization_flag,omitempty"`
	LastUpdateUserID         int       `json:"last_update_user_id,omitempty"`
}

Note represents a Pipedrive note.

func (Note) String

func (n Note) String() string

type NoteCreateOptions

type NoteCreateOptions struct {
	DealID                   uint   `json:"deal_id"`
	Content                  string `json:"content"`
	PersonID                 uint   `json:"person_id"`
	OrgID                    uint   `json:"org_id"`
	PinnedToDealFlag         uint8  `json:"pinned_to_deal_flag"`
	PinnedToOrganizationFlag uint8  `json:"pinned_to_organization_flag"`
	PinnedToPersonFlag       uint8  `json:"pinned_to_person_flag"`
}

NoteCreateOptions specifices the optional parameters to the NotesService.Create method.

type NoteField

type NoteField struct {
	ID                   int      `json:"id,omitempty"`
	Key                  string   `json:"key,omitempty"`
	Name                 string   `json:"name,omitempty"`
	ActiveFlag           bool     `json:"active_flag,omitempty"`
	FieldType            string   `json:"field_type,omitempty"`
	EditFlag             int      `json:"edit_flag,omitempty"`
	MandatoryFlag        bool     `json:"mandatory_flag,omitempty"`
	VisibleInExportsFlag bool     `json:"visible_in_exports_flag,omitempty"`
	Options              []Option `json:"options,omitempty"`
}

NoteField represents a Pipedrive note field.

func (NoteField) String

func (nf NoteField) String() string

type NoteFieldsResponse

type NoteFieldsResponse struct {
	Success        bool           `json:"success,omitempty"`
	Data           []NoteField    `json:"data,omitempty"`
	AdditionalData AdditionalData `json:"additional_data,omitempty"`
}

NoteFieldsResponse represents multiple note fields esponse.

type NoteFieldsService

type NoteFieldsService service

NoteFieldsService handles note field related methods of the Pipedrive API.

Pipedrive API dcos: https://developers.pipedrive.com/docs/api/v1/#!/ActivityTypes

func (*NoteFieldsService) List

List returns all fields for note.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/NoteFields/get_noteFields

type NoteResponse

type NoteResponse struct {
	Success bool `json:"success,omitempty"`
	Data    Note `json:"data,omitempty"`
}

NoteResponse represents a single note response.

type NoteUpdateOptions

type NoteUpdateOptions struct {
	Content                  string `url:"content"`
	DealID                   uint   `url:"deal_id"`
	PersonID                 uint   `url:"person_id"`
	OrgID                    uint   `url:"org_id"`
	PinnedToDealFlag         uint8  `url:"pinned_to_deal_flag"`
	PinnedToOrganizationFlag uint8  `url:"pinned_to_organization_flag"`
	PinnedToPersonFlag       uint8  `url:"pinned_to_person_flag"`
}

NoteUpdateOptions specifices the optional parameters to the NotesService.Update method.

type NotesResponse

type NotesResponse struct {
	Success        bool           `json:"success,omitempty"`
	Data           []Note         `json:"data,omitempty"`
	AdditionalData AdditionalData `json:"additional_data,omitempty"`
}

NotesResponse represents multiple notes response.

type NotesService

type NotesService service

NotesService handles activities related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Notes

func (*NotesService) Create

Create a note.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Notes/get_notes_id

func (*NotesService) Delete

func (s *NotesService) Delete(ctx context.Context, id int) (*Response, error)

Delete marks note as deleted.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Notes/delete_notes_id

func (*NotesService) GetByID

func (s *NotesService) GetByID(ctx context.Context, id int) (*NoteResponse, *Response, error)

GetByID returns a specific note by id.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Notes/get_notes_id

func (*NotesService) List

List returns notes.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Notes/get_notes

func (*NotesService) Update

Update a specific note.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Notes/put_notes_id

type Option

type Option struct {
	ID    int    `json:"id,omitempty"`
	Label string `json:"label,omitempty"`
}

Option represents a Pipedrive option for note field.

type Organization

type Organization struct {
	ID        int `json:"id"`
	CompanyID int `json:"company_id"`
	OwnerID   struct {
		ID         int    `json:"id"`
		Name       string `json:"name"`
		Email      string `json:"email"`
		HasPic     bool   `json:"has_pic"`
		PicHash    string `json:"pic_hash"`
		ActiveFlag bool   `json:"active_flag"`
		Value      int    `json:"value"`
	} `json:"owner_id"`
	Name                            string      `json:"name"`
	OpenDealsCount                  int         `json:"open_deals_count"`
	RelatedOpenDealsCount           int         `json:"related_open_deals_count"`
	ClosedDealsCount                int         `json:"closed_deals_count"`
	RelatedClosedDealsCount         int         `json:"related_closed_deals_count"`
	EmailMessagesCount              int         `json:"email_messages_count"`
	PeopleCount                     int         `json:"people_count"`
	ActivitiesCount                 int         `json:"activities_count"`
	DoneActivitiesCount             int         `json:"done_activities_count"`
	UndoneActivitiesCount           int         `json:"undone_activities_count"`
	ReferenceActivitiesCount        int         `json:"reference_activities_count"`
	FilesCount                      int         `json:"files_count"`
	NotesCount                      int         `json:"notes_count"`
	FollowersCount                  int         `json:"followers_count"`
	WonDealsCount                   int         `json:"won_deals_count"`
	RelatedWonDealsCount            int         `json:"related_won_deals_count"`
	LostDealsCount                  int         `json:"lost_deals_count"`
	RelatedLostDealsCount           int         `json:"related_lost_deals_count"`
	ActiveFlag                      bool        `json:"active_flag"`
	CategoryID                      interface{} `json:"category_id"`
	PictureID                       interface{} `json:"picture_id"`
	CountryCode                     interface{} `json:"country_code"`
	FirstChar                       string      `json:"first_char"`
	UpdateTime                      string      `json:"update_time"`
	AddTime                         string      `json:"add_time"`
	VisibleTo                       string      `json:"visible_to"`
	NextActivityDate                string      `json:"next_activity_date"`
	NextActivityTime                interface{} `json:"next_activity_time"`
	NextActivityID                  int         `json:"next_activity_id"`
	LastActivityID                  int         `json:"last_activity_id"`
	LastActivityDate                string      `json:"last_activity_date"`
	TimelineLastActivityTime        interface{} `json:"timeline_last_activity_time"`
	TimelineLastActivityTimeByOwner interface{} `json:"timeline_last_activity_time_by_owner"`
	Address                         string      `json:"address"`
	AddressSubpremise               string      `json:"address_subpremise"`
	AddressStreetNumber             string      `json:"address_street_number"`
	AddressRoute                    string      `json:"address_route"`
	AddressSublocality              string      `json:"address_sublocality"`
	AddressLocality                 string      `json:"address_locality"`
	AddressAdminAreaLevel1          string      `json:"address_admin_area_level_1"`
	AddressAdminAreaLevel2          string      `json:"address_admin_area_level_2"`
	AddressCountry                  string      `json:"address_country"`
	AddressPostalCode               string      `json:"address_postal_code"`
	AddressFormattedAddress         string      `json:"address_formatted_address"`
	OwnerName                       string      `json:"owner_name"`
	CcEmail                         string      `json:"cc_email"`
	Phone                           string      `json:"3eb8874b7a3c9f3fe4f5b6435d4d009b15ec0c77"`
}

Organization represents a Pipedrive organization.

func (Organization) String

func (o Organization) String() string

type OrganizationCreateOptions

type OrganizationCreateOptions struct {
	Name      string    `json:"name"`
	OwnerID   uint      `json:"owner_id"`
	VisibleTo VisibleTo `json:"visible_to"`
	AddTime   Timestamp `json:"add_time"`
	Label     uint      `json:"label"`
}

OrganizationCreateOptions specifices the optional parameters to the OrganizationsService.Create method.

type OrganizationField

type OrganizationField struct {
	ID                 int         `json:"id"`
	Key                string      `json:"key"`
	Name               string      `json:"name"`
	OrderNr            int         `json:"order_nr,omitempty"`
	PicklistData       interface{} `json:"picklist_data,omitempty"`
	FieldType          string      `json:"field_type"`
	AddTime            string      `json:"add_time,omitempty"`
	UpdateTime         string      `json:"update_time,omitempty"`
	ActiveFlag         bool        `json:"active_flag"`
	EditFlag           bool        `json:"edit_flag"`
	IndexVisibleFlag   bool        `json:"index_visible_flag,omitempty"`
	DetailsVisibleFlag bool        `json:"details_visible_flag,omitempty"`
	AddVisibleFlag     bool        `json:"add_visible_flag,omitempty"`
	ImportantFlag      bool        `json:"important_flag,omitempty"`
	BulkEditAllowed    bool        `json:"bulk_edit_allowed,omitempty"`
	SearchableFlag     bool        `json:"searchable_flag,omitempty"`
	UseField           string      `json:"use_field,omitempty"`
	Link               string      `json:"link,omitempty"`
	MandatoryFlag      bool        `json:"mandatory_flag"`
	DisplayField       string      `json:"display_field,omitempty"`
	Options            []struct {
		ID    int    `json:"id"`
		Label string `json:"label"`
	} `json:"options,omitempty"`
	IsSubfield bool `json:"is_subfield,omitempty"`
}

OrganizationField represents a Pipedrive organization field.

func (OrganizationField) String

func (of OrganizationField) String() string

type OrganizationFieldCreateOptions

type OrganizationFieldCreateOptions struct {
	Name      string    `url:"name"`
	FieldType FieldType `url:"field_type"`
	Options   string    `url:"options"`
}

OrganizationFieldCreateOptions specifices the optional parameters to the OrganizationFieldsService.Create method.

type OrganizationFieldResponse

type OrganizationFieldResponse struct {
	Success        bool              `json:"success"`
	Data           OrganizationField `json:"data"`
	AdditionalData AdditionalData    `json:"additional_data"`
}

OrganizationFieldResponse represents single organization field response.

type OrganizationFieldUpdateOptions

type OrganizationFieldUpdateOptions struct {
	Name    string `url:"name"`
	Options string `url:"options"`
}

OrganizationFieldUpdateOptions specifices the optional parameters to the OrganizationFieldsService.Update method.

type OrganizationFieldsResponse

type OrganizationFieldsResponse struct {
	Success        bool                `json:"success"`
	Data           []OrganizationField `json:"data"`
	AdditionalData AdditionalData      `json:"additional_data"`
}

OrganizationFieldsResponse represents multiple organization fields response.

type OrganizationFieldsService

type OrganizationFieldsService service

OrganizationFieldsService handles organization fields related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/OrganizationFields

func (*OrganizationFieldsService) Delete

func (s *OrganizationFieldsService) Delete(ctx context.Context, id int) (*Response, error)

Delete marks a specific organization field as deleted.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/OrganizationFields/delete_organizationFields_id

func (*OrganizationFieldsService) DeleteMultiple

func (s *OrganizationFieldsService) DeleteMultiple(ctx context.Context, ids []int) (*Response, error)

DeleteMultiple marks organization fields as deleted.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/OrganizationFields/delete_organizationFields

func (*OrganizationFieldsService) GetByID

GetByID returns a specific organization field.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/OrganizationFields/get_organizationFields_id

func (*OrganizationFieldsService) List

List all organization fields within company.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/OrganizationFields/get_organizationFields

func (*OrganizationFieldsService) Update

Update a specific organization field.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/OrganizationFields/put_organizationFields_id

type OrganizationResponse

type OrganizationResponse struct {
	Success        bool           `json:"success"`
	Data           Organization   `json:"data"`
	AdditionalData AdditionalData `json:"additional_data,omitempty"`
}

OrganizationResponse represents single organization response.

type OrganizationUpdateOptions

type OrganizationUpdateOptions struct {
	Name      string    `json:"name,omitempty"`
	OwnerID   uint      `json:"owner_id,omitempty"`
	VisibleTo VisibleTo `json:"visible_to,omitempty"`
	Address   string    `json:"address,omitempty"`
	Phone     string    `json:"3eb8874b7a3c9f3fe4f5b6435d4d009b15ec0c77,omitempty"`
}

OrganizationUpdateOptions specifices the optional parameters to the OrganizationUpdateOptions.Update method.

type OrganizationsResponse

type OrganizationsResponse struct {
	Success        bool           `json:"success"`
	Data           []Organization `json:"data"`
	AdditionalData AdditionalData `json:"additional_data,omitempty"`
}

OrganizationsResponse represents multiple organizations response.

type OrganizationsService

type OrganizationsService service

OrganizationsService handles organization related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Organizations

func (*OrganizationsService) Create

Create a new organizations.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Organizations/post_organizations

func (*OrganizationsService) Delete

func (s *OrganizationsService) Delete(ctx context.Context, id int) (*Response, error)

Delete marks an organization as deleted.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Organizations/delete_organizations_id

func (*OrganizationsService) DeleteFollower

func (s *OrganizationsService) DeleteFollower(ctx context.Context, id int, followerID int) (*Response, error)

DeleteFollower deletes a follower from an organization.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Organizations/delete_organizations_id_followers_follower_id

func (*OrganizationsService) DeleteMultiple

func (s *OrganizationsService) DeleteMultiple(ctx context.Context, ids []int) (*Response, error)

DeleteMultiple deletes multiple organizations in bulk.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Organizations/delete_organizations

func (*OrganizationsService) List

List all organizations.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Organizations/get_organizations

func (*OrganizationsService) Merge

func (s *OrganizationsService) Merge(ctx context.Context, id int, mergeWithID int) (*OrganizationResponse, *Response, error)

Merge organizations.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/organizations/_id_/merge

func (*OrganizationsService) Update

Update a specific person.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Organizations/put_persons_id

type Pagination

type Pagination struct {
	Start                 int  `json:"start"`
	Limit                 int  `json:"limit"`
	MoreItemsInCollection bool `json:"more_items_in_collection"`
}

type Participants

type Participants struct {
	PersonID    int  `json:"person_id"`
	PrimaryFlag bool `json:"primary_flag"`
}

Participants represents a Pipedrive participant.

type Person

type Person struct {
	ID        int `json:"id"`
	CompanyID int `json:"company_id"`
	OwnerID   struct {
		ID         int    `json:"id"`
		Name       string `json:"name"`
		Email      string `json:"email"`
		HasPic     bool   `json:"has_pic"`
		PicHash    string `json:"pic_hash"`
		ActiveFlag bool   `json:"active_flag"`
		Value      int    `json:"value"`
	} `json:"owner_id"`
	OrgID                       interface{} `json:"org_id"`
	Name                        string      `json:"name"`
	FirstName                   string      `json:"first_name"`
	LastName                    string      `json:"last_name"`
	OpenDealsCount              int         `json:"open_deals_count"`
	RelatedOpenDealsCount       int         `json:"related_open_deals_count"`
	ClosedDealsCount            int         `json:"closed_deals_count"`
	RelatedClosedDealsCount     int         `json:"related_closed_deals_count"`
	ParticipantOpenDealsCount   int         `json:"participant_open_deals_count"`
	ParticipantClosedDealsCount int         `json:"participant_closed_deals_count"`
	EmailMessagesCount          int         `json:"email_messages_count"`
	ActivitiesCount             int         `json:"activities_count"`
	DoneActivitiesCount         int         `json:"done_activities_count"`
	UndoneActivitiesCount       int         `json:"undone_activities_count"`
	ReferenceActivitiesCount    int         `json:"reference_activities_count"`
	FilesCount                  int         `json:"files_count"`
	NotesCount                  int         `json:"notes_count"`
	FollowersCount              int         `json:"followers_count"`
	WonDealsCount               int         `json:"won_deals_count"`
	RelatedWonDealsCount        int         `json:"related_won_deals_count"`
	LostDealsCount              int         `json:"lost_deals_count"`
	RelatedLostDealsCount       int         `json:"related_lost_deals_count"`
	ActiveFlag                  bool        `json:"active_flag"`
	Phone                       []struct {
		Value   string `json:"value"`
		Primary bool   `json:"primary"`
	} `json:"phone"`
	Email                           []Email     `json:"email"`
	FirstChar                       string      `json:"first_char"`
	UpdateTime                      string      `json:"update_time"`
	AddTime                         string      `json:"add_time"`
	VisibleTo                       string      `json:"visible_to"`
	PictureID                       interface{} `json:"picture_id"`
	NextActivityDate                interface{} `json:"next_activity_date"`
	NextActivityTime                interface{} `json:"next_activity_time"`
	NextActivityID                  interface{} `json:"next_activity_id"`
	LastActivityID                  int         `json:"last_activity_id"`
	LastActivityDate                string      `json:"last_activity_date"`
	TimelineLastActivityTime        interface{} `json:"timeline_last_activity_time"`
	TimelineLastActivityTimeByOwner interface{} `json:"timeline_last_activity_time_by_owner"`
	LastIncomingMailTime            interface{} `json:"last_incoming_mail_time"`
	LastOutgoingMailTime            interface{} `json:"last_outgoing_mail_time"`
	OrgName                         interface{} `json:"org_name"`
	OwnerName                       string      `json:"owner_name"`
	CcEmail                         string      `json:"cc_email"`
	Label                           uint        `json:"label"`
	BillingAddress                  string      `json:"d5d6ecba25dd34146d3b9d0f1bb34dedf384143a"`
	DeliveryAddress                 string      `json:"fb3875ae1de17d63a1a0a9a7643bb677b95ae7fb"`
}

Person represents a Pipedrive person.

func (Person) String

func (p Person) String() string

type PersonAddFollowerResponse

type PersonAddFollowerResponse struct {
	Success bool `json:"success"`
	Data    struct {
		UserID   int    `json:"user_id"`
		ID       int    `json:"id"`
		PersonID int    `json:"person_id"`
		AddTime  string `json:"add_time"`
	} `json:"data"`
}

PersonAddFollowerResponse represents add follower response.

type PersonCreateOptions

type PersonCreateOptions struct {
	Name      string    `json:"name"`
	OwnerID   uint      `json:"owner_id"`
	OrgID     uint      `json:"org_id"`
	Email     string    `json:"email"`
	Phone     string    `json:"phone"`
	VisibleTo VisibleTo `json:"visible_to"`
	AddTime   Timestamp `json:"add_time"`
	Label     uint      `json:"label"`
}

PersonCreateOptions specifices the optional parameters to the PersonsService.Create method.

type PersonField

type PersonField struct {
	ID                 int         `json:"id"`
	Key                string      `json:"key"`
	Name               string      `json:"name"`
	OrderNr            int         `json:"order_nr"`
	PicklistData       interface{} `json:"picklist_data,omitempty"`
	FieldType          string      `json:"field_type"`
	AddTime            string      `json:"add_time"`
	UpdateTime         string      `json:"update_time"`
	ActiveFlag         bool        `json:"active_flag"`
	EditFlag           bool        `json:"edit_flag"`
	IndexVisibleFlag   bool        `json:"index_visible_flag"`
	DetailsVisibleFlag bool        `json:"details_visible_flag"`
	AddVisibleFlag     bool        `json:"add_visible_flag"`
	ImportantFlag      bool        `json:"important_flag"`
	BulkEditAllowed    bool        `json:"bulk_edit_allowed"`
	SearchableFlag     bool        `json:"searchable_flag"`
	FilteringAllowed   bool        `json:"filtering_allowed"`
	SortableFlag       bool        `json:"sortable_flag"`
	UseField           string      `json:"use_field,omitempty"`
	Link               string      `json:"link,omitempty"`
	MandatoryFlag      bool        `json:"mandatory_flag"`
	DisplayField       string      `json:"display_field,omitempty"`
	Autocomplete       string      `json:"autocomplete,omitempty"`
	Options            []struct {
		ID    int    `json:"id"`
		Label string `json:"label"`
	} `json:"options,omitempty"`
}

PersonField represents a Pipedrive person field.

type PersonFieldCreateOptions

type PersonFieldCreateOptions struct {
	Name      string    `url:"name"`
	FieldType FieldType `url:"field_type"`
	Options   string    `url:"options"`
}

PersonFieldCreateOptions specifices the optional parameters to the PersonFieldsService.Create method.

type PersonFieldResponse

type PersonFieldResponse struct {
	Success        bool           `json:"success"`
	Data           PersonField    `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

PersonFieldResponse represents single person field response.

type PersonFieldUpdateOptions

type PersonFieldUpdateOptions struct {
	Name    string `url:"name"`
	Options string `url:"options"`
}

PersonFieldUpdateOptions specifices the optional parameters to the PersonFieldsService.Update method.

type PersonFieldsResponse

type PersonFieldsResponse struct {
	Success        bool           `json:"success"`
	Data           []PersonField  `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

PersonFieldsResponse represents multiple person fields response.

type PersonFieldsService

type PersonFieldsService service

PersonFieldsService handles person fields related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/PersonFields

func (*PersonFieldsService) Delete

func (s *PersonFieldsService) Delete(ctx context.Context, id int) (*Response, error)

Delete marks person field as deleted.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/PersonFields/delete_personFields_id

func (*PersonFieldsService) DeleteMultiple

func (s *PersonFieldsService) DeleteMultiple(ctx context.Context, ids []int) (*Response, error)

DeleteMultiple marks multiple person fields as deleted.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/PersonFields/delete_personFields

func (*PersonFieldsService) GetByID

GetByID returns a specific person field.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/ProductFields/get_productFields_id

func (*PersonFieldsService) List

List all person fields.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/PersonFields/get_personFields

func (*PersonFieldsService) Update

Update a person field.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/PersonFields/put_personFields_id

type PersonResponse

type PersonResponse struct {
	Success        bool           `json:"success"`
	Data           Person         `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

PersonResponse represents single person response.

type PersonUpdateOptions

type PersonUpdateOptions struct {
	Name            string    `json:"name,omitempty"`
	OwnerID         uint      `json:"owner_id,omitempty"`
	OrgID           uint      `json:"org_id,omitempty"`
	Email           []Email   `json:"email,omitempty"`
	Phone           string    `json:"phone,omitempty"`
	VisibleTo       VisibleTo `json:"visible_to,omitempty"`
	BillingAddress  string    `json:"d5d6ecba25dd34146d3b9d0f1bb34dedf384143a,omitempty"`
	DeliveryAddress string    `json:"fb3875ae1de17d63a1a0a9a7643bb677b95ae7fb,omitempty"`
}

PersonUpdateOptions specifices the optional parameters to the PersonUpdateOptions.Update method.

type PersonsRespose

type PersonsRespose struct {
	Success        bool           `json:"success"`
	Data           []Person       `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

PersonsRespose represents multiple persons response.

type PersonsService

type PersonsService service

PersonsService handles activities related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Persons

func (*PersonsService) AddFollower

func (s *PersonsService) AddFollower(ctx context.Context, id int, userID int) (*PersonAddFollowerResponse, *Response, error)

AddFollower adds a follower to person.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Persons/post_persons_id_followers

func (*PersonsService) Create

Create a new person.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Persons/post_persons

func (*PersonsService) Delete

func (s *PersonsService) Delete(ctx context.Context, id int) (*Response, error)

Delete marks person as deleted.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Persons/delete_persons_id

func (*PersonsService) DeleteFollower

func (s *PersonsService) DeleteFollower(ctx context.Context, id int, followerID int) (*Response, error)

DeleteFollower removes follower from person.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Persons/delete_persons_id_followers_follower_id

func (*PersonsService) DeleteMultiple

func (s *PersonsService) DeleteMultiple(ctx context.Context, ids []int) (*Response, error)

DeleteMultiple marks multiple persons as deleted.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Persons/delete_persons

func (*PersonsService) DeletePicture

func (s *PersonsService) DeletePicture(ctx context.Context, id int) (*Response, error)

DeletePicture deletes person picture.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Persons/delete_persons_id_picture

func (*PersonsService) Get

func (s *PersonsService) Get(ctx context.Context, personID int) (*PersonResponse, *Response, error)

Get a person.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Persons/get_persons_id

func (*PersonsService) List

List all persons.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Persons/get_persons

func (*PersonsService) Merge

func (s *PersonsService) Merge(ctx context.Context, id int, mergeWithID int) (*PersonResponse, *Response, error)

Merge selected persons.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Persons/put_persons_id_merge

func (*PersonsService) Update

Update a specific person.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Persons/put_persons_id

type Pipeline

type Pipeline struct {
	ID              int    `json:"id"`
	Name            string `json:"name"`
	URLTitle        string `json:"url_title"`
	OrderNr         int    `json:"order_nr"`
	Active          bool   `json:"active"`
	DealProbability bool   `json:"deal_probability"`
	AddTime         string `json:"add_time"`
	UpdateTime      string `json:"update_time"`
	Selected        bool   `json:"selected"`
}

Pipeline represents a Pipedrive pipeline.

func (Pipeline) String

func (p Pipeline) String() string

type PipelineCreateOptions

type PipelineCreateOptions struct {
	Name            string          `url:"name"`
	DealProbability DealProbability `url:"deal_probability"`
	OrderNr         int             `url:"order_nr"`
	Active          ActiveFlag      `url:"active"`
}

PipelineCreateOptions specifices the optional parameters to the PipelineCreateOptions.Create method.

type PipelineDealsConversionRateResponse

type PipelineDealsConversionRateResponse struct {
	Success bool `json:"success"`
	Data    struct {
		StageConversions []struct {
			FromStageID    int     `json:"from_stage_id"`
			ToStageID      int     `json:"to_stage_id"`
			ConversionRate float64 `json:"conversion_rate"`
		} `json:"stage_conversions"`
		WonConversion  float64 `json:"won_conversion"`
		LostConversion float64 `json:"lost_conversion"`
	} `json:"data"`
}

PipelineDealsConversionRateResponse represents conversion response.

type PipelineDealsMovementResponse

type PipelineDealsMovementResponse struct {
	Success bool `json:"success"`
	Data    struct {
		MovementsBetweenStages struct {
			Count int `json:"count"`
		} `json:"movements_between_stages"`
		NewDeals struct {
			Count   int   `json:"count"`
			DealIds []int `json:"deal_ids"`
			Values  struct {
				EUR float64 `json:"EUR"`
			} `json:"values"`
			FormattedValues struct {
				EUR string `json:"EUR"`
			} `json:"formatted_values"`
		} `json:"new_deals"`
		DealsLeftOpen struct {
			Count   int   `json:"count"`
			DealIds []int `json:"deal_ids"`
			Values  struct {
				EUR float64 `json:"EUR"`
			} `json:"values"`
			FormattedValues struct {
				EUR string `json:"EUR"`
			} `json:"formatted_values"`
		} `json:"deals_left_open"`
		WonDeals struct {
			Count   int   `json:"count"`
			DealIds []int `json:"deal_ids"`
			Values  struct {
				EUR int `json:"EUR"`
			} `json:"values"`
			FormattedValues struct {
				EUR string `json:"EUR"`
			} `json:"formatted_values"`
		} `json:"won_deals"`
		LostDeals struct {
			Count   int   `json:"count"`
			DealIds []int `json:"deal_ids"`
			Values  struct {
				EUR int `json:"EUR"`
			} `json:"values"`
			FormattedValues struct {
				EUR string `json:"EUR"`
			} `json:"formatted_values"`
		} `json:"lost_deals"`
		AverageAgeInDays struct {
			AcrossAllStages float64 `json:"across_all_stages"`
			ByStages        []struct {
				StageID int `json:"stage_id"`
				Value   int `json:"value"`
			} `json:"by_stages"`
		} `json:"average_age_in_days"`
	} `json:"data"`
}

PipelineDealsMovementResponse represents movement response.

type PipelineResponse

type PipelineResponse struct {
	Success        bool           `json:"success"`
	Data           Pipeline       `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

PipelineResponse represents single pipeline response.

type PipelineUpdateOptions

type PipelineUpdateOptions struct {
	Name            string          `url:"name"`
	DealProbability DealProbability `url:"deal_probability"`
	OrderNr         int             `url:"order_nr"`
	Active          ActiveFlag      `url:"active"`
}

PipelineUpdateOptions specifices the optional parameters to the PipelinesService.Update method.

type PipelinesResponse

type PipelinesResponse struct {
	Success        bool           `json:"success"`
	Data           []Pipeline     `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

PipelinesResponse represents multiple pipelines response.

type PipelinesService

type PipelinesService service

PipelinesService handles pipelines related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Pipelines

func (*PipelinesService) Create

Create a new pipeline.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Pipelines/post_pipelines

func (*PipelinesService) Delete

func (s *PipelinesService) Delete(ctx context.Context, id int) (*Response, error)

Delete marks a specific pipeline as deleted.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Pipelines/delete_pipelines_id

func (*PipelinesService) GetByID

GetByID returns data about a specific pipeline.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Pipelines/get_pipelines_id

func (*PipelinesService) GetDeals

func (s *PipelinesService) GetDeals(ctx context.Context, id int) (*PipelinesResponse, *Response, error)

GetDeals returns deal in a specific pipeline.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Pipelines/get_pipelines_id_deals

func (*PipelinesService) GetDealsConversionRate

func (s *PipelinesService) GetDealsConversionRate(ctx context.Context, id int, startDate Timestamp, endDate Timestamp) (*PipelineDealsConversionRateResponse, *Response, error)

GetDealsConversionRate returns deals conversion rate in a specific pipeline.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Pipelines/get_pipelines_id_conversion_statistics

func (*PipelinesService) GetDealsMovement

func (s *PipelinesService) GetDealsMovement(ctx context.Context, id int, startDate Timestamp, endDate Timestamp) (*PipelineDealsMovementResponse, *Response, error)

GetDealsMovement returns deals movement in a specific pipeline.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Pipelines/get_pipelines_id_movement_statistics

func (*PipelinesService) List

List returns data about all pipelines.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Pipelines/get_pipelines

func (*PipelinesService) Update

Update a specific pipeline.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Pipelines/put_pipelines_id

type Product

type Product struct {
	ID         int         `json:"id"`
	Name       string      `json:"name"`
	Code       interface{} `json:"code"`
	Unit       string      `json:"unit"`
	Tax        int         `json:"tax"`
	ActiveFlag bool        `json:"active_flag"`
	Selectable bool        `json:"selectable"`
	FirstChar  string      `json:"first_char"`
	VisibleTo  string      `json:"visible_to"`
	OwnerID    struct {
		ID         int    `json:"id"`
		Name       string `json:"name"`
		Email      string `json:"email"`
		HasPic     bool   `json:"has_pic"`
		PicHash    string `json:"pic_hash"`
		ActiveFlag bool   `json:"active_flag"`
		Value      int    `json:"value"`
	} `json:"owner_id"`
	FilesCount     interface{} `json:"files_count"`
	FollowersCount int         `json:"followers_count"`
	AddTime        string      `json:"add_time"`
	UpdateTime     string      `json:"update_time"`
	Prices         []struct {
		ID           int    `json:"id"`
		ProductID    int    `json:"product_id"`
		Price        int    `json:"price"`
		Currency     string `json:"currency"`
		Cost         int    `json:"cost"`
		OverheadCost int    `json:"overhead_cost"`
	} `json:"prices"`
}

Product represents a Pipedrive product.

func (Product) String

func (p Product) String() string

type ProductAttachedDealsResponse

type ProductAttachedDealsResponse struct {
	Success        bool           `json:"success"`
	Data           []Deal         `json:"data"`
	AdditionalData AdditionalData `json:"additional_data,omitempty"`
}

ProductAttachedDealsResponse represents attached deals response.

type ProductCreateOptions

type ProductCreateOptions struct {
	Name       string     `url:"name"`
	Code       string     `url:"code"`
	Unit       string     `url:"unit"`
	Tax        int        `url:"tax"`
	ActiveFlag ActiveFlag `url:"active_flag"`
	VisibleTo  VisibleTo  `url:"visible_to"`
	OwnerID    int        `url:"owner_id"`
	Prices     string     `url:"prices"`
}

ProductCreateOptions specifices the optional parameters to the ProductsService.Create method.

type ProductField

type ProductField struct {
	ID                 int         `json:"id"`
	Key                string      `json:"key"`
	Name               string      `json:"name"`
	OrderNr            int         `json:"order_nr"`
	PicklistData       interface{} `json:"picklist_data,omitempty"`
	FieldType          string      `json:"field_type"`
	AddTime            string      `json:"add_time"`
	UpdateTime         string      `json:"update_time"`
	ActiveFlag         bool        `json:"active_flag"`
	EditFlag           bool        `json:"edit_flag"`
	IndexVisibleFlag   bool        `json:"index_visible_flag"`
	DetailsVisibleFlag bool        `json:"details_visible_flag"`
	AddVisibleFlag     bool        `json:"add_visible_flag"`
	ImportantFlag      bool        `json:"important_flag"`
	BulkEditAllowed    bool        `json:"bulk_edit_allowed"`
	SearchableFlag     bool        `json:"searchable_flag"`
	FilteringAllowed   bool        `json:"filtering_allowed"`
	SortableFlag       bool        `json:"sortable_flag"`
	UseField           string      `json:"use_field,omitempty"`
	Link               string      `json:"link,omitempty"`
	MandatoryFlag      bool        `json:"mandatory_flag"`
	DisplayField       string      `json:"display_field,omitempty"`
	Options            []struct {
		ID    bool   `json:"id"`
		Label string `json:"label"`
	} `json:"options,omitempty"`
}

ProductField represents a Pipedrive product field.

func (ProductField) String

func (p ProductField) String() string

type ProductFieldCreateOptions

type ProductFieldCreateOptions struct {
	Name      string    `url:"name"`
	FieldType FieldType `url:"field_type"`
	Options   string    `url:"options"`
}

ProductFieldCreateOptions specifices the optional parameters to the ProductFieldsService.Create method.

type ProductFieldResponse

type ProductFieldResponse struct {
	Success        bool           `json:"success"`
	Data           ProductField   `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

ProductFieldResponse represents single product field response.

type ProductFieldUpdateOptions

type ProductFieldUpdateOptions struct {
	Name    string `url:"name"`
	Options string `url:"options"`
}

ProductFieldUpdateOptions specifices the optional parameters to the ProductFieldsService.Update method.

type ProductFieldsResponse

type ProductFieldsResponse struct {
	Success        bool           `json:"success"`
	Data           []ProductField `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

ProductFieldsResponse represents multiple product fields response.

type ProductFieldsService

type ProductFieldsService service

ProductFieldsService handles pipelines related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/ProductFields

func (*ProductFieldsService) Create

Create a new product field.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/ProductFields/post_productFields

func (*ProductFieldsService) Delete

func (s *ProductFieldsService) Delete(ctx context.Context, id int) (*Response, error)

Delete marks a specific product field as deleted.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/ProductFields/delete_productFields_id

func (*ProductFieldsService) DeleteMultiple

func (s *ProductFieldsService) DeleteMultiple(ctx context.Context, ids []int) (*Response, error)

DeleteMultiple marks multiple product fields as deleted.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/ProductFields/delete_productFields

func (*ProductFieldsService) GetByID

GetByID returns a specific product field.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/ProductFields/get_productFields_id

func (*ProductFieldsService) List

List returns all data about product fields.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/ProductFields/get_productFields

func (*ProductFieldsService) Update

Update a specific product field.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/ProductFields/put_productFields_id

type ProductFindOptions

type ProductFindOptions struct {
	Term string `url:"term"`
}

ProductFindOptions specifices the optional parameters to the ProductFindOptions.Find method.

type ProductResponse

type ProductResponse struct {
	Success        bool           `json:"success"`
	Data           []Product      `json:"data"`
	AdditionalData AdditionalData `json:"additional_data,omitempty"`
}

ProductResponse represents single product response.

type ProductUpdateOptions

type ProductUpdateOptions struct {
	Name       string     `url:"name"`
	Code       string     `url:"code"`
	Unit       string     `url:"unit"`
	Tax        int        `url:"tax"`
	ActiveFlag ActiveFlag `url:"active_flag"`
	VisibleTo  VisibleTo  `url:"visible_to"`
	OwnerID    int        `url:"owner_id"`
	Prices     string     `url:"prices"`
}

ProductUpdateOptions specifices the optional parameters to the ProductsService.Update method.

type ProductsResponse

type ProductsResponse struct {
	Success        bool           `json:"success"`
	Data           []Product      `json:"data"`
	AdditionalData AdditionalData `json:"additional_data,omitempty"`
}

ProductsResponse represents multiple products response.

type ProductsService

type ProductsService service

ProductsService handles pipelines related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Products

func (*ProductsService) Create

Create a new product.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Products/post_products

func (*ProductsService) Delete

func (s *ProductsService) Delete(ctx context.Context, id int) (*Response, error)

Delete a specific product.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Products/delete_products_id

func (*ProductsService) DeleteFollower

func (s *ProductsService) DeleteFollower(ctx context.Context, id int, followerID int) (*Response, error)

DeleteFollower removes follower from a specific product.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Products/delete_products_id_followers_follower_id

func (*ProductsService) Find

Find products.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Products/get_products_find

func (*ProductsService) GetAttachedDeals

func (s *ProductsService) GetAttachedDeals(ctx context.Context, id int) (*ProductAttachedDealsResponse, *Response, error)

GetAttachedDeals returns product attached deals.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Products/get_products_id_deals

func (*ProductsService) GetByID

func (s *ProductsService) GetByID(ctx context.Context, id int) (*ProductResponse, *Response, error)

GetByID returns a specific product.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Products/get_products_id

func (*ProductsService) List

List returns all data about products.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Products/get_products

func (*ProductsService) Update

Update a specific product.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Products/put_products_id

type Rate

type Rate struct {
	Limit     int       `json:"limit"`
	Remaining int       `json:"remaining"`
	Reset     Timestamp `json:"reset"`
}

func (Rate) String

func (r Rate) String() string

type RateLimitError

type RateLimitError struct {
	Rate     Rate
	Response *http.Response
	Message  string
}

RateLimitError occurs when Pipedrive returns 403 Forbidden response with a rate limit remaining value of 0.

func (*RateLimitError) Error

func (e *RateLimitError) Error() string

type RecentRecord

type RecentRecord struct {
	Item string                `json:"item"`
	ID   int                   `json:"id"`
	Data []RecentRecordDetails `json:"data"`
}

RecentRecord represents a Pipedrive recent record.

type RecentRecordDetails

type RecentRecordDetails struct {
	ID                  int    `json:"id"`
	Name                string `json:"name"`
	DefaultCurrency     string `json:"default_currency"`
	Locale              string `json:"locale"`
	Lang                int    `json:"lang"`
	Email               string `json:"email"`
	Phone               string `json:"phone"`
	Activated           bool   `json:"activated"`
	LastLogin           string `json:"last_login"`
	Created             string `json:"created"`
	Modified            string `json:"modified"`
	SignupFlowVariation string `json:"signup_flow_variation"`
	HasCreatedCompany   bool   `json:"has_created_company"`
	IsAdmin             int    `json:"is_admin"`
	TimezoneName        string `json:"timezone_name"`
	TimezoneOffset      string `json:"timezone_offset"`
	ActiveFlag          bool   `json:"active_flag"`
	RoleID              int    `json:"role_id"`
	IconURL             string `json:"icon_url"`
	IsYou               bool   `json:"is_you"`
}

RecentRecordDetails represents a Pipedrive recent record details.

func (RecentRecordDetails) String

func (rrd RecentRecordDetails) String() string

type RecentsListOptions

type RecentsListOptions struct {
	SinceTimestamp string `url:"since_timestamp,omitempty"`
	Items          string `url:"items,omitempty"`
	Start          uint   `url:"start,omitempty"`
	Limit          uint   `url:"limit,omitempty"`
}

RecentsListOptions specifices the optional parameters to the RecentsService.List method.

type RecentsResponse

type RecentsResponse struct {
	Success        bool           `json:"success"`
	Data           []RecentRecord `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

RecentsResponse represents multiple recents response.

type RecentsService

type RecentsService service

RecentsService handles activities related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Recents

func (*RecentsService) List

List returns data about all recent changes occured after given timestamp.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Recents/get_recents

type Response

type Response struct {
	*http.Response
	Rate
}

type SearchOptions

type SearchOptions struct {
	Term string `url:"term,omitempty"`
}

Search

type SearchResult

type SearchResult struct {
	Type        string  `json:"type"`
	ID          int     `json:"id"`
	Source      string  `json:"source"`
	ResultScore float64 `json:"result_score"`
	Notes       struct {
		Count   int           `json:"count"`
		Content []interface{} `json:"content"`
	} `json:"notes"`
	Fields struct {
		Count int           `json:"count"`
		Names []interface{} `json:"names"`
	} `json:"fields"`
	Title   string `json:"title"`
	Details struct {
		Phone      interface{} `json:"phone"`
		Email      interface{} `json:"email"`
		OrgID      interface{} `json:"org_id"`
		OrgName    interface{} `json:"org_name"`
		OrgAddress string      `json:"org_address"`
		Picture    interface{} `json:"picture"`
	} `json:"details"`
}

SearchResult represents a Pipedrive search result.

func (SearchResult) String

func (sr SearchResult) String() string

type SearchResults

type SearchResults struct {
	Success        bool           `json:"success"`
	Data           []SearchResult `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

SearchResults represents multiple search results response.

type SearchResultsListOptions

type SearchResultsListOptions struct {
	Term       string `url:"term,omitempty"`
	ItemType   string `url:"item_type,omitempty"`
	Start      uint   `url:"start,omitempty"`
	Limit      uint   `url:"limit,omitempty"`
	ExactMatch uint8  `url:"exact_match,omitempty"`
}

SearchResultsListOptions specifices the optional parameters to the SearchResultsService.Search method.

type SearchResultsService

type SearchResultsService service

SearchResultsService handles search results related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/SearchResults

func (*SearchResultsService) Search

Search performs a search across the account and returns SearchResults.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/SearchResults/get_searchResults

type Stage

type Stage struct {
	ID              int         `json:"id"`
	OrderNr         int         `json:"order_nr"`
	Name            string      `json:"name"`
	ActiveFlag      bool        `json:"active_flag"`
	DealProbability int         `json:"deal_probability"`
	PipelineID      int         `json:"pipeline_id"`
	RottenFlag      bool        `json:"rotten_flag"`
	RottenDays      interface{} `json:"rotten_days"`
	AddTime         string      `json:"add_time"`
	UpdateTime      string      `json:"update_time"`
	PipelineName    string      `json:"pipeline_name"`
}

Stage represents a Pipedrive stage.

func (Stage) String

func (s Stage) String() string

type StageDealsResponse

type StageDealsResponse struct {
	Success        bool           `json:"success"`
	Data           []Deal         `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

StageDealsResponse represents stage deals response.

type StageResponse

type StageResponse struct {
	Success bool  `json:"success"`
	Data    Stage `json:"data"`
}

StageResponse represents single stage response.

type StagesCreateOptions

type StagesCreateOptions struct {
	Name            string `url:"name"`
	PipelineID      uint   `url:"pipeline_id"`
	DealProbability uint   `url:"deal_probability"`
	RottenFlag      uint8  `url:"rotten_flag"`
	RottenDays      uint   `url:"rotten_days"`
}

StagesCreateOptions specifices the optional parameters to the StagesService.Create method.

type StagesGetDealsInStageOptions

type StagesGetDealsInStageOptions struct {
	FilterID uint  `url:"filter_id"`
	UserID   uint  `url:"user_id"`
	Everyone uint8 `url:"everyone"`
	Start    uint  `url:"start"`
	Limit    uint  `url:"limit"`
}

StagesGetDealsInStageOptions specifices the optional parameters to the StagesService.GetDealsInStage method.

type StagesListOptions

type StagesListOptions struct {
	PipelineID uint `url:"pipeline_id"`
}

StagesListOptions specifices the optional parameters to the StagesService.List method.

type StagesResponse

type StagesResponse struct {
	Success bool    `json:"success"`
	Data    []Stage `json:"data"`
}

StagesResponse represents multiple stages response.

type StagesService

type StagesService service

StagesService handles stages related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Stages

func (*StagesService) Create

Create a new stage, returns the ID upon success.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Stages/post_stages

func (*StagesService) Delete

func (s *StagesService) Delete(ctx context.Context, id int) (*Response, error)

Delete marks a stage as deleted.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Stages/delete_stages_id

func (*StagesService) DeleteMultiple

func (s *StagesService) DeleteMultiple(ctx context.Context, ids []int) (*Response, error)

DeleteMultiple marks multiple stages as deleted.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Stages/put_stages_id

func (*StagesService) GetByID

func (s *StagesService) GetByID(ctx context.Context, id int) (*StageResponse, *Response, error)

GetByID returns data about a specific stage. Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Stages/get_stages_id

func (*StagesService) GetDealsInStage

GetDealsInStage lists deals in a specific stage.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Stages/get_stages_id_deals

func (*StagesService) List

List returns data about all stages.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Stages

func (*StagesService) Update

Update the properties of a stage.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Stages/put_stages_id

type StagesUpdateOptions

type StagesUpdateOptions struct {
	Name            string `url:"name"`
	PipelineID      uint   `url:"pipeline_id"`
	OrderNr         uint   `url:"order_nr"`
	DealProbability uint   `url:"deal_probability"`
	RottenFlag      uint8  `url:"rotten_flag"`
	RottenDays      uint   `url:"rotten_days"`
}

StagesUpdateOptions specifices the optional parameters to the StagesService.Update method.

type Timestamp

type Timestamp struct {
	time.Time
}

func (Timestamp) Format

func (t Timestamp) Format() string

func (Timestamp) FormatFull

func (t Timestamp) FormatFull() string

func (Timestamp) String

func (t Timestamp) String() string

type UpdateFileDetailsOptions

type UpdateFileDetailsOptions struct {
	Name        string `url:"name"`
	Description string `url:"description"`
}

UpdateFileDetailsOptions specifices the optional parameters to the FilesService.Update method.

type User

type User struct {
	ID                  int    `json:"id"`
	Name                string `json:"name"`
	DefaultCurrency     string `json:"default_currency"`
	Locale              string `json:"locale"`
	Lang                int    `json:"lang"`
	Email               string `json:"email"`
	Phone               string `json:"phone"`
	Activated           bool   `json:"activated"`
	LastLogin           string `json:"last_login"`
	Created             string `json:"created"`
	Modified            string `json:"modified"`
	SignupFlowVariation string `json:"signup_flow_variation"`
	HasCreatedCompany   bool   `json:"has_created_company"`
	IsAdmin             int    `json:"is_admin"`
	TimezoneName        string `json:"timezone_name"`
	TimezoneOffset      string `json:"timezone_offset"`
	ActiveFlag          bool   `json:"active_flag"`
	RoleID              int    `json:"role_id"`
	IconURL             string `json:"icon_url"`
	IsYou               bool   `json:"is_you"`
}

User represents a Pipedrive user.

func (User) String

func (u User) String() string

type UserConnections

type UserConnections struct {
	Success bool `json:"success"`
	Data    struct {
		Google string `json:"google"`
	} `json:"data"`
}

UserConnections represents a Pipedrive user connections.

type UserConnectionsService

type UserConnectionsService service

UserConnectionsService handles activities related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/UserConnections

func (*UserConnectionsService) List

List returns data about all connections for authorized user.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/UserConnections/get_userConnections

type UserCreateOptions

type UserCreateOptions struct {
	Name       string `url:"name"`
	Email      string `url:"email"`
	ActiveFlag uint8  `url:"active_flag"`
}

UserCreateOptions specifices the optional parameters to the UsersService.Create method.

type UserFollowersResponse

type UserFollowersResponse struct {
	Success        bool           `json:"success"`
	Data           []int          `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

UserFollowersResponse represents user followers response.

type UserPermissionsResponse

type UserPermissionsResponse struct {
	Success bool `json:"success"`
	Data    struct {
		CanAddProducts              bool `json:"can_add_products"`
		CanBulkEditItems            bool `json:"can_bulk_edit_items"`
		CanChangeVisibilityOfItems  bool `json:"can_change_visibility_of_items"`
		CanDeleteActivities         bool `json:"can_delete_activities"`
		CanDeleteDeals              bool `json:"can_delete_deals"`
		CanEditDealsClosedDate      bool `json:"can_edit_deals_closed_date"`
		CanEditProducts             bool `json:"can_edit_products"`
		CanEditSharedFilters        bool `json:"can_edit_shared_filters"`
		CanExportDataFromLists      bool `json:"can_export_data_from_lists"`
		CanFollowOtherUsers         bool `json:"can_follow_other_users"`
		CanMergeDeals               bool `json:"can_merge_deals"`
		CanMergeOrganizations       bool `json:"can_merge_organizations"`
		CanMergePeople              bool `json:"can_merge_people"`
		CanSeeCompanyWideStatistics bool `json:"can_see_company_wide_statistics"`
		CanSeeDealsListSummary      bool `json:"can_see_deals_list_summary"`
		CanSeeHiddenItemsNames      bool `json:"can_see_hidden_items_names"`
		CanSeeOtherUsers            bool `json:"can_see_other_users"`
		CanSeeOtherUsersStatistics  bool `json:"can_see_other_users_statistics"`
		CanShareFilters             bool `json:"can_share_filters"`
		CanUseAPI                   bool `json:"can_use_api"`
	} `json:"data"`
}

UserPermissionsResponse represents user permissions response.

type UserRoleSettingsResponse

type UserRoleSettingsResponse struct {
	Success bool `json:"success"`
	Data    struct {
		DealDefaultVisibility    int `json:"deal_default_visibility"`
		OrgDefaultVisibility     int `json:"org_default_visibility"`
		PersonDefaultVisibility  int `json:"person_default_visibility"`
		ProductDefaultVisibility int `json:"product_default_visibility"`
		DealAccessLevel          int `json:"deal_access_level"`
		OrgAccessLevel           int `json:"org_access_level"`
		PersonAccessLevel        int `json:"person_access_level"`
		ProductAccessLevel       int `json:"product_access_level"`
	} `json:"data"`
}

UserRoleSettingsResponse represents user role settings response.

type UserSettings

type UserSettings struct {
	Success bool `json:"success"`
	Data    struct {
		ShowGettingStartedVideo                 bool          `json:"show_getting_started_video"`
		ListLimit                               int           `json:"list_limit"`
		BetaApp                                 bool          `json:"beta_app"`
		FileUploadDestination                   string        `json:"file_upload_destination"`
		CalltoLinkSyntax                        string        `json:"callto_link_syntax"`
		AutofillDealExpectedCloseDate           bool          `json:"autofill_deal_expected_close_date"`
		PersonDuplicateCondition                string        `json:"person_duplicate_condition"`
		OrganizationDuplicateCondition          string        `json:"organization_duplicate_condition"`
		AddFollowersWhenImporting               bool          `json:"add_followers_when_importing"`
		SearchBackend                           string        `json:"search_backend"`
		BillingManagedBySales                   bool          `json:"billing_managed_by_sales"`
		MaxDealAgeInAverageProgressCalculation  int           `json:"max_deal_age_in_average_progress_calculation"`
		ThirdPartyLinks                         []interface{} `json:"third_party_links"`
		ElasticWriteTargetDuringMigration       string        `json:"elastic_write_target_during_migration"`
		AutoCreateNewPersonsFromForwarderEmails bool          `json:"auto_create_new_persons_from_forwarder_emails"`
		CompanyAdvancedDebugLogs                bool          `json:"company_advanced_debug_logs"`
		DealBlockOrder                          []struct {
			Type    string `json:"type"`
			Visible bool   `json:"visible"`
		} `json:"deal_block_order"`
		PersonBlockOrder []struct {
			Type    string `json:"type"`
			Visible bool   `json:"visible"`
		} `json:"person_block_order"`
		OrganizationBlockOrder []struct {
			Type    string `json:"type"`
			Visible bool   `json:"visible"`
		} `json:"organization_block_order"`
		NylasSync                            bool          `json:"nylas_sync"`
		OnboardingComplete                   bool          `json:"onboarding_complete"`
		ActivityEmailReminders               bool          `json:"activity_email_reminders"`
		ActivityEmailRemindersSendType       string        `json:"activity_email_reminders_send_type"`
		ActivityEmailRemindersAmountBefore   int           `json:"activity_email_reminders_amount_before"`
		ActivityNotificationsLanguageID      int           `json:"activity_notifications_language_id"`
		FileConvertAllowed                   bool          `json:"file_convert_allowed"`
		DefaultCurrency                      string        `json:"default_currency"`
		SendEmailNotifications               string        `json:"send_email_notifications"`
		ShowUpdateNotifications              bool          `json:"show_update_notifications"`
		CreateFolderInGoogleDrive            bool          `json:"create_folder_in_google_drive"`
		ShareGoogleDriveFilesWithCompany     bool          `json:"share_google_drive_files_with_company"`
		DealsTimelineDefaultField            string        `json:"deals_timeline_default_field"`
		DealsTimelineInterval                string        `json:"deals_timeline_interval"`
		DealsTimelineArrangeBy               string        `json:"deals_timeline_arrange_by"`
		DealsTimelineColumnCount             int           `json:"deals_timeline_column_count"`
		DealsTimelineShowProgress            bool          `json:"deals_timeline_show_progress"`
		ShareIncomingEmails                  bool          `json:"share_incoming_emails"`
		ConnectThreadsWithDeals              bool          `json:"connect_threads_with_deals"`
		EmailSignature                       bool          `json:"email_signature"`
		EmailSignatureText                   string        `json:"email_signature_text"`
		GlobalSearchSurveyLinkClicked        bool          `json:"global_search_survey_link_clicked"`
		GoogleCalendarActivityType           string        `json:"google_calendar_activity_type"`
		GoogleCalendarIgnoreActivityTypes    []interface{} `json:"google_calendar_ignore_activity_types"`
		UploadAllVisiblePersonsToGoogle      bool          `json:"upload_all_visible_persons_to_google"`
		FormatPhoneNumbersEnabled            bool          `json:"format_phone_numbers_enabled"`
		OnboardingCompletedTours             []interface{} `json:"onboarding_completed_tours"`
		OpenEmailLinksInNewTab               bool          `json:"open_email_links_in_new_tab"`
		TotalsConvertCurrency                bool          `json:"totals_convert_currency"`
		EmailSyncFilter                      string        `json:"email_sync_filter"`
		EmailSyncFilterLabels                []interface{} `json:"email_sync_filter_labels"`
		DealDetailsOpen                      bool          `json:"deal_details_open"`
		PersonDetailsOpen                    bool          `json:"person_details_open"`
		OrganizationDetailsOpen              bool          `json:"organization_details_open"`
		GoogleCalendarSubjectFormat          string        `json:"google_calendar_subject_format"`
		GoogleCalendarActivityReminders      []interface{} `json:"google_calendar_activity_reminders"`
		HideEmailSettingsPromotionBanner     bool          `json:"hide_email_settings_promotion_banner"`
		UserAdvancedDebugLogs                bool          `json:"user_advanced_debug_logs"`
		ShowFiltercolumnsTutorial            bool          `json:"show_filtercolumns_tutorial"`
		ShowDuplicates                       bool          `json:"show_duplicates"`
		ShowImportTutorial                   bool          `json:"show_import_tutorial"`
		ShowStatisticsTutorial               bool          `json:"show_statistics_tutorial"`
		ShowActivitycrossitemTutorial        bool          `json:"show_activitycrossitem_tutorial"`
		HasSeenDropboxOldDetailsDeprecNotice bool          `json:"has_seen_dropbox_old_details_deprec_notice"`
		LinkPersonToOrg                      bool          `json:"link_person_to_org"`
		TimezoneAutomaticUpdate              bool          `json:"timezone_automatic_update"`
		UsePipedriveMailtoLinks              bool          `json:"use_pipedrive_mailto_links"`
		AbMailPromotion1Enabled              bool          `json:"ab_mail_promotion1_enabled"`
		MailFiltersInbox                     []interface{} `json:"mail_filters_inbox"`
		MailFiltersDrafts                    []interface{} `json:"mail_filters_drafts"`
		MailFiltersSent                      []interface{} `json:"mail_filters_sent"`
		MailFiltersArchive                   []interface{} `json:"mail_filters_archive"`
		PromoteGsFilters                     bool          `json:"promote_gs_filters"`
		PromoteGsNotesAndFields              bool          `json:"promote_gs_notes_and_fields"`
		HasSeenHelpTooltip                   bool          `json:"has_seen_help_tooltip"`
		InvitationLastTime                   int           `json:"invitation_last_time"`
		InvitationResentCount                int           `json:"invitation_resent_count"`
		ExpandedCalendarAllday               bool          `json:"expanded_calendar_allday"`
		TimelinePanelOpen                    bool          `json:"timeline_panel_open"`
		TimelinePanelOnboardingDone          bool          `json:"timeline_panel_onboarding_done"`
		HasNotifications                     bool          `json:"has_notifications"`
		ActivitiesViewMode                   string        `json:"activities_view_mode"`
		ActivityQuickfilterRange             string        `json:"activity_quickfilter_range"`
		CurrentPipelineID                    int           `json:"current_pipeline_id"`
		DealsTimelineShowWeightedValues      bool          `json:"deals_timeline_show_weighted_values"`
		DealsViewMode                        string        `json:"deals_view_mode"`
		FeedViewType                         string        `json:"feed_view_type"`
		FilterActivities                     string        `json:"filter_activities"`
		FilterDeals                          string        `json:"filter_deals"`
		FilterOrg                            string        `json:"filter_org"`
		FilterPeople                         string        `json:"filter_people"`
		FilterPipeline1                      string        `json:"filter_pipeline_1"`
		FilterPipeline2                      string        `json:"filter_pipeline_2"`
		FilterProducts                       string        `json:"filter_products"`
		GoogledocsFolderID                   string        `json:"googledocs_folder_id"`
		GoogleCalendarSync                   bool          `json:"google_calendar_sync"`
	} `json:"data"`
}

UserSettings represents a Pipedrive user settings.

type UserSettingsService

type UserSettingsService service

UserSettingsService handles user settings related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/UserSettings

func (*UserSettingsService) List

List settings of authorized user.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/UserSettings/get_userSettings

type UserSingleResponse

type UserSingleResponse struct {
	Success        bool           `json:"success"`
	Data           User           `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

UserSingleResponse represents single user response.

type UsersFindByNameOptions

type UsersFindByNameOptions struct {
	Term          string `url:"term,omitempty"`
	SearchByEmail int    `url:"search_by_email,omitempty"`
}

UsersFindByNameOptions specifices the optional parameters to the UsersService.FindByName method.

type UsersResponse

type UsersResponse struct {
	Success        bool           `json:"success"`
	Error          string         `json:"error,omitempty"`
	ErrorInfo      string         `json:"error_info,omitempty"`
	Data           []User         `json:"data"`
	AdditionalData AdditionalData `json:"additional_data"`
}

UsersResponse represents multiple users response.

type UsersService

type UsersService service

UsersService handles users related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Users

func (*UsersService) Create

Create a user.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Users/post_users

func (*UsersService) DeletePermissionSetAssignment

func (s *UsersService) DeletePermissionSetAssignment(ctx context.Context, id int, opt *DeletePermissionSetAssignmentOptions) (*Response, error)

DeletePermissionSetAssignment deletes a permission set assignment for a user.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Users/delete_users_id_permissionSetAssignments

func (*UsersService) DeleteRoleAssignment

func (s *UsersService) DeleteRoleAssignment(ctx context.Context, id int, opt *DeleteRoleAssignmentOptions) (*Response, error)

DeleteRoleAssignment deletes a role assignment for a user.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Users/delete_users_id_roleAssignments

func (*UsersService) FindByName

FindByName finds users by their name.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Users/get_users_find

func (*UsersService) GetByID

GetByID returns specific user.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Users/get_users_id

func (*UsersService) GetCurrentUserData

func (s *UsersService) GetCurrentUserData(ctx context.Context) (*UserSingleResponse, *Response, error)

GetCurrentUserData returns data about an authorized user within the company.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Users/get_users_me

func (*UsersService) List

List returns data about all users within the company.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Users/get_users

func (*UsersService) ListFollowers

func (s *UsersService) ListFollowers(ctx context.Context, id int) (*UserFollowersResponse, *Response, error)

ListFollowers lists followers of a specific user.

https://developers.pipedrive.com/docs/api/v1/#!/Users/get_users_id_followers

func (*UsersService) ListUserPermissions

func (s *UsersService) ListUserPermissions(ctx context.Context, id int) (*UserPermissionsResponse, *Response, error)

ListUserPermissions lists aggregated permissions over all assigned permission sets for a user.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Users/get_users_id_permissions

func (*UsersService) ListUserRoleSettings

func (s *UsersService) ListUserRoleSettings(ctx context.Context, id int) (*UserRoleSettingsResponse, *Response, error)

ListUserRoleSettings lists settings of user's assigned role.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Users/get_users_id_roleSettings

func (*UsersService) UpdateUserDetails

func (s *UsersService) UpdateUserDetails(ctx context.Context, id int, opt *UsersUpdateUserDetailsOptions) (*Response, error)

UpdateUserDetails updates the properties of a user. Currently, only active_flag can be updated.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Users/put_users_id

type UsersUpdateUserDetailsOptions

type UsersUpdateUserDetailsOptions struct {
	ActiveFlag uint8 `url:"active_flag,omitempty"`
}

UsersUpdateUserDetailsOptions specifices the optional parameters to the UsersService.UpdateUserDetails method.

type VisibleTo

type VisibleTo uint8

Visiblity

const (
	VisibleToOwnersFollowers VisibleTo = 1
	VisibleToEntireCompany   VisibleTo = 3
)

type Webhook

type Webhook struct {
	ID               int         `json:"id"`
	CompanyID        int         `json:"company_id"`
	OwnerID          int         `json:"owner_id"`
	UserID           int         `json:"user_id"`
	EventAction      string      `json:"event_action"`
	EventObject      string      `json:"event_object"`
	SubscriptionURL  string      `json:"subscription_url"`
	IsActive         int         `json:"is_active"`
	AddTime          time.Time   `json:"add_time"`
	RemoveTime       interface{} `json:"remove_time"`
	Type             string      `json:"type"`
	HTTPAuthUser     interface{} `json:"http_auth_user"`
	HTTPAuthPassword interface{} `json:"http_auth_password"`
	AdditionalData   struct{}    `json:"additional_data"`
	LastDeliveryTime time.Time   `json:"last_delivery_time"`
	LastHTTPStatus   int         `json:"last_http_status"`
	AdminID          int         `json:"admin_id"`
}

Webhook represents a Pipedrive webhook.

func (Webhook) String

func (w Webhook) String() string

type WebhookResponse

type WebhookResponse struct {
	Status  string  `json:"status,omitempty"`
	Success bool    `json:"success,omitempty"`
	Data    Webhook `json:"data,omitempty"`
}

WebhookResponse represents single webhook response.

type WebhooksCreateOptions

type WebhooksCreateOptions struct {
	SubscriptionURL  string      `url:"subscription_url"`
	EventAction      EventAction `url:"event_action"`
	DealProbability  EventObject `url:"event_object"`
	UserID           uint        `url:"user_id"`
	HTTPAuthUser     string      `url:"http_auth_user"`
	HTTPAuthPassword string      `url:"http_auth_password"`
}

WebhooksCreateOptions specifices the optional parameters to the WebhooksService.Create method.

type WebhooksResponse

type WebhooksResponse struct {
	Status  string    `json:"status,omitempty"`
	Success bool      `json:"success,omitempty"`
	Data    []Webhook `json:"data,omitempty"`
}

WebhooksResponse represents multiple webhooks response.

type WebhooksService

type WebhooksService service

WebhooksService handles webhooks related methods of the Pipedrive API.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Webhooks

func (*WebhooksService) Create

Create a webhook.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Webhooks/post_webhooks

func (*WebhooksService) Delete

func (s *WebhooksService) Delete(ctx context.Context, id int) (*Response, error)

Delete a webhook.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Webhooks/delete_webhooks_id

func (*WebhooksService) List

List all webhooks.

Pipedrive API docs: https://developers.pipedrive.com/docs/api/v1/#!/Webhooks/get_webhooks

Jump to

Keyboard shortcuts

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