When querying the Codat API, there are a number of scenarios in which you may receive a HTTP 404 response.
Resolution
Please follow the below steps to check the API query you are making.
- Verify the URL or endpoint you are attempting to query against our Swagger documentation, to ensure you have copied it correctly.
- If the URL contains a
companyId
and/orconnectionId
, ensure you have inserted the GUIDs correctly, and that theconnectionId
belongs to the company. You can check the Connection IDs for a company at the endpoint documented in Swagger here. - If you are querying a data endpoint for a company, a 404 response may be returned if there is no data available for the datatype in question for a company. This can occur if the company has not yet been linked to any data sources, or if they have no data within the data source to sync (for example, they may have no supplier records in their accounting package). The error message in this case will help you identify the reason behind the 404 response:
{ "statusCode": 404, "service": "PublicApi", "error": "Company 00000000-0000-0000-0000-000000000000 has no data connections yet.", "correlationId": "00000000-0000-0000-0000-000000000000", "canBeRetried": "Unknown", "detailedErrorCode": 0 }
If you are still unable to resolve the issue, and you believe the query should not return an error, please use the 'Submit Request' link in the header to raise a case with our support team.