Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ The file format of it is based on [Keep a Changelog](http://keepachangelog.com/e
For public Changelog covering all changes done to Pipedrive’s API, webhooks and app extensions platforms, see [public Changelog](https://pipedrive.readme.io/docs/changelog) with discussion area in [Developers Community](https://devcommunity.pipedrive.com/c/documentation/changelog/19).

## [Unreleased]
### Added
- Added `GET /api/v2/persons/{id}/picture` endpoint to retrieve picture information for a specific person, including ID, file size, and URLs for both 128x128 (thumbnail) and 512x512 (full-size) versions of the person's profile picture

## [30.8.0] - 2025-12-05
### Added
Expand Down
1 change: 1 addition & 0 deletions docs/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ PersonsApi | deletePersonFollower | **DELETE** /persons/{id}/followers/{follower
PersonsApi | getPerson | **GET** /persons/{id} | Get details of a person
PersonsApi | getPersonFollowers | **GET** /persons/{id}/followers | List followers of a person
PersonsApi | getPersonFollowersChangelog | **GET** /persons/{id}/followers/changelog | List followers changelog of a person
PersonsApi | getPersonPicture | **GET** /persons/{id}/picture | Get picture of a person
PersonsApi | getPersons | **GET** /persons | Get all persons
PersonsApi | searchPersons | **GET** /persons/search | Search persons
PersonsApi | updatePerson | **PATCH** /persons/{id} | Update a person
Expand Down
90 changes: 90 additions & 0 deletions src/versions/v2/api/persons-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ import { GetFollowerChangelogsResponse } from '../models';
// @ts-ignore
import { GetFollowersResponse } from '../models';
// @ts-ignore
import { GetPersonPictureResponse } from '../models';
// @ts-ignore
import { GetPersonSearchResponse } from '../models';
// @ts-ignore
import { GetPersonsResponse } from '../models';
Expand Down Expand Up @@ -365,6 +367,47 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati



setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };

return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns the picture associated with a person. The picture URLs include both 128x128 and 512x512 pixel versions.
* @summary Get picture of a person
* @param {number} id The ID of the person

* @throws {RequiredError}
*/
getPersonPicture: async (id: number, ): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('getPersonPicture', 'id', id)
const localVarPath = `/persons/{id}/picture`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}

const localVarRequestOptions = { method: 'GET', ...baseOptions };
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication api_key required
await setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration)

// authentication oauth2 required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["contacts:read", "contacts:full"], configuration)



setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
Expand Down Expand Up @@ -691,6 +734,17 @@ export const PersonsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonFollowersChangelog(id, limit, cursor, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Returns the picture associated with a person. The picture URLs include both 128x128 and 512x512 pixel versions.
* @summary Get picture of a person
* @param {number} id The ID of the person

* @throws {RequiredError}
*/
async getPersonPicture(id: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetPersonPictureResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonPicture(id, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
* @summary Get all persons
Expand Down Expand Up @@ -823,6 +877,16 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa
getPersonFollowersChangelog(requestParameters: PersonsApiGetPersonFollowersChangelogRequest, ): Promise<GetFollowerChangelogsResponse> {
return localVarFp.getPersonFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
},
/**
* Returns the picture associated with a person. The picture URLs include both 128x128 and 512x512 pixel versions.
* @summary Get picture of a person
* @param {PersonsApiGetPersonPictureRequest} requestParameters Request parameters.

* @throws {RequiredError}
*/
getPersonPicture(requestParameters: PersonsApiGetPersonPictureRequest, ): Promise<GetPersonPictureResponse> {
return localVarFp.getPersonPicture(requestParameters.id, ).then((request) => request(axios, basePath));
},
/**
* Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
* @summary Get all persons
Expand Down Expand Up @@ -1010,6 +1074,20 @@ export interface PersonsApiGetPersonFollowersChangelogRequest {
readonly cursor?: string
}

/**
* Request parameters for getPersonPicture operation in PersonsApi.
* @export
* @interface PersonsApiGetPersonPictureRequest
*/
export interface PersonsApiGetPersonPictureRequest {
/**
* The ID of the person
* @type {number}
* @memberof PersonsApiGetPersonPicture
*/
readonly id: number
}

/**
* Request parameters for getPersons operation in PersonsApi.
* @export
Expand Down Expand Up @@ -1276,6 +1354,18 @@ export class PersonsApi extends BaseAPI {
return PersonsApiFp(this.configuration).getPersonFollowersChangelog(requestParameters.id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
}

/**
* Returns the picture associated with a person. The picture URLs include both 128x128 and 512x512 pixel versions.
* @summary Get picture of a person
* @param {PersonsApiGetPersonPictureRequest} requestParameters Request parameters.

* @throws {RequiredError}
* @memberof PersonsApi
*/
public getPersonPicture(requestParameters: PersonsApiGetPersonPictureRequest, ) {
return PersonsApiFp(this.configuration).getPersonPicture(requestParameters.id, ).then((request) => request(this.axios, this.basePath));
}

/**
* Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company.
* @summary Get all persons
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* tslint:disable */
/* eslint-disable */
/**
* Pipedrive API v2
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/



/**
* Picture URLs indexed by size.
* @export
* @interface GetPersonPictureResponseDataPictures
*/
export interface GetPersonPictureResponseDataPictures {
/**
* The URL of the 128x128 picture.
* @type {string}
*/
'128'?: string;
/**
* The URL of the 512x512 picture.
* @type {string}
*/
'512'?: string;
}

62 changes: 62 additions & 0 deletions src/versions/v2/models/get-person-picture-response-data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/* tslint:disable */
/* eslint-disable */
/**
* Pipedrive API v2
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


// May contain unused imports in some cases
// @ts-ignore
import { GetPersonPictureResponseDataPictures } from './get-person-picture-response-data-pictures';

/**
*
* @export
* @interface GetPersonPictureResponseData
*/
export interface GetPersonPictureResponseData {
/**
* The ID of the picture.
* @type {number}
*/
'id'?: number;
/**
* The type of item the picture is associated with.
* @type {string}
*/
'item_type'?: string;
/**
* The ID of the person this picture belongs to.
* @type {number}
*/
'item_id'?: number;
/**
* The ID of the user who added the picture.
* @type {number}
*/
'added_by_user_id'?: number;
/**
* Whether the picture is active or not.
* @type {boolean}
*/
'active_flag'?: boolean;
/**
* The file size in bytes.
* @type {number}
*/
'file_size'?: number;
/**
*
* @type {GetPersonPictureResponseDataPictures}
*/
'pictures'?: GetPersonPictureResponseDataPictures;
}

37 changes: 37 additions & 0 deletions src/versions/v2/models/get-person-picture-response.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* tslint:disable */
/* eslint-disable */
/**
* Pipedrive API v2
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


// May contain unused imports in some cases
// @ts-ignore
import { GetPersonPictureResponseData } from './get-person-picture-response-data';

/**
*
* @export
* @interface GetPersonPictureResponse
*/
export interface GetPersonPictureResponse {
/**
* If the response is successful or not
* @type {boolean}
*/
'success'?: boolean;
/**
*
* @type {GetPersonPictureResponseData}
*/
'data'?: GetPersonPictureResponseData;
}

Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ export interface GetPipelinesResponseAllOfDataInner {
*/
'order_nr'?: number;
/**
* Whether this pipeline is selected or not
* @type {boolean}
*/
'is_selected'?: boolean;
/**
* Whether this pipeline is marked as deleted or not
* @type {boolean}
*/
Expand Down
3 changes: 3 additions & 0 deletions src/versions/v2/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ export * from './get-person-fields200-response-data-inner-important-fields';
export * from './get-person-fields200-response-data-inner-required-fields';
export * from './get-person-fields200-response-data-inner-ui-visibility';
export * from './get-person-fields200-response-data-inner-ui-visibility-show-in-add-deal-dialog';
export * from './get-person-picture-response';
export * from './get-person-picture-response-data';
export * from './get-person-picture-response-data-pictures';
export * from './get-person-search-response';
export * from './get-person-search-response-all-of';
export * from './get-person-search-response-all-of-data';
Expand Down
5 changes: 0 additions & 5 deletions src/versions/v2/models/upsert-pipeline-response-data-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ export interface UpsertPipelineResponseDataData {
*/
'order_nr'?: number;
/**
* Whether this pipeline is selected or not
* @type {boolean}
*/
'is_selected'?: boolean;
/**
* Whether this pipeline is marked as deleted or not
* @type {boolean}
*/
Expand Down
Loading