> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anbyan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# End the current passbook shift

> End the current passbook shift. Access is subject to the permissions, authentication, and branch requirements documented for this operation.



## OpenAPI

````yaml /openapi/tenant-staff-v1.openapi.yaml post /passbooks/shifts/end
openapi: 3.1.0
info:
  title: Anbyan Staff Session API
  version: 1.0.0
  description: >
    Human staff API authenticated with short-lived staff sessions. Login uses
    email and password, followed by MFA when required.
servers:
  - url: https://{tenantDomain}/api/v1/staff
    description: Staff session API on a tenant domain
    variables:
      tenantDomain:
        default: tenant.example.com
security:
  - bearerAuth: []
tags:
  - name: Auth
  - name: Ledger
  - name: Deposits
  - name: Withdrawals
  - name: Transfers
  - name: Vaults
  - name: Direct Deposits
  - name: Bank Migrations
  - name: Accounts
  - name: Account Products
  - name: Clients
  - name: Client Compliance
  - name: Product Applications
  - name: Card Programs
  - name: Card Design Sets
  - name: Cards
  - name: Dashboard
  - name: Simulator
  - name: Compliance Program
  - name: Staff
  - name: Incidents
  - name: Branches
  - name: Jurisdictions
  - name: Locations
  - name: Notifications
  - name: Settings
  - name: FX
  - name: Passbooks
  - name: Access Control
  - name: Users
  - name: Activity Logs
paths:
  /passbooks/shifts/end:
    post:
      tags:
        - Passbooks
      summary: End the current passbook shift
      description: >-
        End the current passbook shift. Access is subject to the permissions,
        authentication, and branch requirements documented for this operation.
      operationId: endPassbookShift
      requestBody:
        $ref: '#/components/requestBodies/EndPassbookShiftRequest'
      responses:
        '200':
          $ref: '#/components/responses/TellerShiftSessionData'
components:
  requestBodies:
    EndPassbookShiftRequest:
      required: false
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EndPassbookShiftRequest'
  responses:
    TellerShiftSessionData:
      description: Teller shift session.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TellerShiftSessionData'
  schemas:
    EndPassbookShiftRequest:
      type: object
      properties:
        endedReason:
          type: string
          enum:
            - logout
            - timeout
            - manual
            - force
    TellerShiftSessionData:
      type: object
      properties:
        data:
          oneOf:
            - $ref: '#/components/schemas/TellerShiftSession'
            - type: 'null'
    TellerShiftSession:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
        userId:
          type: string
        branchId:
          type: string
        workstationId:
          type:
            - string
            - 'null'
        printerId:
          type:
            - string
            - 'null'
        currentSupervisorUserId:
          type:
            - string
            - 'null'
        createdByUserId:
          type:
            - string
            - 'null'
        openingApprovedByUserId:
          type:
            - string
            - 'null'
        closingApprovedByUserId:
          type:
            - string
            - 'null'
        endedByUserId:
          type:
            - string
            - 'null'
        carryForwardFromShiftSessionId:
          type:
            - string
            - 'null'
        openingCashCountId:
          type:
            - string
            - 'null'
        closingCashCountId:
          type:
            - string
            - 'null'
        openingFundingLedgerTransactionId:
          type:
            - string
            - 'null'
        closingSettlementLedgerTransactionId:
          type:
            - string
            - 'null'
        openingFundingLedgerTransactionIds:
          type: array
          items:
            type: string
        closingSettlementLedgerTransactionIds:
          type: array
          items:
            type: string
        startedAt:
          type: string
          format: date-time
        endedAt:
          type:
            - string
            - 'null'
          format: date-time
        endedReason:
          type:
            - string
            - 'null'
          enum:
            - logout
            - timeout
            - manual
            - force
            - rebind
            - null
        status:
          type: string
        cashState:
          type: object
          properties:
            opening:
              type: object
              additionalProperties:
                type: integer
            expectedClosing:
              type: object
              additionalProperties:
                type: integer
            actualClosing:
              type: object
              additionalProperties:
                type: integer
            difference:
              type: object
              additionalProperties:
                type: integer
        drawerInventory:
          type: array
          items:
            $ref: '#/components/schemas/TellerShiftDrawerInventoryLine'
        drawerBreakdownStatuses:
          type: array
          items:
            $ref: '#/components/schemas/TellerShiftDrawerBreakdownStatus'
        hasCashDifference:
          type: boolean
        cashDifferenceRequiresReview:
          type: boolean
        openingNotes:
          type:
            - string
            - 'null'
        closingNotes:
          type:
            - string
            - 'null'
        openingConfirmedAt:
          type:
            - string
            - 'null'
          format: date-time
        closingConfirmedAt:
          type:
            - string
            - 'null'
          format: date-time
        openingCashRequest:
          oneOf:
            - $ref: '#/components/schemas/ShiftCashDecision'
            - type: 'null'
        closingCashRequest:
          oneOf:
            - $ref: '#/components/schemas/ShiftCashDecision'
            - type: 'null'
        workstation:
          oneOf:
            - $ref: '#/components/schemas/PassbookWorkstationSummary'
            - type: 'null'
        user:
          oneOf:
            - $ref: '#/components/schemas/PassbookUserSummary'
            - type: 'null'
    TellerShiftDrawerInventoryLine:
      type: object
      properties:
        id:
          type: string
        cashDenominationId:
          type:
            - string
            - 'null'
        currencyCode:
          type: string
        denominationValue:
          type: integer
        denominationKind:
          type: string
        denominationLabel:
          type: string
        displayOrder:
          type: integer
        quantity:
          type: integer
        amountCents:
          type: integer
    TellerShiftDrawerBreakdownStatus:
      type: object
      properties:
        currencyCode:
          type: string
        cashTotalCents:
          type: integer
        inventoryTotalCents:
          type: integer
        unallocatedTotalCents:
          type: integer
        deficitTotalCents:
          type: integer
        needsBreakdown:
          type: boolean
        hasDeficit:
          type: boolean
    ShiftCashDecision:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
        decisionType:
          type: string
        status:
          type: string
          enum:
            - pending
            - approved
            - rejected
        requestedByUserId:
          type:
            - string
            - 'null'
        decidedByUserId:
          type:
            - string
            - 'null'
        reason:
          type:
            - string
            - 'null'
        decidedAt:
          type:
            - string
            - 'null'
          format: date-time
        metadata:
          $ref: '#/components/schemas/GenericObject'
    PassbookWorkstationSummary:
      type: object
      properties:
        id:
          type: string
        code:
          type: string
        name:
          type: string
    PassbookUserSummary:
      type: object
      properties:
        id:
          type: string
        email:
          type:
            - string
            - 'null'
        displayName:
          type:
            - string
            - 'null'
        code:
          type:
            - string
            - 'null'
    GenericObject:
      type: object
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.