Connect v1 Migrations

Migrate from Connect v1 CashDrawerShifts API

CashDrawerShifts API

Migration overview
Permalink Get a link to this section

The Connect v1 CashDrawerShift API lets developers create cash drawer shift reporting for cash drawer activity on a shift.

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, please contact Developer Support, join our Slack, or reach out to your Square Account Manager.

New features in Square API CashDrawerShifts
Permalink Get a link to this section

The Square CashDrawerShifts API provides all of the functionality of the Connect v1 employees.CashDrawerShift API and adds these new features:

  • Pagination — The Square CashDrawerShifts 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 this shift summary 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 API provides a separate reporting endpoint for getting the events on a cash drawer shift by ID. The v1 CashDrawerShift object contained a collection all events on a cash drawer shift.

Getting v1 CashDrawerShift information using the Square CashDrawerShifts 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 on a cash drawer shift.

Endpoints
Permalink Get a link to this section

Square CashDrawerShifts API endpoints replace the v1 CashDrawerShift endpoints in v1Employees API.

You must update the code that relies on the following endpoints to avoid breaking when the v1 CashDrawerShift 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 V1CashDrawerShift object are available in Square CashDrawerShifts API objects. As a result, most code will only need 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 of 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