Migrate from the Connect v1 CashDrawer Shifts API

The following information helps you migrate from the Connect v1 CashDrawer Shifts API code to the replacement Square API counterparts. For general guidance about the differences between Connect v1 and Square APIs, see the Connect v1 Migration guide.

Link to section

Migration overview

The Connect v1 CashDrawer Shift API lets you create cash drawer shift reporting for cash drawer activity.

Link to section

Important dates

  • Deprecation: 2020-02-26
  • Retirement: 2021-02-26
Link to section

If you need help

If you need help migrating to Square APIs or need more time to complete your migration, contact Developer Support, join our Discord community, or reach out to your Square account manager.

Link to section

New features in the Square CashDrawer Shifts API

The CashDrawer Shifts API provides all the functionality of the Connect v1 employees.CashDrawer Shift API and adds these features:

  • Pagination. The CashDrawer Shifts API reporting endpoints provide pagination and sorting along with location and time range filtering.

  • Cash drawer shift activity summary. The CashDrawerShiftSummary object is a cash drawer shift summary record that provides the following information:

    • Shift start and end time
    • Opening cash amount
    • Expected closing cash amount
    • Actual closing cash amount
  • Separate endpoint for events on a cash drawer shift. The Square ListCashDrawerShiftEvents endpoint provides reporting to get the events on a cash drawer shift by ID. The v1 CashDrawerShift object contains a collection of all the events on a cash drawer shift.

Link to section

Getting v1 CashDrawerShift information using the Square CashDrawer Shifts API

You can use the Square API endpoint to retrieve v1 CashDrawerShift data for reporting. You must make a separate API call to get the activity detail about a cash drawer shift.

Link to section

Endpoints

Square CashDrawer Shifts API endpoints replace the v1 CashDrawerShift endpoints in the v1 Employees API.

You must update the code that relies on the following endpoints to avoid breaking when the v1 CashDrawer Shift API retires:

v1 endpointSquare replacement Usage
ListCashDrawerShiftsChanged ListCashDrawerShiftsNo longer returns a list of CashDrawerShift. Now returns a list of CashDrawerShiftSummary.
RetrieveCashDrawerShiftRetrieveCashDrawerShiftGets a single CashDrawerShift with the details of a single cash drawer shift.
ListCashDrawerShiftsNew ListCashDrawerShiftEventsReturns a list of CashDrawerShiftEvent objects as the activity on a cash drawer shift.
Link to section

Field Mapping

With a couple of exceptions, all fields in the V1CashDrawerShift object are available in Square CashDrawer Shifts API objects. As a result, most code only needs to update the endpoint reference and field names to work properly.

Link to section

V1CashDrawerShift

The Square API CashDrawerShift object contains all the fields of the v1 object with the following exceptions:

v1 fieldSquare fieldNotes
event_typestatestate values are OPEN, CLOSED, and ENDED.
starting_cash_moneyopened_cash_money
devicedeviceNew object type: CashDrawerShift.device is of type CashDrawerDevice.
eventsRemovedThe events field is replaced by the list of CashDrawerShiftEvent. objects returned by ListCashDrawerShiftEvents.
Link to section

V1ListCashDrawerShiftsResponse

The Square API ListCashDrawerShiftsResponse object returns a different object type.

v1 fieldSquare fieldNotes
itemsitemsNew object type: items is of type CashDrawerShiftSummary.
Link to section

V1Money

The Square API Money object expands the maximum value of the amount field.

v1 fieldSquare fieldNotes
amountamountChanged type: amount is now a 64-bit int.
currency_codecurrency