Skip to main content

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

HeaderRequiredDescription
AuthorizationYesBearer <workspace_token>

Path Parameters

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