Issue with creating FuzzyDate Custom Field in GiftBatch API

I'm calling the GiftBatch API to create a gift inside a batch:

POST https://api.sky.blackbaud.com/gift/v1/giftbatches/{batch_id}/gifts

As part of the request, I'm also sending custom fields. Everything works except when I try to send a Custom Field with data type FuzzyDate.

What I tried

  1. Simple string value
    "custom_fields": [
    {
    "category": "DM FuzzyDate",
    "value": "2025-08-29"
    }
    ]

This creates the field, but the system only shows month/year. The day is not shown.
If I change the date format, I get this error:

The provided fuzzy date value is not valid.

Sometimes the system even stores the value as "Invalid value/Invalid value".

  1. Using fuzzydate_value (from KB articles)
    "custom_fields": [
    {
    "category": "DM FuzzyDate",
    "fuzzydate_value": {
    "d": 29,
    "m": 8,
    "y": 2025
    }
    }
    ]

This fails with the same validation error.

  1. Using type with value object
    "custom_fields": [
    {
    "category": "DM FuzzyDate",
    "type": "FuzzyDate",
    "value": {
    "d": 29,
    "m": 8,
    "y": 2025
    }
    }
    ]

Also results in:

The provided fuzzy date value is not valid.

I also tried different sequences and formats, but nothing works.

Additional Information

The exact same string-based JSON works when creating a normal Gift (outside of GiftBatch).

The issue happens only inside GiftBatch.

All other custom field types work fine in GiftBatch.

Question

Has anyone successfully sent a FuzzyDate custom field when creating a gift inside a GiftBatch?
If yes, what JSON format or field structure does the API expect?

Any working example would be greatly appreciated.

Best Answer

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary Kudos 5 Facilitator 3 Raiser's Edge NXT Fall 2025 Product Update Briefing Badge
    Answer ✓

    Fuzzy date works very differently then real date that has all of month, day, year component. Here's what works (I tried it and it works adding into a batch).

            "custom_fields": [{
    "category": "Test Fuzzy",
    "value": "202507"
    }]
    image.png
            "custom_fields": [{
    "category": "Test Fuzzy",
    "value": "20251111"
    }]
    image.png

    Here's an KB that tells you what you can do with Fuzzy Date (but do not use its example as API does not intake the slash, this format is derived from what I know about how RE store fuzzy date in the SQL database table using 8 characters of digits)

    • month, day, and year (20241231)
    • month and year (202507)
    • year only (2025)
    • month and date (1116) - THIS ONE I AM NOT SURE, I tested it and it did not work.

    @Ben Wong @Erik Leaver maybe you can help clarify the format need to be used for month and date for Fuzzy Date, also, can you point to any documentation on the API that has more details on how fuzzy date needs to be passed in. If not exist, may want to add it to the reference doc for API endpoint so it is easily for others to work this out.

Answers

  • Tagging in All-Star @Alex Wong to see if he has any insight!

  • @Devang Punjani - I'm going to take a shot at this. It wants the date to be in ISO-8601 format and I think you need the time stamp also. I would try this format and see what happens: "2025-08-29T00:00:00Z"

    I have added a constituent custom field with a date and I had to format like this and it would load today's date correctly. formatDateTime(utcNow(), 'MM/dd/yyyy') You could also try to format the gift date field plugging it into utcNow() spot.

    Good luck,

    Carol

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary Kudos 5 Facilitator 3 Raiser's Edge NXT Fall 2025 Product Update Briefing Badge

    I was able to search and found this, which explains that month and date is additionally supported by birthday field, which sort of means it is not supported otherwise. That would make sense why my test for 1116 (Nov 16) does not work.

  • Erik Leaver
    Erik Leaver Blackbaud Employee
    Tenth Anniversary Kudos 5 First Reply Name Dropper

    @Alex Wong - From the documentation, it looks like date on a custom field is different than the Fuzzy Date on a gift added to batch.

    CustomFieldAdd
    date | Not Required | Type string (date-time)
    The date on the custom field. Uses ISO-8601 format:1969-11-21T10:29:43.

    I'm intrigued that your date format worked. I would have expected an error.

    @Devang Punjani try your very first example again but use the ISO-8601 format & let us know if that works.

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary Kudos 5 Facilitator 3 Raiser's Edge NXT Fall 2025 Product Update Briefing Badge

    @Erik Leaver we are not talking about the date property of a custom field. OP is talking about a Fuzzy Date custom field where the data type is a Fuzzy Date. Meaning it is the value property of the custom field.

    image.png
  • Thank you, @Alex Wong. The below JSON snippet you provided is working correctly. I have thoroughly tested it on my end and I am able to successfully insert the fuzzy date value into the Custom Field in the Gift Batch.

    image.png

    I would also like to extend my thanks to @Crystal Bruce, @Carol Grant & @Erik Leaver for your prompt responses and valuable support.

  • Erik Leaver
    Erik Leaver Blackbaud Employee
    Tenth Anniversary Kudos 5 First Reply Name Dropper

    @Devang Punjani I appreciate Alex's support here. As this solution doesn't fit our typical pattern for fuzzy dates I've asked our engineering teams to review the pattern. It's possible this will lead to a change in the future. Any changes will be announced in advance as they would be breaking at this point.