The newest version of this document can be found online at: https://resources.apnet.ch/api/manage/cash-registers
Last modified: 2021-07-12 17:44 ➔ reload

Automated management of cash registers

Only for partners with an API integration at the level of the cash registers

API basics

API methods

Get Cash-Registers

[Base-URL]/cash-register/get

Returns all cash-registers attached to your partnerID.

Returned JSON:

{
    "success": true,
    "devices": [{
        "device": "MUHA-001",               // device identifier, defined when adding a new cash-register
        "note": "Musterhausen, Kasse 1",    // note, defined when adding a new cash-register
        "locationId": "LOC-001",            // id of your location, set via location API
        "locationZip": "1234",              // zip of location
        "locationAddress": "Mustergasse 13" // address of location
    }, {
        ...
    }]
}

Returned JSON in case of an error:

{
    "success": false,
    "message": "[error-message]"
}

Add or Update a Cash-Register

[Base-URL]/cash-register/add

Adds a new cash-register (or updates, if submitted device ID already exists).

Required POST data:

{
    "device": "MUHA-001",               // [required], defined by you
    "note": "Musterhausen, Kasse 1",    // [required], defined by you, note which helps to identify the device
    "locationId": "LOC-001",            // [required if no locationZip/locationAddress submitted], ID of location, defined by you via location API
    "locationZip": "1234",              // [required if no locationId submitted], ZIP of location where you want to attach the device
    "locationAddress: "Mustergasse 13"  // [required if no locationId submitted AND if you have multiple locations with the same ZIP]
}

Returned JSON:

{
    "success": true,
    "message": "new device created"     // or "device updated", if device has already existed
}

Returned JSON in case of an error:

{
    "success": false,
    "message": "[error-message]"
}

Disable a Cash-Register

[Base-URL]/cash-register/disable

Disables a cash-register. It is no longer possible to book transactions on this device.

Required POST data:

{
    "device": "MUHA-001"             // [required], defined by you
}

Returned JSON:

{
    "success": true,
    "message": "1 devices disabled"  // returns number of affected devices
}

Returned JSON in case of an error:

{
    "success": false,
    "message": "[error-message]"
}