Skip to content
PharmaFlow Knowledgebase
Esc
↑↓navigate↵open⌘Jpreview

Get a customer

Any signed in user. Returns one customer with its credit limit, balance, and credit flag. An unknown customer answers 404, and money fields stay strings, so exact decimals survive.

GET/api/v1/customers/{customerId}
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT from POST /api/v1/auth/login sent as Authorization Bearer.

Path parameters
customerIdstringrequired

The customer id.

Responses
200

The customer

idstringrequired
namestringrequired
phonestringrequired
national_idstringrequired
notesstringrequired
image_urlstringrequired
credit_limitstringrequired
current_balancestringrequired
is_credit_allowedbooleanrequired
created_atstringrequired
updated_atstringrequired
is_deletedbooleanrequired
401

Not authenticated

detailstringrequired
404

Customer not found

detailstringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'http://localhost:8000/api/v1/customers/string' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "id": "string",
  "name": "string",
  "phone": "string",
  "national_id": "string",
  "notes": "string",
  "image_url": "string",
  "credit_limit": "string",
  "current_balance": "string",
  "is_credit_allowed": true,
  "created_at": "string",
  "updated_at": "string",
  "is_deleted": true
}