Gifts
The Daffy API let's you create and list your Daffy Gifts (opens in a new tab)
Get Gifts
Resource
GET /v1/gifts
Sample Response
{
"meta": {
"count": 9,
"page": 1,
"last": 1
},
"items": [
{
"name": "Nadia",
"amount": 18,
"message": "<3",
"code": "ab51194d-9e21-4304-bb91-61704203b5fe",
"ein": "112013303",
"seen": true,
"status": "accepted",
"updated_at": "2022-11-02T16:15:17.827Z",
"created_at": "2022-11-01T14:49:55.738Z",
"claimed": true,
"url": "https://www.daffy.org/pablo/gift/ab51194d-9e21-4304-bb91-61704203b5fe"
},
...
]
}
Response Reference
Domain objects live under the items
key, see pagination for more details.
Name | Type | Description |
---|---|---|
name | string | Name of the beneficiary of the gift |
amount | number | Amount of the gift |
message | string | Message associated with the gift |
code | string | Unique identifier (UUID) for the gift |
ein | string | Non-Profit EIN code associated with this gift |
seen | boolean | Whether this gift was seen or not |
status | string | Status of the gift, can be: new , accepted , denied , or claimed |
updated_at | date | When this gift changed its state |
created_at | date | When this gift was created |
claimed | boolean | Whether this gift was claimed or not |
url | string | URL of this gift, for sharing |
Sample Request
curl "https://public.daffy.org/v1/gifts" -H 'X-Api-Key: <YOUR KEY HERE>'
Get Gift by code
Resource
GET /v1/gifts/:code
Path Params
Name | Type | Description |
---|---|---|
:code | uuid | The gift code |
Sample Response
{
"name": "Nadia",
"amount": 18,
"message": "<3",
"code": "ab51194d-9e21-4304-bb91-61704203b5fe",
"ein": "112013303",
"seen": true,
"status": "accepted",
"updated_at": "2022-11-02T16:15:17.827Z",
"created_at": "2022-11-01T14:49:55.738Z",
"claimed": true,
"url": "https://www.daffy.org/pablo/gift/ab51194d-9e21-4304-bb91-61704203b5fe"
}
Response Reference
Name | Type | Description |
---|---|---|
name | string | Name of the beneficiary of the gift |
amount | number | Amount of the gift |
message | string | Message associated with the gift |
code | string | Unique identifier (UUID) for the gift |
ein | string | Non-Profit EIN code associated with this gift |
seen | boolean | Whether this gift was seen or not |
status | string | Status of the gift, can be: new , accepted , denied , or claimed |
updated_at | date | When this gift changed its state |
created_at | date | When this gift was created |
claimed | boolean | Whether this gift was claimed or not |
url | string | URL of this gift, for sharing |
Sample Request
curl "https://public.daffy.org/v1/gifts/ab51194d-9e21-4304-bb91-61704203b5fe" -H 'X-Api-Key: <YOUR KEY HERE>'
Create Gift
Resource
POST /v1/gifts
Body Params
{
"name": "Jane Doe",
"amount": 25
}
Name | Type | Description |
---|---|---|
name | string | Name of the beneficiary of this gift |
amount | number | Gift amount, can't be lower than 18 |
Sample Response
{
"name": "Jane Doe",
"amount": 25,
"message": null,
"code": "ab51194d-9e21-4304-bb91-61704203b5fe",
"ein": null,
"seen": false,
"status": "new",
"updated_at": "2022-11-02T16:15:17.827Z",
"created_at": "2022-11-02T16:15:17.827Z",
"claimed": false,
"url": "https://www.daffy.org/pablo/gift/ab51194d-9e21-4304-bb91-61704203b5fe"
}
Response Reference
Name | Type | Description |
---|---|---|
name | string | Name of the beneficiary of the gift |
amount | number | Amount of the gift |
message | string | Message associated with the gift |
code | string | Unique identifier (UUID) for the gift |
ein | string | Non-Profit EIN code associated with this gift |
seen | boolean | Whether this gift was seen or not |
status | string | Status of the gift, can be: new , accepted , denied , or claimed |
updated_at | string | When this gift changed its state |
created_at | string | When this gift was created |
claimed | boolean | Whether this gift was claimed or not |
url | string | URL of this gift, for sharing |
Sample Request
curl "https://public.daffy.org/v1/gifts" -H 'X-Api-Key: <YOUR KEY HERE>' -H 'Content-Type: application/json' -X POST -d '{"name": "Jane Doe", "amount": 25}'