Skip to content
Aller au contenu
Charitips

API reference · Donors

Create a donor

POST/v1/donors

Create an account level donor.

Requires a Bearer access token.

Body

CreateDonorDto

1 of 21 fields has no description in the spec.

  • street#string

    Address line 1

  • streetAddition#string

    Address line 2

  • city#string

    City

  • country#string

    Country alpha 2 ISO code

  • zip#string

    Zip code

  • firstName#stringrequired

    Donor's first name

  • lastName#stringrequired

    Donor's last name

  • email#stringrequiredemail 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

  • extraInfo#string

    Additional information about the donor.

  • 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

  • slackId#string

    Donor's slack id. Required for SLACK campaigns.

  • accountId#stringUUID

    Only required to link the created entity to a child account instead of the current one.

  • hasAcceptedTerms#boolean

    Whether the donor has accepted the terms and conditions

Response

201 · 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

  • 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"
    }
POST /v1/donors
curl -X POST https://api.sandbox.charitips.com/v1/donors \  -H "Authorization: Bearer $CHARITIPS_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "firstName": "<firstName>",    "lastName": "<lastName>",    "email": "donor@example.com"  }'
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.