Get Supplier (v1)
Method & Path
GET /api/v1/workspace/:workspaceId/suppliers/:supplierId
Actual backend path: GET /v1/workspace/:workspaceId/suppliers/:supplierId
Description
Get a single supplier 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 |
supplierId | string | Yes | Supplier identifier |
Response 200 OK
{
"supplier": {
"id": "507f1f77bcf86cd799439011",
"workspaceId": "507f1f77bcf86cd799439012",
"fullName": "اسم التام للمورد",
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:00:00.000Z"
}
}
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