Update Machines
Updates the provided machines.
| Verb | Patch |
|---|---|
| Endpoint | {base-url}/machines |
| Max Page Size | N/A |
Request Body
{
"body": [
{
"id": 1166,
"siteId": 7,
"typeId": 4,
"forceUpdate": false,
"name": "Snack Machine - Lobby",
"modelNumber": "VCController",
"taxPercentage": 7.5,
"commissionPercentage": 10.0,
"creditProcessingFee": 1.5,
"externalAccountsTerminalId": null,
"canRollbackFirmware": false,
"enableAccountSales": true,
"enableCashSales": true,
"enableCreditSales": true,
"mode": "metered",
"hardwareSettingsChanged": true,
"useMachineTaxRate": true,
"useMachineCommissionRate": false,
"offerSmsReceipts": 1
}
]
}
Note
All changes in this request are atomic. If any item fails, the entire batch is rolled back and no changes are made.
Returns
On Success
The updated machines.
Response Body
[
{
"id": 1166,
"assetId": 318,
"organizationId": 1,
"siteId": 7,
"typeId": 4,
"machineMasterId": 12,
"forceUpdate": false,
"prose": "PROSE1234567890",
"name": "Snack Machine - Lobby",
"modelNumber": "VCController",
"taxPercentage": 7.5,
"commissionPercentage": 10.0,
"callInCode": "U3EA142DP4",
"creditProcessingFee": 1.5,
"externalAccountsTerminalId": null,
"createdAt": "2014-08-06T09:56:58.55",
"provisionedAt": "2024-01-15T08:00:00Z",
"canRollbackFirmware": false,
"controllerFirmware": {
"current": "4.2.1",
"pendingUpdate": null
},
"pcFirmware": {
"current": "2.1.0",
"pendingUpdate": null
},
"hasPlanogramChange": true,
"enableAccountSales": true,
"enableCashSales": true,
"enableCreditSales": true,
"mode": "metered",
"isVisible": true,
"isProvisioned": true,
"enableSlotCountTracking": true,
"useInternetPricing": false,
"hardwareSettingsChanged": true,
"usePlangramPrice": false,
"useMachineTaxRate": true,
"useMachineCommissionRate": false,
"lastHeartBeat": {
"server": "2024-03-15T10:28:00Z",
"local": "2024-03-15T10:27:57Z"
},
"lastCashSale": {
"server": "2024-03-15T09:14:22Z",
"local": "2024-03-15T09:14:19Z"
},
"lastCreditSale": {
"server": "2024-03-15T10:02:05Z",
"local": "2024-03-15T10:02:02Z"
},
"lastAccountSale": {
"server": "2024-03-14T15:33:11Z",
"local": "2024-03-14T15:33:08Z"
},
"latestRestockToPicklist": {
"server": "2015-04-22T10:53:20.883",
"local": "2015-04-22T10:53:17.617"
},
"offerSmsReceipts": 1
}
]
On Error
| HTTP Code | Error Code | Definition |
|---|---|---|
| 403 | DATA_ACCESS_VIOLATION | One or more machines in the request, or a siteId they reference, belong to an organization you do not have access to. |
| 404 | MISSING_RECORD | One or more of the specified machines, or a referenced siteId, does not exist. |
| 422 | DATA_VALIDATION_ERROR | One or more machines had an invalid mode value. Valid values are: dex, invoice, metered, purchase, unknown. |
| 422 | VALIDATION_ERROR | One or more field values failed validation (e.g. a string field exceeded its maximum length, or a required numeric field was out of range). |