View Categories

Unique IDs

< 1 min read

Upbooks™ API – Unique IDs and Entity Retrieval #

MongoDB ObjectId Overview #

Upbooks™ uses MongoDB’s unique ObjectId to identify entities or objects within the system. ObjectId is a 12-byte identifier typically employed as the unique identifier for documents within a collection. It consists of a timestamp, machine identifier, process identifier, and a counter.

Fetching Details of a Single Client #

To retrieve details of a specific client, use the following API endpoint:

GET https://api.upbooks.io/api/v1/client/{id}

Replace {id} with the ObjectId of the client you wish to retrieve.

Sample cURL Request #

Here’s an example of how to fetch details of a single client using cURL:

curl -X GET https://api.upbooks.io/api/v1/client/5f4e792263a64c0021e536fb -H "Authorization: Bearer YOUR_JWT_TOKEN" -H "Organization-ID: YOUR_ORGANIZATION_ID" -H "API-KEY: YOUR_API_KEY"

Replace 5f4e792263a64c0021e536fb with the actual ObjectId of the client.

Notes on ObjectId #

Ensure that the ObjectId provided is valid and corresponds to an existing entity in the Upbooks™ system. Invalid or non-existent ObjectIds will result in a not found response.