Services & API Integration

Main API Service (api.service.ts)

The central service for API communication with the backend.

Key Methods:

Configuration:

// API endpoints defined in addrezz.ts
OSAS_API = "https://testapi.ondelivery.id"
BOOKING_API = "https://demoapisat.ondelivery.id"
USAPI_API = "http://localhost:3621"

Service Categories

1. Scanning Services

Located in services/incoming-scans/ and services/outgoing-scans/

2. Report Services

Located in services/reports/

3. Business Services

Located in services/

HTTP Interceptor Pattern

All services use JWT tokens for authentication:

let customHeaders = new HttpHeaders({
  'Content-Type': 'application/json',
  'authorization': localStorage.getItem('jwt')!
});

PDF & Excel Export Services

PDF Service (pdf.service.ts)

Excel Export


Revision #1
Created 24 February 2026 07:12:52 by ondeliveloper
Updated 24 February 2026 07:13:21 by ondeliveloper