Skip to content
Aller au contenu
Charitips

API reference · Donations

Validate a donation

POST/v1/donations/{donationId}/validate

Validate a donation for withDonationsValidation campaign. Will set the donation status to DONE

Requires a Bearer access token.

Parameters

This field has no description in the spec.

  • donationId#stringin pathrequired

Body

ValidateDonationDto
  • amount#integer (int64)minimum 1

    Donation amount in minor currency unit i.e cents.

Response

200 · Donation

No field is described in the spec.

  • donationId#stringalways returned

  • amount#integer (int64)

  • externalId#string

  • uniqueExternalId#string

  • status#DonationStatusalways returned

    PENDINGDONEPROCESSEDCANCELED

  • secret#stringalways returned

  • withFiscalReceipt#booleanalways returned

  • hasBeenCharged#booleanalways returned

  • claimedAt#string (date-time)

  • validatedAt#string (date-time)

  • processedAt#string (date-time)

  • billingStatus#BillingStatusalways returned

    PENDINGBILLEDPAID

  • hideAmount#booleanalways returned

  • billedOn#DonationBilledOnalways returned

    CREATIONCLAIM

  • autoAssigned#boolean

  • expiryDate#string (date-time)

  • sendingMode#CampaignSendingModealways returned

    MANUALEMAILPHYSICALSLACKPOSTAL

  • sendingDate#string (date-time)

  • sendingStatus#DonationSendingStatusalways returned

    PENDINGFAILEDDONE

  • externalSendingId#string

  • lastReminderId#string

  • message#string

  • reminderMessage#string

  • from#string

  • language#Languagealways returned

    fren

  • sharedOn#SocialNetwork

    LINKEDININSTAGRAMFACEBOOKTWITTERWHATSAPP

  • ptoType#PaidTimeOffTypealways returned

    NONEPAID_TIME_OFFWORKING_TIME_REDUCTION

  • accountId#stringalways returned

  • campaignId#stringalways returned

  • charityId#string

  • recurringDonationId#string

  • transactionId#string

  • donorId#string

  • orderPlatformUserId#string

  • usageId#string

  • parentDonationId#string

  • parentVoteId#string

  • parentRecurringDonationId#string

  • createdAt#string (date-time)always returned

  • updatedAt#string (date-time)always returned

Errors

  • 400Donation not claimed yet
    {
      "statusCode": 400,
      "message": "Donation not claimed yet",
      "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"
    }
  • 403Forbidden
    {
      "statusCode": 403,
      "message": "Forbidden"
    }
  • 403Account closed
    {
      "message": "Account closed",
      "code": "ACCOUNT_CLOSED"
    }
  • 404Not Found

    No resource with this id on your account: the API answers as if it did not exist.

    {
      "statusCode": 404,
      "message": "Not Found"
    }
  • 409Donation already validated
    {
      "statusCode": 409,
      "message": "Donation already validated",
      "error": "Conflict"
    }
POST /v1/donations/<donationId>/validate
curl -X POST https://api.sandbox.charitips.com/v1/donations/<donationId>/validate \  -H "Authorization: Bearer $CHARITIPS_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "amount": 2000  }'
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.