fecgov / openFEC

The first RESTful API for the Federal Election Commission. We're aiming to make campaign finance more accessible for journalists, academics, developers, and other transparency seekers.
https://api.open.fec.gov/developers
Other
480 stars 106 forks source link

RAD wants disbursement date in schedule E #5902

Open bmathesonFEC opened 1 month ago

bmathesonFEC commented 1 month ago

What we’re after

The Independent Expenditure endpoint is delivering the expenditure date incorrectly. This was discovered by a RAD Analyst using the endpoint for a review program.

The API does not match the committee’s reported data when the committee leaves the expenditure date blank. Instead of leaving the dissemination date null in the data, the API duplicates "dissemination_date" into that field.

Example:

ID: C00685982 Transaction Image: https://docquery.fec.gov/pdf/145/202406279652522145/202406279652522145.pdf

API: https://api.open.fec.gov/v1/schedules/schedule_e/?sort_hide_null=false&api_key=DEMO_KEY&sort_null_only=false&sort_nulls_last=false&min_image_number=202406279652522145&per_page=100&max_image_number=202406279652522148&sort=-expenditure_date&committee_id=C00685982

image

image

Oddly, we were able to find examples when the date IS null when left blank by the committee (Image, API), we also see that the API gets the dates right when the committee fills in both and uses different dates in each field (Image, API).

Completion criteria

cnlucas commented 1 month ago

dissemination_date is always the date of public distribution/dissemination on the form

expenditure_date is the date of disbursement or obligation unless that section is not filled in, then it's backfilled by the date of public distribution/dissemination so that expenditure_date is always populated [coalesce(fe.exp_dt, fe.dissem_dt) as exp_dt]

We can re-visit this decision if there's a specific reason they are looking for null date of obligation/disbursements?

bmathesonFEC commented 1 month ago

@cnlucas correctly pointed out that my original ticket had some errors when I was referencing dissemination vs. expenditure date. I have since updated the ticket.

Regardless, your response makes sense. I'll take this back to the analyst.