Skip to main content

Retrieve a Collection

Endpoint

GET https://api.verifik.co/v2/face-recognition/collections/{id}

Fetch a collection using its unique _id. Do not confuse this with the collection code (UUID) used in some other APIs.

Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Params

NameTypeRequiredDescription
idstring (path)YesUnique identifier of the collection (_id in responses)

Request

const fetch = require("node-fetch");

const collectionId = "65b9592267cc4f096dbe743d";

async function run() {
const res = await fetch(
`https://api.verifik.co/v2/face-recognition/collections/${collectionId}`,
{
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
}
);
console.log(await res.json());
}

run();

Response

{
"data": {
"_id": "65b9592267cc4f096dbe743d",
"deleted": false,
"name": "Ejemplo Ene 30",
"project": "65b955fe0577440932c77481",
"description": "default collection for project 65b955fe0577440932c77481",
"client": "6158e492dd0767a2b8b3f829",
"code": "d96db430-27d2-4f43-bcff-c4b239ac6d2e",
"updatedAt": "2024-01-30T20:16:34.841Z",
"createdAt": "2024-01-30T20:16:34.841Z",
"__v": 0
}
}

Notes

  • id vs code: This route uses the _id from the collection document, not the code field.
  • Single object: The response wraps one collection in data.