Bug in GiftAid API

I am reporting this bug here in the hope that Blackbaud are monitoring it as my life is too short to wait for chat and try and explain it to them :)

When I call the following endpoint:

https://api.sky.blackbaud.com/gar-gfacr/v1/taxdeclarations/constituents/16

I get the response back:
{    "tax_declarations": [],    "count": 1,    "offset": 0,    "limit": 0}

The default limit according to the documentation is 500.
In order to actually get anything back, I have to specify the limit value so that if I do the following:

https://api.sky.blackbaud.com/gar-gfacr/v1/taxdeclarations/constituents/16?limit=500

I get:

{    "tax_declarations": [        {            "declaration_id": "12",            "sequence": 1,            "constituent_id": "16",            "constituent_pays_tax": "Yes",            "declaration_made_date": "2023-11-24",            "tax_notes": "Test",            "declaration_start_date": "2023-11-24",            "declaration_indicator": 305,            "scanned_docs_exist": false,            "declaration_indicator_text": "Written"        }    ],    "count": 1,    "offset": 0,    "limit": 0}

(it messed my formatting up but hopefully you get the idea).

Hope that this helps somebody -alternatively I hope Blackbaud see it and fix it. Please feel free to reach out to me for more info or to tell me that you have fixed it!

Answers

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

    Hi @David Zeidman . I'm taking a look.

    The community should manage posting of code better. Once pasted, you should be able to highlight the code, right click and get access to the code editor {..} icon:

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

    I tested in the Try It console against the Sky Developer Cohort (UK) and confirm the same results. The default limit is 0, not the documented 500.

    I know bug reporting can be a challenge but please open a case, reference this community post and then post the case number and I can follow up.

    Be sure to share the URL to the endpoint documentation: Get tax declarations for constituents

  • I have created a case: 020797619

    Thanks for your response Erik.

    David

  • David Zeidman
    edited March 20

    I found another bug…

    I am trying to patch a declaration. I used the following:
    https://api.sky.blackbaud.com/gar-gfacr/v1/taxdeclarations/13

    {
    "tax_notes": "Update notes",
    "declaration_start_date": "2019-11-24",
    "declaration_made_date": "2023-11-24",
    }

    The two date fields are required and I am updating the tax_notes field. However, on doing that I get back the error:

    {
    "title": "InvalidValue",
    "status": 400,
    "detail": "This Field is required",
    "error_name": "InvalidValue",
    "message": "This Field is required",
    "error_code": 20
    }

    Apart from not telling me which field is required, it is clearly wrong because the two fields that the documentation say are required are present. However, if I add the declaration_indicator field it works (even though it does not need to be there according to the documentation) so by doing the following:

    {
    "tax_notes": "Update notes",
    "declaration_start_date": "2019-11-24",
    "declaration_made_date": "2023-11-24",
    "declaration_indicator": {
    "table_entries_id": 305
    }
    }

    I am able to successfully patch the declaration

    In my opinion, this is not a good design. A patch only updates existing records. An existing record cannot, by definition, exist without the required fields already present so there should never normally need to be any required fields in a patch. I understand that those fields may not have been required in the database view so that is why they need to be required now. (I am not certain that they were not required but that could be one reason I suppose)

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

    Hi @David Zeidman Same routine. Get this submitted & I'll follow up. We've triaged the first issue you noted in the thread & working on scheduling release.

  • Thanks Erik,

    I added it to the same case when I found it so I am on top of it. Thanks

Categories