API Reference
Gifts

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.

NameTypeDescription
namestringName of the beneficiary of the gift
amountnumberAmount of the gift
messagestringMessage associated with the gift
codestringUnique identifier (UUID) for the gift
einstringNon-Profit EIN code associated with this gift
seenbooleanWhether this gift was seen or not
statusstringStatus of the gift, can be: new, accepted, denied, or claimed
updated_atdateWhen this gift changed its state
created_atdateWhen this gift was created
claimedbooleanWhether this gift was claimed or not
urlstringURL 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

NameTypeDescription
:codeuuidThe 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

NameTypeDescription
namestringName of the beneficiary of the gift
amountnumberAmount of the gift
messagestringMessage associated with the gift
codestringUnique identifier (UUID) for the gift
einstringNon-Profit EIN code associated with this gift
seenbooleanWhether this gift was seen or not
statusstringStatus of the gift, can be: new, accepted, denied, or claimed
updated_atdateWhen this gift changed its state
created_atdateWhen this gift was created
claimedbooleanWhether this gift was claimed or not
urlstringURL 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
}
NameTypeDescription
namestringName of the beneficiary of this gift
amountnumberGift 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

NameTypeDescription
namestringName of the beneficiary of the gift
amountnumberAmount of the gift
messagestringMessage associated with the gift
codestringUnique identifier (UUID) for the gift
einstringNon-Profit EIN code associated with this gift
seenbooleanWhether this gift was seen or not
statusstringStatus of the gift, can be: new, accepted, denied, or claimed
updated_atstringWhen this gift changed its state
created_atstringWhen this gift was created
claimedbooleanWhether this gift was claimed or not
urlstringURL 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}'