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

Record a print job

Any signed in user. Records a receipt, invoice, credit note, label, or report as printed. A named printer must share the branch, and the legacy printed status reads back as completed.

POST/api/v1/printing/print-jobs
Authorization
AuthorizationBearer token (JWT) · headerrequired

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

Request body
requiredapplication/json
branch_idstring
printer_idstring | null
document_typestring
reference_idstringrequired
copiesnumber
statusstring
reasonstring
Responses
201

Print job recorded

idstringrequired
branch_idstringrequired
printer_idstring | nullrequired
document_typestringrequired
reference_idstringrequired
copiesintegerrequired
min -9007199254740991 · max 9007199254740991
statusstringrequired
reasonstringrequired
created_bystringrequired
created_atstringrequired
400

reference_id is empty, the document type or status is invalid, copies is not an integer between 1 and 20, or the printer belongs to another branch

detailstringrequired
401

Not authenticated

detailstringrequired
403

Branch is outside your ownership

detailstringrequired
404

Printer not found

detailstringrequired
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'http://localhost:8000/api/v1/printing/print-jobs' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "branch_id": "string",
  "printer_id": "string",
  "document_type": "string",
  "reference_id": "string",
  "copies": 0,
  "status": "string",
  "reason": "string"
}'
Response
{
  "id": "string",
  "branch_id": "string",
  "printer_id": "string",
  "document_type": "string",
  "reference_id": "string",
  "copies": -9007199254740991,
  "status": "string",
  "reason": "string",
  "created_by": "string",
  "created_at": "string"
}