Skip to main content
POST
Add a new donation

Authorizations

X-HYS-API-Key
string
header
required

Gratona API key sent with the compatibility header X-HYS-API-Key.

Body

application/json

Donation data

designation

One designation reference, or an array aligned with split_amounts. Any array-shaped value is validated as a split request, including a one-item array.

Example:

"entity-1"

donor_id
string
Example:

"1"

amount
number
Example:

10

split_amounts
number[]

Positive allocation amounts that match designation cardinality and equal amount in integer cents. A valid one-item split is persisted as a normal single donation.

Example:
dont_notify
integer
Example:

1

charge_donor
integer
Example:

1

method
string
Example:

"3"

result
string | null

Optional donation note. Null or omitted values are persisted as an empty string.

Example:

"result note"

client_id
string
Example:

"1"

created_at
string
Example:

"2022-01-01"

addSoftCredit
boolean
Example:

true

soft_credit_donor_id
integer
Example:

2

soft_credit_type
integer
Example:

1

soft_credit_amount
number
Example:

5

soft_credit_split_amounts
number[]
Example:

Response

Successful operation

message
string
Example:

"Donation Successful"