Skip to content
Aller au contenu
Charitips

API reference · Donors

Update a donor

PATCH/v1/donors/{donorId}

Update a donor.

Requires a Bearer access token.

Parameters

This field has no description in the spec.

  • donorId#stringin pathrequired

Body

UpdateDonorDto

1 of 17 fields has no description in the spec.

  • street#string

    Address line 1

  • city#string

    City

  • country#string

    Country alpha 2 ISO code

  • zip#string

    Zip code

  • firstName#string

    Donor's first name

  • lastName#string

    Donor's last name

  • email#stringemail address

    Donor's email.

  • companyName#string

    Donor's company name.

  • phone#string

    Donor's phone number.

  • birthdate#string (date)

  • pictureUrl#stringURL

    Donor's phone number.

  • title#string

    Donor's job title.

  • personalEmail#stringemail address

    Donor's personal email.

  • persona#string

    Persona of the donor.

    CSRMARKETINGHRSALESCOMMUNICATIONPRODUCTSMBOTHER

  • externalId#string

    Optional id to link this donor to an entity on your side.

  • uniqueExternalId#string

    Similar to externalId but should be unique across all donors. Can be used to prevent duplicate donors

  • hasAcceptedTerms#boolean

    Whether the donor has accepted the terms and conditions

Response

200 · Donor

No field is described in the spec.

  • donorId#stringalways returned

  • scopeType#DonorScopeTypealways returned

    CAMPAIGNACCOUNT

  • platformAccessStatus#DonorPlatformAccessStatusalways returned

    ENABLEDDISABLEDRESTRICTED

  • firstName#stringalways returned

  • lastName#stringalways returned

  • email#string

  • companyName#string

  • phone#string

  • extraInfo#string

  • birthdate#string (date-time)

  • street#string

  • streetAddition#string

  • city#string

  • country#string

  • zip#string

  • externalId#string

  • uniqueExternalId#string

  • slackId#string

  • pictureUrl#string

  • title#string

  • personalEmail#string

  • persona#Persona

    CSRMARKETINGHRSALESCOMMUNICATIONPRODUCTSMBOTHER

  • language#Language

    fren

  • hasAcceptedTerms#booleanalways returned

  • accountId#stringalways returned

  • campaignId#string

  • individualAccountId#string

  • createdAt#string (date-time)always returned

  • updatedAt#string (date-time)always returned

Errors

  • 400Invalid fields: <join(', ')>
    {
      "statusCode": 400,
      "message": "Invalid fields: <join(', ')>",
      "error": "Bad Request"
    }
  • 400A field is missing, has the wrong type, or is not part of the request schema.

    Every request with a body or query is validated.

    {
      "statusCode": 400,
      "message": [
        "amount must not be less than 1",
        "property foo should not exist"
      ],
      "error": "Bad Request"
    }
  • 401Unauthorized

    Missing, expired or invalid access token.

    {
      "statusCode": 401,
      "message": "Unauthorized"
    }
  • 403Account closed
    {
      "message": "Account closed",
      "code": "ACCOUNT_CLOSED"
    }
  • 409Unique constraint failed on uniqueExternalId

    {
      "statusCode": 409,
      "message": "Unique constraint failed on uniqueExternalId"
    }
PATCH /v1/donors/<donorId>
curl -X PATCH https://api.sandbox.charitips.com/v1/donors/<donorId> \  -H "Authorization: Bearer $CHARITIPS_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "street": "<street>",    "city": "<city>"  }'
Built from the spec and the API code

Request bodies are written for this docs and checked against the API's validation; ids in angle brackets are placeholders. Response values are placeholders built from the schema.