Tools
The API publishes its OpenAPI 3.1 description at https://agent-dev.azizdubai.com/openapi.yaml. It is the same file this site’s API Reference is built from, so every tool below sees exactly the documented operations, parameters and schemas.
Postman
Section titled “Postman”-
In Postman, select Import, paste
https://agent-dev.azizdubai.com/openapi.yamland import it as a Postman Collection. -
Open the new Aziz Catalogue API collection and go to the Variables tab. Add
apiKeywith your key as the current value. Check thatbaseUrlishttps://agent-dev.azizdubai.com. -
Go to the Authorization tab of the collection and set:
- Auth Type: API Key
- Key:
X-API-Key - Value:
{{apiKey}} - Add to: Header
-
Make sure the requests use Inherit auth from parent, then send Verify the API key (
GET /whoIAm).
Postman does not send an Origin header, so use a key without a domain list, or add Origin: https://your-domain to the collection headers. Re-import the collection when the changelog announces a new API version.
TypeScript types
Section titled “TypeScript types”Generate types for every path and schema with openapi-typescript:
npx openapi-typescript https://agent-dev.azizdubai.com/openapi.yaml -o aziz-api.d.tsThe file exports paths (parameters and responses per operation) and components (named schemas). Use them to type a small fetch wrapper:
import type { components, paths } from './aziz-api';
type Schemas = components['schemas'];type ProjectsQuery = NonNullable<paths['/projects']['get']['parameters']['query']>;type ApplicationRequest = Schemas['ApplicationRequest'];
const AZIZ_API_BASE = 'https://agent-dev.azizdubai.com';const AZIZ_API_KEY = import.meta.env.VITE_AZIZ_API_KEY as string;
async function azizFetch<T>(path: string, query: Record<string, unknown> = {}, init: RequestInit = {}): Promise<T> { const url = new URL(path, AZIZ_API_BASE); for (const [name, value] of Object.entries(query)) { if (value !== undefined && value !== null && value !== '') url.searchParams.set(name, String(value)); } const response = await fetch(url, { ...init, headers: { 'X-API-Key': AZIZ_API_KEY, 'Content-Type': 'application/json', ...init.headers }, }); const payload = (await response.json()) as Schemas['SuccessEnvelope'] | Schemas['ErrorEnvelope']; if (payload.status !== 'success') throw new Error(payload.message); return payload.data as T;}
export const listProjects = (query: ProjectsQuery = {}) => azizFetch<Schemas['ProjectsPage']>('/projects', query);
export const getProject = (id: number) => azizFetch<Schemas['ProjectDetail']>(`/projects/${id}`);
export const applyForUnit = (unitId: number, body: ApplicationRequest) => azizFetch<Schemas['ApplicationResult']>(`/units/${unitId}/applications`, {}, { method: 'POST', body: JSON.stringify(body), });Now listProjects({ bedrooms: '2,3', price_max: 3_000_000 }) is checked against the spec, and the fields of every response autocomplete. Regenerate the file whenever the API version changes.
For full client SDKs in other languages, use OpenAPI Generator with the same spec URL.