All URIs are relative to https://connect.squareup.com
Method | HTTP request | Description |
---|---|---|
listCashDrawerShiftEvents | GET /v2/cash-drawers/shifts/{shift_id}/events | ListCashDrawerShiftEvents |
listCashDrawerShifts | GET /v2/cash-drawers/shifts | ListCashDrawerShifts |
retrieveCashDrawerShift | GET /v2/cash-drawers/shifts/{shift_id} | RetrieveCashDrawerShift |
ListCashDrawerShiftEventsResponse listCashDrawerShiftEvents(locationId, shiftId, opts)
ListCashDrawerShiftEvents
Provides a paginated list of events for a single cash drawer shift.
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new SquareConnect.CashDrawersApi();
var locationId = "locationId_example"; // String | The ID of the location to list cash drawer shifts for.
var shiftId = "shiftId_example"; // String | The shift ID.
var opts = {
'limit': 56, // Number | Number of resources to be returned in a page of results (200 by default, 1000 max).
'cursor': "cursor_example" // String | Opaque cursor for fetching the next page of results.
};
apiInstance.listCashDrawerShiftEvents(locationId, shiftId, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
locationId | String | The ID of the location to list cash drawer shifts for. | |
shiftId | String | The shift ID. | |
limit | Number | Number of resources to be returned in a page of results (200 by default, 1000 max). | [optional] |
cursor | String | Opaque cursor for fetching the next page of results. | [optional] |
ListCashDrawerShiftEventsResponse
- Content-Type: application/json
- Accept: application/json
ListCashDrawerShiftsResponse listCashDrawerShifts(locationId, opts)
ListCashDrawerShifts
Provides the details for all of the cash drawer shifts for a location in a date range.
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new SquareConnect.CashDrawersApi();
var locationId = "locationId_example"; // String | The ID of the location to query for a list of cash drawer shifts.
var opts = {
'sortOrder': "sortOrder_example", // String | The order in which cash drawer shifts are listed in the response, based on their opened_at field. Default value: ASC
'beginTime': "beginTime_example", // String | The inclusive start time of the query on opened_at, in ISO 8601 format.
'endTime': "endTime_example", // String | The exclusive end date of the query on opened_at, in ISO 8601 format.
'limit': 56, // Number | Number of cash drawer shift events in a page of results (200 by default, 1000 max).
'cursor': "cursor_example" // String | Opaque cursor for fetching the next page of results.
};
apiInstance.listCashDrawerShifts(locationId, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
locationId | String | The ID of the location to query for a list of cash drawer shifts. | |
sortOrder | String | The order in which cash drawer shifts are listed in the response, based on their opened_at field. Default value: ASC | [optional] |
beginTime | String | The inclusive start time of the query on opened_at, in ISO 8601 format. | [optional] |
endTime | String | The exclusive end date of the query on opened_at, in ISO 8601 format. | [optional] |
limit | Number | Number of cash drawer shift events in a page of results (200 by default, 1000 max). | [optional] |
cursor | String | Opaque cursor for fetching the next page of results. | [optional] |
- Content-Type: application/json
- Accept: application/json
RetrieveCashDrawerShiftResponse retrieveCashDrawerShift(locationId, shiftId)
RetrieveCashDrawerShift
Provides the summary details for a single cash drawer shift. See RetrieveCashDrawerShiftEvents for a list of cash drawer shift events.
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new SquareConnect.CashDrawersApi();
var locationId = "locationId_example"; // String | The ID of the location to retrieve cash drawer shifts from.
var shiftId = "shiftId_example"; // String | The shift ID.
apiInstance.retrieveCashDrawerShift(locationId, shiftId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
locationId | String | The ID of the location to retrieve cash drawer shifts from. | |
shiftId | String | The shift ID. |
RetrieveCashDrawerShiftResponse
- Content-Type: application/json
- Accept: application/json