Hi folks. Thanks for maintaining Checkbook, an invaluable resource for the city's good government community.
I am writing to report a persistent issue with the Checkbook NYC Contracts API endpoint (
https://www.checkbooknyc.com/api).
When attempting to retrieve contract data (where type_of_data is set to Contracts), the API consistently returns a 1000 error code indicating that the status and category parameters are missing, even when these parameters are explicitly included in the XML request payload.
Steps to Reproduce:
Send a POST request to
https://www.checkbooknyc.com/api (Content-Type: application/xml).
Use a valid XML payload that includes the required status and category parameters.
Example Failed Request (Payload):
<request>
<type_of_data>Contracts</type_of_data>
<records_from>1</records_from>
<max_records>1</max_records>
<search_criteria>
<status>Active</status>
<category>Expense</category>
</search_criteria>
</request>
Alternative Attempt (Parameters at Root):
<request>
<type_of_data>Contracts</type_of_data>
<records_from>1</records_from>
<max_records>1</max_records>
<status>Active</status>
<category>Expense</category>
</request>
Observed Result:
The API responds with the following error:
<response>
<status>
<result>failure</result>
<messages>
<message>
<code>1000</code>
<description>Required parameter(s) 'status' is not provided.</description>
</message>
<message>
<code>1000</code>
<description>Required parameter(s) 'category' is not provided.</description>
</message>
</messages>
</status>
...
</response>
This issue appears specific to the Contracts endpoint. The Spending endpoint works correctly with a standard XML structure (e.g., <type_of_data>Spending</type_of_data>).
Could you please provide the correct XML schema for querying the Contracts API, or investigate if there is an issue with the endpoint's parameter validation logic?
Thanks!