A common way to integrate Cribwise with SAP is to send raw transaction data to SAP and let it handle all stock updates. Cribwise does, in this case, not create orders or manage stock levels. It only provides the transactions to SAP.
The typical data sent to SAP includes Pick and Return transactions:
-
Pick: An item is taken from the vending machine. SAP reduces the item’s quantity by –1.
-
Return: An item is put back. SAP increases the quantity by +1.
SAP continues to be the master system. It handles purchasing, orders, and stock management. The vending device simply reports what happened.
For consumable items, most SAP setups do not allow returns. In those cases, only Pick transactions are needed, and SAP adjusts the stock based on those picks alone.
There are several ways to send data to an ERP system. One common option is the ERP Sending Interface.
This interface is easy to set up and can deliver data through FTP, Email, or Webservice.
You can find the settings at:
Administration → Integration → ERP Settings
To use it:
-
Enable Send Picks, and enable Send Returns if you need return data.
-
Choose where the data should be delivered.
-
Choose how often it should be sent.
Each transmission includes all transactions that occurred since the previous run.
The main downside is that if a file is lost, the data will not be sent again, since the system only sends new transactions after each run.

API
You can use the Reporting API to retrieve all transactions and organize them by transaction type.
The API documentation is available here:
APIs: Details – CRIBWISE API Management – Developer Portal
To call the API, you first need to create an API key:
Administration → Integration → API Keys → Create new key
Copy the generated key and use it to make your initial request to:
https://app.cribwise.com/adminportalidentity/connect/token
This call will return the access token required for all further API requests.

The response from the token request will contain a Bearer token in the field access_token.
This access_token is used as the authorization token for all following API calls.

Use the access_token as the bearer token for all API calls for the next hour. When it expires, request a new one.
Next, call the Raw Transactions API to retrieve all transaction records. Because the data volume can be large, it is strongly recommended to apply filters.
Set the filters to:
-
TransactionType = pick
-
CreatedOn = the timestamp of your last successful API call
Filtering by transaction type ensures you only receive the transactions you need.
Filtering by CreatedOn is important because it represents the time the server processed the transaction. Devices that were offline may upload their data later, and their device timestamps may not match the processing time. If you filter based on the device’s own timestamp, you may miss transactions.
Each transaction includes a unique ID, which can be used to track which entries have already been processed into SAP.
Note that TransactionTypeId is translated according to the system language in the Admin Portal. The displayed name “Pick,” will be translated to the system settings language.
