Skip to main content

Overview

If you believe an enrichment response may be inaccurate, you can submit a report using the /transactions/report endpoint. Our team will review your report and determine whether a correction is needed. If a correction is made, we’ll send the returned enrichment data to your callback URL so you can update your records automatically.

Prerequisites

Before submitting error reports, you’ll need:
  1. A callback URL — Provide an HTTPS endpoint to your Spade representative where we can deliver returned enrichments. Contact support@spade.com to configure this.
  2. A callback token — Your Spade representative will provide you with a token to validate that incoming callbacks are from Spade. Store this token securely on your server.
  3. An enrichment ID — The enrichmentId from the enrichment response you want to report.
Your callback token is a shared secret between your system and Spade. Do not expose it in client-side code, public repositories, or logs. Store it in a secure secrets manager with restricted access.

Submitting an error report

Send a POST request to the /transactions/report endpoint with the enrichmentId of the enrichment you want to report and a description of what you believe may be inaccurate.

Request fields

Setting the optional boolean fields and providing detailed descriptions helps our team investigate your report more efficiently. Be as specific as possible in your descriptions.

Example request

Example response

A successful report returns an HTTP 200 response:
If validation fails, you’ll receive an HTTP 400 with details about which fields are invalid:

Receiving returned enrichments

If our team determines that a correction is warranted after reviewing your report, we’ll send the returned enrichment data to the callback URL you configured with your Spade representative.

Callback format

The callback is a POST request to your callback URL containing the returned enrichment response in the same format as the original card enrichment response. The request includes an X-Webhook-Token header that you should validate against the callback token provided by your Spade representative.

Validating the callback

You must verify the X-Webhook-Token header matches the token provided to you by Spade before processing the returned enrichment. This ensures the callback is genuinely from Spade and has not been tampered with.
Always validate the X-Webhook-Token before processing any callback data. Reject requests with missing or mismatched tokens.

Example callback handler

The Python example above uses Flask for illustrative purposes only. You can implement your callback handler using any web framework or language that can receive HTTP POST requests.
The returned enrichment callback body uses the same schema as the card enrichment response. Refer to the API reference for the full response object documentation.

Workflow summary

  1. You enrich a transaction and receive a response with an enrichmentId
  2. You believe the enrichment may be inaccurate and submit a report to /transactions/report
  3. Spade’s team reviews the report and determines whether a correction is needed
  4. If a correction is made, Spade sends the returned enrichment to your callback URL with the X-Webhook-Token header
  5. Your server validates the token and updates your records

Error handling

For questions about error reporting or to set up your callback URL, contact support@spade.com.