API Usage

Core patterns for working with the Upbooks API.

API Usage

API Responses

Upbooks™ API – API Responses

Upbooks™ API responses follow a structured format.

Error Response

interface ErrorResponse {
  code: string | number;
  message: string;
}

Example:

{"code": "404", "message": "Client not found"}

Success Response – Single Item

interface SuccessResponseWrapped<T> {
  data: T;
  message?: string;
}

Example:

{
  "data": { "clientId": "123", "name": "Example Client" },
  "message": "Client retrieved successfully"
}

Success Response – List

interface SuccessListingResponseWrapped<T> {
  data: T[];
  totalCount?: number;
  filteredCount?: number;
  message?: string;
}

Example:

{
  "data": [
    { "clientId": "123", "name": "Client 1" },
    { "clientId": "456", "name": "Client 2" }
  ],
  "totalCount": 2,
  "filteredCount": 2,
  "message": "Clients retrieved successfully"
}

Example: Client Add API

{
  "data": { "clientId": "789", "name": "New Client" },
  "message": "Client added successfully"
}

Example: Client Get Single API

{
  "data": { "clientId": "789", "name": "New Client" },
  "message": "Client retrieved successfully"
}

Developer Tools

We provides essential resources like Postman collections and comprehensive API documentation to aid developers in testing, integration, and troubleshooting.