Skip to main content

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

HeaderRequiredDescription
AuthorizationYesBearer <workspace_token>

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier
supplierIdstringYesSupplier 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