Documentation menu
Docs / Reference / Pro: estimated contract value for 1..N tenders (by GSIN or record id)

Pro: estimated contract value for 1..N tenders (by GSIN or record id)

POST/tender/estimate

Estimated contract value for tenders, which almost never publish one. Send up to 100 per call, as tender record ids from /tender or as GSIN codes. Each result has a low, typical range, median and high in dollars, drawn from disclosed contracts with the same GSIN, with the sample size and a confidence. Paid plans only; a free key gets 403.

Request body

FieldTypeDescription
record_idsarray of stringTender record ids, as /tender returns them.
gsinsarray of stringGSIN codes, e.g. N7010, for a tender not in /tender.

Request

curl --request POST \
  --url 'https://api.procuredata.ca/tender/estimate' \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"record_ids": ["SSC-26-00035065:T:000"]}'
import requests

url = "https://api.procuredata.ca/tender/estimate"
headers = {"X-API-Key": "YOUR_API_KEY"}
body = {
  "record_ids": [
    "SSC-26-00035065:T:000"
  ]
}
resp = requests.post(url, headers=headers, json=body)
print(resp.json())
const res = await fetch("https://api.procuredata.ca/tender/estimate", {
  method: "POST",
  headers: {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "record_ids": [
    "SSC-26-00035065:T:000"
  ]
}),
});
console.log(await res.json());

Example response

{
  "results": [
    {
      "record_id": "SSC-26-00035065:T:000",
      "gsin": "*N7010",
      "procurement_category": "GD",
      "estimate": {
        "low": 3011,
        "typical_low": 16714,
        "median": 69728,
        "typical_high": 317789,
        "high": 1080855,
        "n": 892,
        "confidence": "low",
        "basis": "892 disclosed contracts with GSIN *N7010"
      }
    }
  ],
  "count": 1
}

Errors

Every error returns {"detail": "…"}, a sentence naming what was wrong and, where there is one, the fix, plus docs and, when they apply, did_you_mean (the nearest valid value) and valid (the accepted values).

StatusWhen
400The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.
403Missing or invalid API key; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.
404No such endpoint, or no record with that id.
422A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.
429Rate limit or plan quota exceeded.
500Unexpected server error.
504The query took too long. Narrow it with a municipality or a date range.
Ready to build?Create a free key and start calling ProcureData in minutes. No card required.
Get your API key →