diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ba1eab7..408c581c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ 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] +### Fixed +- Removed `person_id` from the v2 activity request body (`POST /api/v2/activities`, `PATCH /api/v2/activities/{id}`) — the API has always rejected it as read-only, and the schema advertised it as writable; use `participants: [{ "person_id": 123, "primary": true }]` instead. `org_id` is unaffected. +- Added `required: [name]` to the v2 person create request body (`POST /api/v2/persons`) — a bare call previously reached the API instead of failing client-side. +- Reworded the `im`, `notes`, `birthday`, and `job_title` field descriptions and the `addPerson`/`updatePerson` operation descriptions (which also cover `postal_address`) to disclose that these fields 403 when contact sync isn't enabled, rather than only describing when they're present on read. ## [33.7.2] - 2026-10-09 ### Changed diff --git a/src/versions/v2/api/persons-api.ts b/src/versions/v2/api/persons-api.ts index f6520679..44d34ce8 100644 --- a/src/versions/v2/api/persons-api.ts +++ b/src/versions/v2/api/persons-api.ts @@ -52,7 +52,7 @@ import { UpsertPersonResponse } from '../models'; export const PersonsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Add a new person * @param {AddPersonRequest} [AddPersonRequest] @@ -614,7 +614,7 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Update a person * @param {number} id The ID of the person * @param {UpdatePersonRequest} [UpdatePersonRequest] @@ -670,7 +670,7 @@ export const PersonsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = PersonsApiAxiosParamCreator(configuration) return { /** - * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Add a new person * @param {AddPersonRequest} [AddPersonRequest] @@ -810,7 +810,7 @@ export const PersonsApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Update a person * @param {number} id The ID of the person * @param {UpdatePersonRequest} [UpdatePersonRequest] @@ -832,7 +832,7 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa const localVarFp = PersonsApiFp(configuration) return { /** - * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Add a new person * @param {PersonsApiAddPersonRequest} requestParameters Request parameters. @@ -932,7 +932,7 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa return localVarFp.searchPersons(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.organization_id, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath)); }, /** - * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Update a person * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters. @@ -1323,7 +1323,7 @@ export interface PersonsApiUpdatePersonRequest { */ export class PersonsApi extends BaseAPI { /** - * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Adds a new person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Add a new person * @param {PersonsApiAddPersonRequest} requestParameters Request parameters. @@ -1443,7 +1443,7 @@ export class PersonsApi extends BaseAPI { } /** - * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync. + * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don\'t exist by default in Pipedrive and are only created when you set up your contact sync — attempting to set any of them without contact sync enabled returns a 403. * @summary Update a person * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters. diff --git a/src/versions/v2/models/add-activity-request.ts b/src/versions/v2/models/add-activity-request.ts index 80a74bf1..76ac0ec0 100644 --- a/src/versions/v2/models/add-activity-request.ts +++ b/src/versions/v2/models/add-activity-request.ts @@ -55,11 +55,6 @@ export interface AddActivityRequest { */ 'lead_id'?: string; /** - * The ID of the person linked to the activity - * @type {number} - */ - 'person_id'?: number; - /** * The ID of the organization linked to the activity * @type {number} */ @@ -100,7 +95,7 @@ export interface AddActivityRequest { */ 'location'?: AddActivityRequestLocation; /** - * The participants of the activity + * The participants of the activity. Use this to set the activity\'s person — a primary participant (`primary: true`) sets `person_id` on the activity. * @type {Array} */ 'participants'?: Array; diff --git a/src/versions/v2/models/add-person-request.ts b/src/versions/v2/models/add-person-request.ts index 4a7afe63..df8f7cd5 100644 --- a/src/versions/v2/models/add-person-request.ts +++ b/src/versions/v2/models/add-person-request.ts @@ -36,7 +36,7 @@ export interface AddPersonRequest { * The name of the person * @type {string} */ - 'name'?: string; + 'name': string; /** * The ID of the user who owns the person * @type {number} @@ -78,22 +78,22 @@ export interface AddPersonRequest { */ 'postal_address'?: PersonItemAddress; /** - * Contact sync notes of the person, maximum 10 000 characters, included if contact sync is enabled for the company + * Contact sync notes of the person, maximum 10 000 characters. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {string} */ 'notes'?: string; /** - * The instant messaging accounts of the person, included if contact sync is enabled for the company + * The instant messaging accounts of the person. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {Array} */ 'im'?: Array; /** - * The birthday of the person, included if contact sync is enabled for the company + * The birthday of the person. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {string} */ 'birthday'?: string; /** - * The job title of the person, included if contact sync is enabled for the company + * The job title of the person. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {string} */ 'job_title'?: string; diff --git a/src/versions/v2/models/update-person-request.ts b/src/versions/v2/models/update-person-request.ts index 80ea5643..24dc17fa 100644 --- a/src/versions/v2/models/update-person-request.ts +++ b/src/versions/v2/models/update-person-request.ts @@ -73,22 +73,22 @@ export interface UpdatePersonRequest { */ 'postal_address'?: PersonItemAddress; /** - * Contact sync notes of the person, maximum 10 000 characters, included if contact sync is enabled for the company + * Contact sync notes of the person, maximum 10 000 characters. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {string} */ 'notes'?: string; /** - * The instant messaging accounts of the person, included if contact sync is enabled for the company + * The instant messaging accounts of the person. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {Array} */ 'im'?: Array; /** - * The birthday of the person, included if contact sync is enabled for the company + * The birthday of the person. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {string} */ 'birthday'?: string; /** - * The job title of the person, included if contact sync is enabled for the company + * The job title of the person. Only accepted when contact sync is enabled for the company; otherwise the request returns 403. * @type {string} */ 'job_title'?: string;