Get Supplier Summary (v1)
Method & Path
GET /api/v1/workspace/:workspaceId/suppliers/:supplierId/summary
Actual backend path: GET /v1/workspace/:workspaceId/suppliers/:supplierId/summary
Description
Get aggregated financial summary for a supplier: حسابه (total account / total invoices), واصلاً (total paid), متبقي له (remaining).
Authentication
Required: Workspace JWT.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <workspace_token> |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
supplierId | string | Yes | Supplier identifier |
Response 200 OK
{
"summary": {
"totalAccount": 15000,
"totalPaid": 9000,
"remaining": 6000
}
}
Common Errors
- 401 Unauthorized: Missing or invalid token
- 403 Forbidden: Workspace access denied
- 404 Not Found: Workspace or supplier not found
- 500 Internal Server Error: Server error