fonciqAPI
EnRegistry

Batches (bulk index search)

Up to 500 lots per request, as JSON or CSV. Each index is CAD 0.99 excluding Registre fees. Results as JSON or CSV.

Ouvrir

POST /v1/batches (scope batches:write) takes a JSON array or a CSV. The limit is 500 lots per request. The Idempotency-Key header is required and kept for 24 hours. The result CSV, one row per index row, is a separate route: GET /v1/jobs/{id}/results?format=csv.

Body

JSON:

{
  "lots": ["1234567", "7654321"],
  "documents": ["index"]
}

CSV (text/csv), with a lot or matricule column:

lot
1234567
7654321

On a live key, an index costs CAD 0.99 per lot excluding Registre fees, and always consults the Registre (CAD 1.50 per index, charged to the account holder). One consulted index therefore costs CAD 2.49. There is no volume discount.

Accounts

Without account_id, the batch is spread across the organisation's active Registre accounts. Each pending lot goes to the account with the most room under its daily cap. Each account keeps its 540 indexes per day. With account_id (JSON body), every lot in the batch stays on that account. A CSV body is always spread.

A batch of 500 counts as a single request against the key's 60 requests per minute.

curl -X POST https://api.fonciq.ca/v1/batches \
  -H "Authorization: Bearer $FONCIQ_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 8c2a1d4e-1b6f-4a90-9e3c-2f5d7a8b9c01" \
  -d '{"lots":["1234567","7654321"],"documents":["index"]}'

More than 500 lots is a 409 with batch_too_large. The response is 202 with a job_id.

Result as CSV

lot,matricule,inscription,date,nature,parties,document_url,read_method,confidence,needs_review,page_status
1234567,,"21 014 436",2024-03-12,Vente,"Vendeur: EXEMPLE, MARIE",https://api.fonciq.ca/v1/documents/42,,unscored,,

Python and Node

import os, uuid, requests

response = requests.post(
    "https://api.fonciq.ca/v1/batches",
    headers={
        "Authorization": f"Bearer {os.environ['FONCIQ_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={"lots": ["1234567", "7654321"], "documents": ["index"]},
)
print(response.json()["job_id"])
const response = await fetch('https://api.fonciq.ca/v1/batches', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.FONCIQ_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify({ lots: ['1234567', '7654321'], documents: ['index'] }),
});
console.log((await response.json()).job_id);

The guide Bulk index search from a CSV file covers sending a CSV file, following the batch and fetching the result.

Sur cette page