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

Record a supplier invoice

Any signed in user. Files one supplier invoice with nothing paid against it yet. supplier_id is required, and the invoice starts unpaid so the payment route is what moves it.

POST/api/v1/supplier-finance/invoices
Authorization
AuthorizationBearer token (JWT) · headerrequired

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

Request body
requiredapplication/json
supplier_idstringrequired
branch_idstring
invoice_nostring
total_amountnumber
due_datestring | null
notesstring
Responses
201

Supplier invoice filed

idstringrequired
supplier_idstringrequired
branch_idstringrequired
invoice_nostringrequired
total_amountnumberrequired
paid_amountnumberrequired
statusstringrequired
due_datestring | nullrequired
notesstringrequired
created_bystringrequired
created_atstringrequired
400

supplier_id is required

detailstringrequired
401

Not authenticated

detailstringrequired
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'http://localhost:8000/api/v1/supplier-finance/invoices' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "supplier_id": "string",
  "branch_id": "string",
  "invoice_no": "string",
  "total_amount": 0,
  "due_date": "string",
  "notes": "string"
}'
Response
{
  "id": "string",
  "supplier_id": "string",
  "branch_id": "string",
  "invoice_no": "string",
  "total_amount": 0,
  "paid_amount": 0,
  "status": "string",
  "due_date": "string",
  "notes": "string",
  "created_by": "string",
  "created_at": "string"
}