Connect v1 Migrations

Migrate from the Connect v1 CashDrawer Shifts API

CashDrawerShifts 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.

Migration overview
Permalink Get a link to this section

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

Important dates
Permalink Get a link to this section

  • Deprecation: 2020-02-26

  • Retirement: 2021-02-26

If you need help
Permalink Get a link to this section

If you need help migrating to Square APIs or need more time to complete your migration, contact Developer Support, join our Slack, or reach out to your Square Account Manager.

New features in the Square CashDrawer Shifts API
Permalink Get a link to this section

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.

Getting v1 CashDrawerShift information using the Square CashDrawer Shifts API
Permalink Get a link to this section

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.

Endpoints
Permalink Get a link to this section

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 endpoint
Square replacement
Usage
ListCashDrawerShiftsChanged ListCashDrawerShiftsNo longer returns a list of CashDrawerShift. Now returns a list of CashDrawerShiftSummary.
RetrieveCashDrawerShift RetrieveCashDrawerShiftGets 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.

Field Mapping
Permalink Get a link to this section

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.

V1CashDrawerShift
Permalink Get a link to this section

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, 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.

V1ListCashDrawerShiftsResponse
Permalink Get a link to this section

The Square API ListCashDrawerShiftsResponse object returns a different object type.

v1 fieldSquare fieldNotes
itemsitemsNew object type: items is of type CashDrawerShiftSummary

V1Money
Permalink Get a link to this section

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

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