---
title: "POST /api/services/app/PharmacyShift/CloseShift"
method: POST
path: "/api/services/app/PharmacyShift/CloseShift"
tags: ["PharmacyShift"]
---

# POST /api/services/app/PharmacyShift/CloseShift

`POST /api/services/app/PharmacyShift/CloseShift`

## Request

- Base URL: `https://api.dalieu.vn` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dalieu.vn/api/services/app/PharmacyShift/CloseShift`
- Auth: none declared

## Request body

- ClosePharmacyShiftInput
  - `pharmacyId` integer: Range 1–9.223372036854776E+18
  - `force` boolean

## Response `200`

Success

- ClosePharmacyShiftResultDto
  - `closed` boolean
  - `state` 1 | 2 | 3
  - `inFlight` PharmacyOrderDto[], nullable
    - `sessionKey` string, uuid
    - `pharmacyId` integer
    - `state` 1 | 2 | 3 | 4 | 5 | 6 | 7
    - `stateText` string, nullable
    - `serviceReqCode` string, nullable
    - `treatmentCode` string, nullable
    - `patientId` integer, nullable
    - `patientCode` string, nullable
    - `patientName` string, nullable
    - `patientPhone` string, nullable
    - `prescribedAt` string, date-time, nullable
    - `prescribedBy` string, nullable
    - `lines` PharmacyOrderLineDto[], nullable
      - `medicineTypeId` integer
      - `medicineTypeCode` string, nullable
      - `medicineTypeName` string, nullable
      - `unitName` string, nullable
      - `amount` number, double
      - `numOfDays` integer, nullable
      - `tutorial` string, nullable
      - `unitPrice` number, double, nullable
      - `vatRatio` number, double, nullable
      - `unitPriceVat` number, double, nullable
      - `lineAmount` number, double, nullable
      - `availableAmount` number, double
      - `stockStatus` 1 | 2 | 3
      - `stockStatusText` string, nullable
      - `beanIds` integer[], nullable
    - `stockStatus` 1 | 2 | 3
    - `stockStatusText` string, nullable
    - `totalAmount` number, double
    - `createdAt` string, date-time
    - `expiresAt` string, date-time
    - `idleTimeoutAt` string, date-time
    - `remainingSeconds` integer
    - `lastActivityAt` string, date-time
    - `waitingSeconds` integer
    - `canRollback` boolean
    - `payment` PharmacyPaymentDto
      - `expMestId` integer
      - `expMestCode` string, nullable
      - `transactionId` integer
      - `transactionCode` string, nullable
      - `transReqId` integer
      - `transReqCode` string, nullable
      - `amount` number, double
      - `transactionAmount` number, double
      - `qrText` string, nullable
      - `qrCreatedAt` string, date-time, nullable
      - `isPaid` boolean
      - `paidAt` string, date-time, nullable
      - `dispenseStep` integer
      - `isDispensed` boolean
      - `dispensedAt` string, date-time, nullable
    - `receipt` PharmacyReceiptDto
      - `hospitalName` string, nullable
      - `pharmacyName` string, nullable
      - `address` string, nullable
      - `phone` string, nullable
      - `presNumber` integer, nullable
      - `mediStockName` string, nullable
      - `printRoomName` string, nullable
      - `cashierName` string, nullable
      - `patientName` string, nullable
      - `patientCode` string, nullable
      - `doctorName` string, nullable
      - `expMestCode` string, nullable
      - `transactionCode` string, nullable
      - `lines` PharmacyReceiptLineDto[], nullable
        - `numOrder` integer
        - `name` string, nullable
        - `unitName` string, nullable
        - `amount` number, double
        - `unitPrice` number, double
        - `total` number, double
      - `lineCount` integer
      - `totalAmount` number, double
      - `totalAmountInWords` string, nullable
      - `qrText` string, nullable
      - `notes` string[], nullable
      - `issuedAt` string, date-time
      - `copies` integer
      - `autoPrint` boolean
      - `printCount` integer
      - `lastPrintedAt` string, date-time, nullable
    - `message` string, nullable
    - `requireConfirm` boolean

## Changes

- **2026-10-09** `438fff8364ac`: 3 info
  - added the optional property `inFlight/items/requireConfirm` to the response with the `200` status (media type: text/plain)
  - added the optional property `inFlight/items/requireConfirm` to the response with the `200` status (media type: application/json)
  - added the optional property `inFlight/items/requireConfirm` to the response with the `200` status (media type: text/json)
- **2026-09-29** `f63af4ece8b0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/dalieu/apis/portaldalieu-api/changes/api/services/app/PharmacyShift/CloseShift/post.md)

---

[API](https://skmtc.dev/dalieu/apis/portaldalieu-api.md) - [All operations](https://skmtc.dev/dalieu/apis/portaldalieu-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dalieu/apis/portaldalieu-api/revisions/4504abab950f?raw)
