Categorygithub.com/stripedapps/pipedrive-go-sdk
repositorypackage
0.0.0-20240724192246-01476ed3c737
Repository: https://github.com/stripedapps/pipedrive-go-sdk.git
Documentation: pkg.go.dev

# README

Go API client for openapi

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0
  • Package version: 1.0.0
  • Generator version: 7.7.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import openapi "github.com/stripedapps/pipedrive-go-sdk"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value openapi.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value openapi.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using openapi.ContextOperationServerIndices and openapi.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://api.pipedrive.com/v1

ClassMethodHTTP requestDescription
ActivitiesAPIAddActivityPost /activitiesAdd an activity
ActivitiesAPIDeleteActivitiesDelete /activitiesDelete multiple activities in bulk
ActivitiesAPIDeleteActivityDelete /activities/{id}Delete an activity
ActivitiesAPIGetActivitiesGet /activitiesGet all activities assigned to a particular user
ActivitiesAPIGetActivitiesCollectionGet /activities/collectionGet all activities (BETA)
ActivitiesAPIGetActivityGet /activities/{id}Get details of an activity
ActivitiesAPIUpdateActivityPut /activities/{id}Update an activity
ActivityFieldsAPIGetActivityFieldsGet /activityFieldsGet all activity fields
ActivityTypesAPIAddActivityTypePost /activityTypesAdd new activity type
ActivityTypesAPIDeleteActivityTypeDelete /activityTypes/{id}Delete an activity type
ActivityTypesAPIDeleteActivityTypesDelete /activityTypesDelete multiple activity types in bulk
ActivityTypesAPIGetActivityTypesGet /activityTypesGet all activity types
ActivityTypesAPIUpdateActivityTypePut /activityTypes/{id}Update an activity type
BillingAPIGetCompanyAddonsGet /billing/subscriptions/addonsGet all add-ons for a single company
CallLogsAPIAddCallLogPost /callLogsAdd a call log
CallLogsAPIAddCallLogAudioFilePost /callLogs/{id}/recordingsAttach an audio file to the call log
CallLogsAPIDeleteCallLogDelete /callLogs/{id}Delete a call log
CallLogsAPIGetCallLogGet /callLogs/{id}Get details of a call log
CallLogsAPIGetUserCallLogsGet /callLogsGet all call logs assigned to a particular user
ChannelsAPIAddChannelPost /channelsAdd a channel
ChannelsAPIDeleteChannelDelete /channels/{id}Delete a channel
ChannelsAPIDeleteConversationDelete /channels/{channel-id}/conversations/{conversation-id}Delete a conversation
ChannelsAPIReceiveMessagePost /channels/messages/receiveReceives an incoming message
CurrenciesAPIGetCurrenciesGet /currenciesGet all supported currencies
DealFieldsAPIAddDealFieldPost /dealFieldsAdd a new deal field
DealFieldsAPIDeleteDealFieldDelete /dealFields/{id}Delete a deal field
DealFieldsAPIDeleteDealFieldsDelete /dealFieldsDelete multiple deal fields in bulk
DealFieldsAPIGetDealFieldGet /dealFields/{id}Get one deal field
DealFieldsAPIGetDealFieldsGet /dealFieldsGet all deal fields
DealFieldsAPIUpdateDealFieldPut /dealFields/{id}Update a deal field
DealsAPIAddDealPost /dealsAdd a deal
DealsAPIAddDealFollowerPost /deals/{id}/followersAdd a follower to a deal
DealsAPIAddDealParticipantPost /deals/{id}/participantsAdd a participant to a deal
DealsAPIAddDealProductPost /deals/{id}/productsAdd a product to a deal
DealsAPIDeleteDealDelete /deals/{id}Delete a deal
DealsAPIDeleteDealFollowerDelete /deals/{id}/followers/{follower_id}Delete a follower from a deal
DealsAPIDeleteDealParticipantDelete /deals/{id}/participants/{deal_participant_id}Delete a participant from a deal
DealsAPIDeleteDealProductDelete /deals/{id}/products/{product_attachment_id}Delete an attached product from a deal
DealsAPIDeleteDealsDelete /dealsDelete multiple deals in bulk
DealsAPIDuplicateDealPost /deals/{id}/duplicateDuplicate deal
DealsAPIGetDealGet /deals/{id}Get details of a deal
DealsAPIGetDealActivitiesGet /deals/{id}/activitiesList activities associated with a deal
DealsAPIGetDealChangelogGet /deals/{id}/changelogList updates about deal field values
DealsAPIGetDealFilesGet /deals/{id}/filesList files attached to a deal
DealsAPIGetDealFollowersGet /deals/{id}/followersList followers of a deal
DealsAPIGetDealMailMessagesGet /deals/{id}/mailMessagesList mail messages associated with a deal
DealsAPIGetDealParticipantsGet /deals/{id}/participantsList participants of a deal
DealsAPIGetDealParticipantsChangelogGet /deals/{id}/participantsChangelogList updates about participants of a deal
DealsAPIGetDealPersonsGet /deals/{id}/personsList all persons associated with a deal
DealsAPIGetDealProductsGet /deals/{id}/productsList products attached to a deal
DealsAPIGetDealUpdatesGet /deals/{id}/flowList updates about a deal
DealsAPIGetDealUsersGet /deals/{id}/permittedUsersList permitted users
DealsAPIGetDealsGet /dealsGet all deals
DealsAPIGetDealsCollectionGet /deals/collectionGet all deals (BETA)
DealsAPIGetDealsSummaryGet /deals/summaryGet deals summary
DealsAPIGetDealsTimelineGet /deals/timelineGet deals timeline
DealsAPIMergeDealsPut /deals/{id}/mergeMerge two deals
DealsAPISearchDealsGet /deals/searchSearch deals
DealsAPIUpdateDealPut /deals/{id}Update a deal
DealsAPIUpdateDealProductPut /deals/{id}/products/{product_attachment_id}Update the product attached to a deal
FilesAPIAddFilePost /filesAdd file
FilesAPIAddFileAndLinkItPost /files/remoteCreate a remote file and link it to an item
FilesAPIDeleteFileDelete /files/{id}Delete a file
FilesAPIDownloadFileGet /files/{id}/downloadDownload one file
FilesAPIGetFileGet /files/{id}Get one file
FilesAPIGetFilesGet /filesGet all files
FilesAPILinkFileToItemPost /files/remoteLinkLink a remote file to an item
FilesAPIUpdateFilePut /files/{id}Update file details
FiltersAPIAddFilterPost /filtersAdd a new filter
FiltersAPIDeleteFilterDelete /filters/{id}Delete a filter
FiltersAPIDeleteFiltersDelete /filtersDelete multiple filters in bulk
FiltersAPIGetFilterGet /filters/{id}Get one filter
FiltersAPIGetFilterHelpersGet /filters/helpersGet all filter helpers
FiltersAPIGetFiltersGet /filtersGet all filters
FiltersAPIUpdateFilterPut /filters/{id}Update filter
GoalsAPIAddGoalPost /goalsAdd a new goal
GoalsAPIDeleteGoalDelete /goals/{id}Delete existing goal
GoalsAPIGetGoalResultGet /goals/{id}/resultsGet result of a goal
GoalsAPIGetGoalsGet /goals/findFind goals
GoalsAPIUpdateGoalPut /goals/{id}Update existing goal
ItemSearchAPISearchItemGet /itemSearchPerform a search from multiple item types
ItemSearchAPISearchItemByFieldGet /itemSearch/fieldPerform a search using a specific field from an item type
LeadLabelsAPIAddLeadLabelPost /leadLabelsAdd a lead label
LeadLabelsAPIDeleteLeadLabelDelete /leadLabels/{id}Delete a lead label
LeadLabelsAPIGetLeadLabelsGet /leadLabelsGet all lead labels
LeadLabelsAPIUpdateLeadLabelPatch /leadLabels/{id}Update a lead label
LeadSourcesAPIGetLeadSourcesGet /leadSourcesGet all lead sources
LeadsAPIAddLeadPost /leadsAdd a lead
LeadsAPIDeleteLeadDelete /leads/{id}Delete a lead
LeadsAPIGetLeadGet /leads/{id}Get one lead
LeadsAPIGetLeadUsersGet /leads/{id}/permittedUsersList permitted users
LeadsAPIGetLeadsGet /leadsGet all leads
LeadsAPISearchLeadsGet /leads/searchSearch leads
LeadsAPIUpdateLeadPatch /leads/{id}Update a lead
LegacyTeamsAPIAddTeamPost /legacyTeamsAdd a new team
LegacyTeamsAPIAddTeamUserPost /legacyTeams/{id}/usersAdd users to a team
LegacyTeamsAPIDeleteTeamUserDelete /legacyTeams/{id}/usersDelete users from a team
LegacyTeamsAPIGetTeamGet /legacyTeams/{id}Get a single team
LegacyTeamsAPIGetTeamUsersGet /legacyTeams/{id}/usersGet all users in a team
LegacyTeamsAPIGetTeamsGet /legacyTeamsGet all teams
LegacyTeamsAPIGetUserTeamsGet /legacyTeams/user/{id}Get all teams of a user
LegacyTeamsAPIUpdateTeamPut /legacyTeams/{id}Update a team
MailboxAPIDeleteMailThreadDelete /mailbox/mailThreads/{id}Delete mail thread
MailboxAPIGetMailMessageGet /mailbox/mailMessages/{id}Get one mail message
MailboxAPIGetMailThreadGet /mailbox/mailThreads/{id}Get one mail thread
MailboxAPIGetMailThreadMessagesGet /mailbox/mailThreads/{id}/mailMessagesGet all mail messages of mail thread
MailboxAPIGetMailThreadsGet /mailbox/mailThreadsGet mail threads
MailboxAPIUpdateMailThreadDetailsPut /mailbox/mailThreads/{id}Update mail thread details
MeetingsAPIDeleteUserProviderLinkDelete /meetings/userProviderLinks/{id}Delete the link between a user and the installed video call integration
MeetingsAPISaveUserProviderLinkPost /meetings/userProviderLinksLink a user with the installed video call integration
NoteFieldsAPIGetNoteFieldsGet /noteFieldsGet all note fields
NotesAPIAddNotePost /notesAdd a note
NotesAPIAddNoteCommentPost /notes/{id}/commentsAdd a comment to a note
NotesAPIDeleteCommentDelete /notes/{id}/comments/{commentId}Delete a comment related to a note
NotesAPIDeleteNoteDelete /notes/{id}Delete a note
NotesAPIGetCommentGet /notes/{id}/comments/{commentId}Get one comment
NotesAPIGetNoteGet /notes/{id}Get one note
NotesAPIGetNoteCommentsGet /notes/{id}/commentsGet all comments for a note
NotesAPIGetNotesGet /notesGet all notes
NotesAPIUpdateCommentForNotePut /notes/{id}/comments/{commentId}Update a comment related to a note
NotesAPIUpdateNotePut /notes/{id}Update a note
OauthAPIAuthorizeGet /oauth/authorizeRequesting authorization
OauthAPIGetTokensPost /oauth/tokenGetting the tokens
OauthAPIRefreshTokensPost /oauth/token/Refreshing the tokens
OrganizationFieldsAPIAddOrganizationFieldPost /organizationFieldsAdd a new organization field
OrganizationFieldsAPIDeleteOrganizationFieldDelete /organizationFields/{id}Delete an organization field
OrganizationFieldsAPIDeleteOrganizationFieldsDelete /organizationFieldsDelete multiple organization fields in bulk
OrganizationFieldsAPIGetOrganizationFieldGet /organizationFields/{id}Get one organization field
OrganizationFieldsAPIGetOrganizationFieldsGet /organizationFieldsGet all organization fields
OrganizationFieldsAPIUpdateOrganizationFieldPut /organizationFields/{id}Update an organization field
OrganizationRelationshipsAPIAddOrganizationRelationshipPost /organizationRelationshipsCreate an organization relationship
OrganizationRelationshipsAPIDeleteOrganizationRelationshipDelete /organizationRelationships/{id}Delete an organization relationship
OrganizationRelationshipsAPIGetOrganizationRelationshipGet /organizationRelationships/{id}Get one organization relationship
OrganizationRelationshipsAPIGetOrganizationRelationshipsGet /organizationRelationshipsGet all relationships for organization
OrganizationRelationshipsAPIUpdateOrganizationRelationshipPut /organizationRelationships/{id}Update an organization relationship
OrganizationsAPIAddOrganizationPost /organizationsAdd an organization
OrganizationsAPIAddOrganizationFollowerPost /organizations/{id}/followersAdd a follower to an organization
OrganizationsAPIDeleteOrganizationDelete /organizations/{id}Delete an organization
OrganizationsAPIDeleteOrganizationFollowerDelete /organizations/{id}/followers/{follower_id}Delete a follower from an organization
OrganizationsAPIDeleteOrganizationsDelete /organizationsDelete multiple organizations in bulk
OrganizationsAPIGetOrganizationGet /organizations/{id}Get details of an organization
OrganizationsAPIGetOrganizationActivitiesGet /organizations/{id}/activitiesList activities associated with an organization
OrganizationsAPIGetOrganizationChangelogGet /organizations/{id}/changelogList updates about organization field values
OrganizationsAPIGetOrganizationDealsGet /organizations/{id}/dealsList deals associated with an organization
OrganizationsAPIGetOrganizationFilesGet /organizations/{id}/filesList files attached to an organization
OrganizationsAPIGetOrganizationFollowersGet /organizations/{id}/followersList followers of an organization
OrganizationsAPIGetOrganizationMailMessagesGet /organizations/{id}/mailMessagesList mail messages associated with an organization
OrganizationsAPIGetOrganizationPersonsGet /organizations/{id}/personsList persons of an organization
OrganizationsAPIGetOrganizationUpdatesGet /organizations/{id}/flowList updates about an organization
OrganizationsAPIGetOrganizationUsersGet /organizations/{id}/permittedUsersList permitted users
OrganizationsAPIGetOrganizationsGet /organizationsGet all organizations
OrganizationsAPIGetOrganizationsCollectionGet /organizations/collectionGet all organizations (BETA)
OrganizationsAPIMergeOrganizationsPut /organizations/{id}/mergeMerge two organizations
OrganizationsAPISearchOrganizationGet /organizations/searchSearch organizations
OrganizationsAPIUpdateOrganizationPut /organizations/{id}Update an organization
PermissionSetsAPIGetPermissionSetGet /permissionSets/{id}Get one permission set
PermissionSetsAPIGetPermissionSetAssignmentsGet /permissionSets/{id}/assignmentsList permission set assignments
PermissionSetsAPIGetPermissionSetsGet /permissionSetsGet all permission sets
PersonFieldsAPIAddPersonFieldPost /personFieldsAdd a new person field
PersonFieldsAPIDeletePersonFieldDelete /personFields/{id}Delete a person field
PersonFieldsAPIDeletePersonFieldsDelete /personFieldsDelete multiple person fields in bulk
PersonFieldsAPIGetPersonFieldGet /personFields/{id}Get one person field
PersonFieldsAPIGetPersonFieldsGet /personFieldsGet all person fields
PersonFieldsAPIUpdatePersonFieldPut /personFields/{id}Update a person field
PersonsAPIAddPersonPost /personsAdd a person
PersonsAPIAddPersonFollowerPost /persons/{id}/followersAdd a follower to a person
PersonsAPIAddPersonPicturePost /persons/{id}/pictureAdd person picture
PersonsAPIDeletePersonDelete /persons/{id}Delete a person
PersonsAPIDeletePersonFollowerDelete /persons/{id}/followers/{follower_id}Delete a follower from a person
PersonsAPIDeletePersonPictureDelete /persons/{id}/pictureDelete person picture
PersonsAPIDeletePersonsDelete /personsDelete multiple persons in bulk
PersonsAPIGetPersonGet /persons/{id}Get details of a person
PersonsAPIGetPersonActivitiesGet /persons/{id}/activitiesList activities associated with a person
PersonsAPIGetPersonChangelogGet /persons/{id}/changelogList updates about person field values
PersonsAPIGetPersonDealsGet /persons/{id}/dealsList deals associated with a person
PersonsAPIGetPersonFilesGet /persons/{id}/filesList files attached to a person
PersonsAPIGetPersonFollowersGet /persons/{id}/followersList followers of a person
PersonsAPIGetPersonMailMessagesGet /persons/{id}/mailMessagesList mail messages associated with a person
PersonsAPIGetPersonProductsGet /persons/{id}/productsList products associated with a person
PersonsAPIGetPersonUpdatesGet /persons/{id}/flowList updates about a person
PersonsAPIGetPersonUsersGet /persons/{id}/permittedUsersList permitted users
PersonsAPIGetPersonsGet /personsGet all persons
PersonsAPIGetPersonsCollectionGet /persons/collectionGet all persons (BETA)
PersonsAPIMergePersonsPut /persons/{id}/mergeMerge two persons
PersonsAPISearchPersonsGet /persons/searchSearch persons
PersonsAPIUpdatePersonPut /persons/{id}Update a person
PipelinesAPIAddPipelinePost /pipelinesAdd a new pipeline
PipelinesAPIDeletePipelineDelete /pipelines/{id}Delete a pipeline
PipelinesAPIGetPipelineGet /pipelines/{id}Get one pipeline
PipelinesAPIGetPipelineConversionStatisticsGet /pipelines/{id}/conversion_statisticsGet deals conversion rates in pipeline
PipelinesAPIGetPipelineDealsGet /pipelines/{id}/dealsGet deals in a pipeline
PipelinesAPIGetPipelineMovementStatisticsGet /pipelines/{id}/movement_statisticsGet deals movements in pipeline
PipelinesAPIGetPipelinesGet /pipelinesGet all pipelines
PipelinesAPIUpdatePipelinePut /pipelines/{id}Update a pipeline
ProductFieldsAPIAddProductFieldPost /productFieldsAdd a new product field
ProductFieldsAPIDeleteProductFieldDelete /productFields/{id}Delete a product field
ProductFieldsAPIDeleteProductFieldsDelete /productFieldsDelete multiple product fields in bulk
ProductFieldsAPIGetProductFieldGet /productFields/{id}Get one product field
ProductFieldsAPIGetProductFieldsGet /productFieldsGet all product fields
ProductFieldsAPIUpdateProductFieldPut /productFields/{id}Update a product field
ProductsAPIAddProductPost /productsAdd a product
ProductsAPIAddProductFollowerPost /products/{id}/followersAdd a follower to a product
ProductsAPIDeleteProductDelete /products/{id}Delete a product
ProductsAPIDeleteProductFollowerDelete /products/{id}/followers/{follower_id}Delete a follower from a product
ProductsAPIGetProductGet /products/{id}Get one product
ProductsAPIGetProductDealsGet /products/{id}/dealsGet deals where a product is attached to
ProductsAPIGetProductFilesGet /products/{id}/filesList files attached to a product
ProductsAPIGetProductFollowersGet /products/{id}/followersList followers of a product
ProductsAPIGetProductUsersGet /products/{id}/permittedUsersList permitted users
ProductsAPIGetProductsGet /productsGet all products
ProductsAPISearchProductsGet /products/searchSearch products
ProductsAPIUpdateProductPut /products/{id}Update a product
ProjectTemplatesAPIGetProjectTemplateGet /projectTemplates/{id}Get details of a template
ProjectTemplatesAPIGetProjectTemplatesGet /projectTemplatesGet all project templates
ProjectTemplatesAPIGetProjectsBoardGet /projects/boards/{id}Get details of a board
ProjectTemplatesAPIGetProjectsPhaseGet /projects/phases/{id}Get details of a phase
ProjectsAPIAddProjectPost /projectsAdd a project
ProjectsAPIArchiveProjectPost /projects/{id}/archiveArchive a project
ProjectsAPIDeleteProjectDelete /projects/{id}Delete a project
ProjectsAPIGetProjectGet /projects/{id}Get details of a project
ProjectsAPIGetProjectActivitiesGet /projects/{id}/activitiesReturns project activities
ProjectsAPIGetProjectGroupsGet /projects/{id}/groupsReturns project groups
ProjectsAPIGetProjectPlanGet /projects/{id}/planReturns project plan
ProjectsAPIGetProjectTasksGet /projects/{id}/tasksReturns project tasks
ProjectsAPIGetProjectsGet /projectsGet all projects
ProjectsAPIGetProjectsBoardsGet /projects/boardsGet all project boards
ProjectsAPIGetProjectsPhasesGet /projects/phasesGet project phases
ProjectsAPIPutProjectPlanActivityPut /projects/{id}/plan/activities/{activityId}Update activity in project plan
ProjectsAPIPutProjectPlanTaskPut /projects/{id}/plan/tasks/{taskId}Update task in project plan
ProjectsAPIUpdateProjectPut /projects/{id}Update a project
RecentsAPIGetRecentsGet /recentsGet recents
RolesAPIAddOrUpdateRoleSettingPost /roles/{id}/settingsAdd or update role setting
RolesAPIAddRolePost /rolesAdd a role
RolesAPIAddRoleAssignmentPost /roles/{id}/assignmentsAdd role assignment
RolesAPIDeleteRoleDelete /roles/{id}Delete a role
RolesAPIDeleteRoleAssignmentDelete /roles/{id}/assignmentsDelete a role assignment
RolesAPIGetRoleGet /roles/{id}Get one role
RolesAPIGetRoleAssignmentsGet /roles/{id}/assignmentsList role assignments
RolesAPIGetRolePipelinesGet /roles/{id}/pipelinesList pipeline visibility for a role
RolesAPIGetRoleSettingsGet /roles/{id}/settingsList role settings
RolesAPIGetRolesGet /rolesGet all roles
RolesAPIUpdateRolePut /roles/{id}Update role details
RolesAPIUpdateRolePipelinesPut /roles/{id}/pipelinesUpdate pipeline visibility for a role
StagesAPIAddStagePost /stagesAdd a new stage
StagesAPIDeleteStageDelete /stages/{id}Delete a stage
StagesAPIDeleteStagesDelete /stagesDelete multiple stages in bulk
StagesAPIGetStageGet /stages/{id}Get one stage
StagesAPIGetStageDealsGet /stages/{id}/dealsGet deals in a stage
StagesAPIGetStagesGet /stagesGet all stages
StagesAPIUpdateStagePut /stages/{id}Update stage details
SubscriptionsAPIAddRecurringSubscriptionPost /subscriptions/recurringAdd a recurring subscription
SubscriptionsAPIAddSubscriptionInstallmentPost /subscriptions/installmentAdd an installment subscription
SubscriptionsAPICancelRecurringSubscriptionPut /subscriptions/recurring/{id}/cancelCancel a recurring subscription
SubscriptionsAPIDeleteSubscriptionDelete /subscriptions/{id}Delete a subscription
SubscriptionsAPIFindSubscriptionByDealGet /subscriptions/find/{dealId}Find subscription by deal
SubscriptionsAPIGetSubscriptionGet /subscriptions/{id}Get details of a subscription
SubscriptionsAPIGetSubscriptionPaymentsGet /subscriptions/{id}/paymentsGet all payments of a subscription
SubscriptionsAPIUpdateRecurringSubscriptionPut /subscriptions/recurring/{id}Update a recurring subscription
SubscriptionsAPIUpdateSubscriptionInstallmentPut /subscriptions/installment/{id}Update an installment subscription
TasksAPIAddTaskPost /tasksAdd a task
TasksAPIDeleteTaskDelete /tasks/{id}Delete a task
TasksAPIGetTaskGet /tasks/{id}Get details of a task
TasksAPIGetTasksGet /tasksGet all tasks
TasksAPIUpdateTaskPut /tasks/{id}Update a task
UserConnectionsAPIGetUserConnectionsGet /userConnectionsGet all user connections
UserSettingsAPIGetUserSettingsGet /userSettingsList settings of an authorized user
UsersAPIAddUserPost /usersAdd a new user
UsersAPIFindUsersByNameGet /users/findFind users by name
UsersAPIGetCurrentUserGet /users/meGet current user data
UsersAPIGetUserGet /users/{id}Get one user
UsersAPIGetUserFollowersGet /users/{id}/followersList followers of a user
UsersAPIGetUserPermissionsGet /users/{id}/permissionsList user permissions
UsersAPIGetUserRoleAssignmentsGet /users/{id}/roleAssignmentsList role assignments
UsersAPIGetUserRoleSettingsGet /users/{id}/roleSettingsList user role settings
UsersAPIGetUsersGet /usersGet all users
UsersAPIUpdateUserPut /users/{id}Update user details
WebhooksAPIAddWebhookPost /webhooksCreate a new Webhook
WebhooksAPIDeleteWebhookDelete /webhooks/{id}Delete existing Webhook
WebhooksAPIGetWebhooksGet /webhooksGet all Webhooks

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

basic_authentication

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), openapi.ContextBasicAuth, openapi.BasicAuth{
	UserName: "username",
	Password: "password",
})
r, err := client.Service.Operation(auth, args)

api_key

  • Type: API key
  • API key parameter name: api_token
  • Location: URL query string

Note, each API key must be added to a map of map[string]APIKey where the key is: api_token and passed in as the auth context for each request.

Example

auth := context.WithValue(
		context.Background(),
		openapi.ContextAPIKeys,
		map[string]openapi.APIKey{
			"api_token": {Key: "API_KEY_STRING"},
		},
	)
r, err := client.Service.Operation(auth, args)

oauth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://oauth.pipedrive.com/oauth/authorize
  • Scopes:
  • base: Read settings of the authorized user and currencies in an account
  • deals:read: Read most of the data about deals and related entities - deal fields, products, followers, participants; all notes, files, filters, pipelines, stages, and statistics. Does not include access to activities (except the last and next activity related to a deal)
  • deals:full: Create, read, update and delete deals, its participants and followers; all files, notes, and filters. It also includes read access to deal fields, pipelines, stages, and statistics. Does not include access to activities (except the last and next activity related to a deal)
  • mail:read: Read mail threads and messages
  • mail:full: Read, update and delete mail threads. Also grants read access to mail messages
  • activities:read: Read activities, its fields and types; all files and filters
  • activities:full: Create, read, update and delete activities and all files and filters. Also includes read access to activity fields and types
  • contacts:read: Read the data about persons and organizations, their related fields and followers; also all notes, files, filters
  • contacts:full: Create, read, update and delete persons and organizations and their followers; all notes, files, filters. Also grants read access to contacts-related fields
  • products:read: Read products, its fields, files, followers and products connected to a deal
  • products:full: Create, read, update and delete products and its fields; add products to deals
  • projects:read: Read projects and its fields, tasks and project templates
  • projects:full: Create, read, update and delete projects and its fields; add projects templates and project related tasks
  • users:read: Read data about users (people with access to a Pipedrive account), their permissions, roles and followers
  • recents:read: Read all recent changes occurred in an account. Includes data about activities, activity types, deals, files, filters, notes, persons, organizations, pipelines, stages, products and users
  • search:read: Search across the account for deals, persons, organizations, files and products, and see details about the returned results
  • admin: Allows to do many things that an administrator can do in a Pipedrive company account - create, read, update and delete pipelines and its stages; deal, person and organization fields; activity types; users and permissions, etc. It also allows the app to create webhooks and fetch and delete webhooks that are created by the app
  • leads:read: Read data about leads and lead labels
  • leads:full: Create, read, update and delete leads and lead labels
  • phone-integration: Enables advanced call integration features like logging call duration and other metadata, and play call recordings inside Pipedrive
  • goals:read: Read data on all goals
  • goals:full: Create, read, update and delete goals
  • video-calls: Allows application to register as a video call integration provider and create conference links
  • messengers-integration: Allows application to register as a messengers integration provider and allows them to deliver incoming messages and their statuses

Example

auth := context.WithValue(context.Background(), openapi.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, openapi.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author