Persons

Perform batch operations on a person's fields

Changed on
⚠️ This endpoint is currently in BETA

Perform batch operations on a person's fields.

Currently the only operation at the endpoint is update-fields, which allows you to update multiple field values with a single request. This is equivalent to calling the single field update endpoint multiple times. You can update up to 100 fields per request.

patch/v2/persons/{personId}/fields

Request

  • Base URL
    https://api.affinity.co
  • URL
    https://api.affinity.co/v2/persons/{personId}/fields
  • Auth
    HTTP bearer

Path parameters

personIdinteger required

Person ID

Request body

operation'update-fields' required

Example request

{
  "updates": [
    {
      "id": "affinity-data-location",
      "value": {
        "type": "company-multi",
        "data": [
          {
            "id": 1
          },
          {
            "id": 2
          }
        ]
      }
    }
  ]
}

Response

OK

operation'update-fields'

The set of supported batch operation types for persons.

Changes

    • info

      added update-fields mapping keys to the request discriminator

    • info

      added company-multi company datetime dropdown dropdown-multi number number-multi location location-multi person person-multi ranked-dropdown filterable-text filterable-text-multi text discriminator mapping keys to the /// request property

    • info

      added authentication authorization bad-request conflict method-not-allowed not-acceptable not-found not-implemented rate-limit server timeout unprocessable-entity unsupported-media-type validation discriminator mapping keys to the / response property for the response status

    • info

      added bad-request validation discriminator mapping keys to the / response property for the response status