Skip to content

Square: Retrieve Cash Drawer Shift

Square cashDrawers.retrieveCashDrawerShift: arguments, response, policy and SDK examples.

← Cash drawers operations · Get started

Operation square.retrievecashdrawershift

Provider route: GET /v2/cash-drawers/shifts/{shift_id}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/square with npm, or alter-sdk-square with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { SquareIntegration } from "@alter-ai/square";
async function execute(input: Parameters<SquareIntegration["cashDrawers"]["retrieveCashDrawerShift"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new SquareIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.cashDrawers.retrieveCashDrawerShift(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_square import SquareIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = SquareIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.cash_drawers.retrieve_cash_drawer_shift(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.shift_idstringRequired within parent
queryobjectRequired within parentAdditional keys: not allowed
query.location_idstringRequired within parent

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Retrieve Cash Drawer Shift — response body

Referenced models: Retrieve Cash Drawer Shift — response body

2 more schemas are linked from the tables above, on the schema pages.

Retrieve Cash Drawer Shift — response body
FieldTypePresenceDescription and constraints
$objectRoot
cash_drawer_shiftModelOptionalExpand Retrieve Cash Drawer Shift — response body — cash drawer shift
The cash drawer shift queried for.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Retrieve Cash Drawer Shift — response body — cash drawer shift, Get Shift — response body — errors item

Retrieve Cash Drawer Shift — response body — cash drawer shift
FieldTypePresenceDescription and constraints
$objectRootThis model gives the details of a cash drawer shift.
The cash_payment_money, cash_refund_money, cash_paid_in_money,
and cash_paid_out_money fields are all computed by summing their respective
event types.
cash_paid_in_moneyJSONOptional
cash_paid_in_money (anyOf 1)ModelAlternativeExpand Pay Order — response body — order total money
The amount of money added to the cash drawer for reasons other than cash
payments. It is computed by summing the events of type PAID_IN. The amount is
always greater than or equal to zero.
cash_paid_in_money (anyOf 2)nullAlternative
cash_paid_out_moneyJSONOptional
cash_paid_out_money (anyOf 1)ModelAlternativeExpand Pay Order — response body — order total money
The amount of money removed from the cash drawer for reasons other than
cash refunds. It is computed by summing the events of type PAID_OUT. The amount
is always greater than or equal to zero.
cash_paid_out_money (anyOf 2)nullAlternative
cash_payment_moneyJSONOptional
cash_payment_money (anyOf 1)ModelAlternativeExpand Pay Order — response body — order total money
The amount of money added to the cash drawer from cash payments.
This is computed by summing all events with the types CASH_TENDER_PAYMENT and
CASH_TENDER_CANCELED_PAYMENT. The amount is always greater than or equal to
zero.
cash_payment_money (anyOf 2)nullAlternative
cash_refunds_moneyJSONOptional
cash_refunds_money (anyOf 1)ModelAlternativeExpand Pay Order — response body — order total money
The amount of money removed from the cash drawer from cash refunds.
It is computed by summing the events of type CASH_TENDER_REFUND. The amount
is always greater than or equal to zero.
cash_refunds_money (anyOf 2)nullAlternative
closed_atJSONOptional
closed_at (anyOf 1)stringAlternativeThe time when the shift was closed, in ISO 8601 format.
closed_at (anyOf 2)nullAlternative
closed_cash_moneyJSONOptional
closed_cash_money (anyOf 1)ModelAlternativeExpand Pay Order — response body — order total money
The amount of money found in the cash drawer at the end of the shift
by an auditing employee. The amount should be positive.
closed_cash_money (anyOf 2)nullAlternative
closing_team_member_idstringOptionalThe ID of the team member that closed the cash drawer shift by auditing
the cash drawer contents.
Read only: true
created_atstringOptionalThe shift start time in RFC 3339 format.
Read only: true
descriptionJSONOptional
description (anyOf 1)stringAlternativeThe free-form text description of a cash drawer by an employee.
description (anyOf 2)nullAlternative
deviceJSONOptional
device (anyOf 1)ModelAlternativeExpand Retrieve Cash Drawer Shift — response body — cash drawer shift device id, name
The device running Square Point of Sale that was connected to the cash drawer.
device (anyOf 2)nullAlternative
ended_atJSONOptional
ended_at (anyOf 1)stringAlternativeThe time when the shift ended, in ISO 8601 format.
ended_at (anyOf 2)nullAlternative
ending_team_member_idstringOptionalThe ID of the team member that ended the cash drawer shift.
Read only: true
expected_cash_moneyJSONOptional
expected_cash_money (anyOf 1)ModelAlternativeExpand Pay Order — response body — order total money
The amount of money that should be in the cash drawer at the end of the
shift, based on the shift's other money amounts.
This can be negative if employees have not correctly recorded all the events
on the cash drawer.
cash_paid_out_money is a summation of amounts from cash_payment_money (zero
or positive), cash_refunds_money (zero or negative), cash_paid_in_money (zero
or positive), and cash_paid_out_money (zero or negative) event types.
expected_cash_money (anyOf 2)nullAlternative
idstringOptionalThe shift unique ID.
location_idstringOptionalThe ID of the location the cash drawer shift belongs to.
Read only: true
opened_atJSONOptional
opened_at (anyOf 1)stringAlternativeThe time when the shift began, in ISO 8601 format.
opened_at (anyOf 2)nullAlternative
opened_cash_moneyJSONOptional
opened_cash_money (anyOf 1)ModelAlternativeExpand Pay Order — response body — order total money
The amount of money in the cash drawer at the start of the shift.
The amount must be greater than or equal to zero.
opened_cash_money (anyOf 2)nullAlternative
opening_team_member_idstringOptionalThe ID of the team member that started the cash drawer shift.
Read only: true
stateJSONOptional
state (anyOf 1)stringAlternativeThe current state of a cash drawer shift.
The shift current state.
See [CashDrawerShiftState](#type-cashdrawershiftstate) for possible values
Known values: OPEN, ENDED, CLOSED
state (anyOf 2)nullAlternative
team_member_idsarrayOptionalThe IDs of all team members that were logged into Square Point of Sale at any
point while the cash drawer shift was open.
Read only: true
team_member_ids[]stringEach item
updated_atstringOptionalThe shift updated at time in RFC 3339 format.
Read only: true

Referenced models: Retrieve Cash Drawer Shift — response body — cash drawer shift device id, name, Pay Order — response body — order total money

Get Shift — response body — errors item
FieldTypePresenceDescription and constraints
$objectRootRepresents an error encountered during a request to the Connect API.

See [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information.
categorystringRequired within parentIndicates which high-level category of error has occurred during a
request to the Connect API.
The high-level category for the error.
See [ErrorCategory](#type-errorcategory) for possible values
Known values: API_ERROR, AUTHENTICATION_ERROR, INVALID_REQUEST_ERROR, RATE_LIMIT_ERROR, PAYMENT_METHOD_ERROR, REFUND_ERROR, MERCHANT_SUBSCRIPTION_ERROR, EXTERNAL_VENDOR_ERROR
codeModelRequired within parentExpand Get Shift — response body — errors item code
The specific code of the error.
See [ErrorCode](#type-errorcode) for possible values
detailstringOptionalA human-readable description of the error for debugging purposes.
fieldstringOptionalThe name of the field provided in the original request (if any) that
the error pertains to.

Referenced models: Get Shift — response body — errors item code

Retrieve Cash Drawer Shift — response body — cash drawer shift device id, name
FieldTypePresenceDescription and constraints
$objectRoot
idstringOptionalThe device Square-issued ID
nameJSONOptional
name (anyOf 1)stringAlternativeThe device merchant-specified name.
name (anyOf 2)nullAlternative
Create Location — response body — location currency
FieldTypePresenceDescription and constraints
$stringRootIndicates the associated currency for an amount of money. Values correspond
to [ISO 4217](https://wikipedia.org/wiki/ISO_4217).
Known values: UNKNOWN_CURRENCY, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LVL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SLE, SOS, SRD, SSP, STD, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XTS, XXX, YER, ZAR, ZMK, ZMW, BTC, XUS

SDK function policy ID: square.retrievecashdrawershift. Catalog operation: RetrieveCashDrawerShift. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["CASH_DRAWER_READ"]

Pinned headers: {"Square-Version": "2026-11-18"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.