Database Builder with Postback URL

First, constructing your DBB Postback doesn’t require any coding. Easily, just copy and paste based on the instructions below.

The key benefit with DBB Postback is directly updating a validation database stored on codeREADr’s servers in real-time. Thus, you don’t have export scan records from codeREADr and create a new, updated CSV file to upload to that database.

A validation database is a table of barcode values and associated data stored on codeREADr’s servers for use with your validation Service types. After each scan, the associated data is presented as a ‘response’ to the user if the barcode value exists in that database.

Normally, if the barcode value doesn’t exist in the database, the user will get an Invalid response after scanning that value. However, with DBB Postback, you can enable users to add that value to the database along with associated data (text, photos, etc.). Then, allow them to edit data associated with values already existing in the database.

Also, we save scan records on our server. Then, from the Scans page, you can be filter, share, export, or insert it into third party databases.

DBB Postback only works when the user has Internet connectivity. Also, use it only when you need to add or edit the data associated with the scanned barcode value. If you want to add values to a validation database, use Pattern Validation, which can work online or offline.

Primary Use Cases

  • One Service to build a database for a different Service: DBB Scan Records are posted to the DBB Destination Database by app users authorized to scan for Service A. Those app users build the database to use withService B. This will be a totally separate Service, generally without the ability to add or edit values. For example, Service A may provision IDs, vouchers or assets to the destination database. Service B simply validates if the value is in the database and check for duplicate scans. Also, you can use this service for access control, attendance, voucher redemption, asset tagging, and more.
  • One Service to build and continuously update the same database: With the add + update use case, app users can post DBB Scan Records to the DBB Destination Database . Also, they can continuously update the DBB Response after any scan. Typical applications include asset tracking with status updates (location, condition, disposition); student/member/employee record updates; and inventory management with location and quantity updates.

Definition of Options

  •  DBB Scan Record: This is the DBB Value (i.e. the barcode value scanned or entered via manual entry or lookup) along with the DBB Response (i.e. the result stored when the app user answers Questions you prompt them with). Depending on the construction of your URL, those answers either replace existing data in the DBB Destination Database or are added if not already there.
  • DBB Destination Database: This is the validation database, which stores the DBB Values and the DBB Responses. It can be a validation database associated with the Service the app user is scanning for. Also, it can be a database associated with a totally different Service. The latter option can be valuable as well. For example, one service is used to provision values to a database of IDs, assets, etc., but a different service is used to check if those values are in the database before the disposition process.


First, create a DBB Destination Database and get the database ID

Shared Database

Second, create a validation service

Validate scans with a database

Third, add your questions:

App-user prompts (‘Questions’) to capture form field entries, multiple choice answers, photos, and other data after each scan are created in the standard way (see here about creating a question). However, when you choose when the questions will appear to the app-user, you MUST have them appear AFTER submitting any scan, or a Valid scan or an Invalid scan.

Fourth, get your API key:

You need your account’s API key for the Postback to work. Also, you need a paid account to have an API Key.

Insert API Key

Fifth, create your postback URL:

This is where you use the database ID and API Key. You replace ‘DB_ID’ with the destination database ID and replace ‘API_KEY’ with your API Key.

Edit this URL (copy & paste into a text editor, e.g. Word, Notepad, etc. with no spaces):

Example URLs

  • Add + Edit (adds values and answers if not already in the destination database and allows the editing of prior answers):
  • Edit Only (only allows the editing of prior answers already in the destination database):

Important: The most common mistake is including a space in the URL or missing part of the text (a ‘variable’) which you need to append to the URL. Thus, check your URL in a text editor, such as Notepad or a similar program if you have any trouble.

Require Answer

The optional variable “&require_answer=false” will give an Invalid response to the app user but will add the DBB Scan Record to the DBB Destination database once submitted. The variable &require_answer=true will give the app user a Valid response since the value needs to already be in the DBB Destination database if you use this variable. The app users will see the existing associated data. Also, they can edit that data by entering new data if they answer at least one of the Questions.

Require Valid Response

This optional variable “&require_status=valid” will only add DBB Scan Record if the scanned value is already in the DBB Destination Database. If you use this variable, app users will not be able to add new values to a DBB Destination Database.

Labeling Response Text

This optional variable “&transfer_label=YOUR_LABEL_TEXT” presents your original response text (i.e. column 2 of your validation database) for each value to the app user when that value is scanned. For example, this will show the description of the asset after a scan along with DBB Responses.

Sixth, insert your Postback URL and alter Response Value

On the Advanced tab, you need to insert your Post back URL into the Post back section. Use the default options as checked.

Enter post back URL

To format the data as structured data, you need to check ‘Alter Response Value’. Then, copy and paste the following:

  • Alter Response Pattern: ^([\s\S]*)$
  • Alter Response Replacement: copy and paste from this text file DB Builder Postback HTML.

Important: This Alter Response Replacement script works for older versions of Android OS (4.1 and higher). However, you need iOS 10.0 or higher even though the app supports lower iOS versions.

Alter Response Pattern

There are three optional variables within that document:

  • showLabels = true (or false)
  • defaultResponse = “Custom message for empty responses go here.”
  • defaultOrder = [enter question IDs separated by a comma]

Seventh, scan Records

On the Scans page you can filter, export, share, and insert scan records into your own or third party databases based on an export template. Look here for information on scans.

Note: You can use the standard Export Template feature. However, to parse the structured response, you will need these instructions.

in Databases