Get Supplier Payment (v1)
Method & Path
GET /api/v1/workspace/:workspaceId/supplier-payments/:paymentId
Actual backend path: GET /v1/workspace/:workspaceId/supplier-payments/:paymentId
Description
Get a single supplier payment by ID.
Authentication
Required: Workspace JWT.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <workspace_token> |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
paymentId | string | Yes | Supplier payment identifier |
Response 200 OK
{
"payment": {
"id": "507f1f77bcf86cd799439031",
"workspaceId": "507f1f77bcf86cd799439012",
"supplierId": "507f1f77bcf86cd799439011",
"invoiceId": "507f1f77bcf86cd799439021",
"amount": 2000,
"paymentDate": "2024-01-20T00:00:00.000Z",
"paymentMethod": "bank-transfer",
"description": "دفعة أولى",
"notes": "ملاحظات",
"createdAt": "2024-01-20T10:00:00.000Z",
"updatedAt": "2024-01-20T10:00:00.000Z"
}
}
Common Errors
- 401 Unauthorized: Missing or invalid token
- 403 Forbidden: Workspace access denied
- 404 Not Found: Workspace or payment not found
- 500 Internal Server Error: Server error