Direct Scan to URL (DSU) enables the CodeREADr mobile apps to post scans directly to your server. Likewise, it enables your server to post the scan response directly back to the app. No scan or response data is posted to CodeREADr’s server.
This type of service has the benefits of a Postback URL with data security. Also, it enables the use of CodeREADr apps with local area networks. This is useful when you have firewall restrictions or unstable Internet connectivity.
Please look here for developer instructions for postback URL and here for helpful hints for using postback URL and DSU variables.
Option 1: Receiving server responds to the scan
First, select “Scan to Third Party Server”. Second, check the option to “Skip our server and go directly to yours” when creating the service. Then, it posts the scan directly from the mobile app to your local or cloud server and your server responds directly to the app.
Option 2: Offline record scans or validate scans
Instead of creating a “Scan to Third Party Server” service, you can alternatively create a standard, on-device validate or record-only service type with Auto Sync. The result of each scan (valid, invalid, invalid duplicate along with the response text) would be seen by the app user before the receiving server receives the post. However, once each scan hits the receiving server, a DSU response is required to clear the record from the device. The DSU response does not override or change the scan record.
So why is this valuable? Mainly, you can get an “instant” response because there are no LAN or Internet latency delays. Also, the app can work offline.
With DSU and our API, you can use the service config called “scan_properties” which takes a JSON object of key-value pairs that will each be POSTed along with the other scan variables. So for example:
An example API URL to create a service with:
The same API URL but with the JSON URL encoded: