CanopyAPI docs

unsupported_version

The Canopy-Version request header names a version Canopy does not serve.

HTTP 400

When you see this

The Canopy-Version header pins a request to a dated API version. Canopy checks it before anything else, so this error appears even if the path or method is also wrong.

  • No header: the request uses the current version. This is not an error. It is the recommended way to call the API.
  • Header names a version Canopy serves: the request uses that version.
  • Header names anything else: the request fails with unsupported_version. Canopy does not quietly fall back to the current version.

What the response looks like

json
{
  "error": {
    "code": "unsupported_version",
    "message": "The requested Canopy-Version is not served.",
    "request_id": "req_1a2b3c4d5e6f7a8b9c0d1e2f",
    "docs": "https://canopypay.io/errors/unsupported_version"
  }
}

What to do

Remove the Canopy-Version header to use the current version. Or pin to a version this API serves.

Every response has a canopy-version response header with the version that was used, including this HTTP 400. Use that header to find the current version. Check a version string against it before you hardcode one.