Skip to main content

On app opened

since app build #4

Scan the below QR code with the scan2check mobile app to import the settings below. The API url is specific:

The apiUrl returns always an OK response, when a code is scanned. A minimal response object is returned.

The apiUrlOpened, if set, is called each time application is opened or brought to foreground. This specific sample apiUrlOpened endpoint returns a new custom form definition, but it is not required to return any specific response. A simple message like Settings updated is recommended.

Endpoint documentation:

Settings JSON#

{  "app" : "scan2check.com",  "settings" : {    "apiUrl" : "https://stoplight.io/mocks/yofla/scan2check/18958858/upload-code-minimal-response",    "apiUrlOpened" : "https://stoplight.io/mocks/yofla/scan2check/18958858/on-application-opened"  }}

Open in configurator — opens this exact settings document in the configurator, where you can edit it and regenerate the QR code.

Settings QR code#

(above json as QR code)

API response - apiUrl#

(API response is an empty JSON. HTTP status code is 200.)

{}

API response - apiUrlOpened#

(the response sets a new custom form, removes previous, if set)

{  "title": "Settings updated",  "message": "New fruits form!",  "status": "ok",  "backgroundColor": [    0,    0,    100  ],  "autoScanTimeout": -1,  "settings": {    "formData": {      "schema": {        "newFruitForm": {          "title": "New - Please choose",          "type": "string",          "enum": [            "Apple",            "Pear",            "Cherry"          ]        }      }    }  }}

Now scan a test code#

Once the app has applied the settings above, scan one of these to send a test request:

Scroll until only one code is on screen. If the settings QR code above is still in view, the camera may read it again, which re-applies the settings instead of testing your endpoint.

QR code — always scannable, whatever your symbols setting.
Sends scan2check-test-code.
EAN-13 test barcode
EAN-13 barcode — tests 1D scanning. Needs ean13 in symbols (it is, unless you narrowed the list).
Image: Wikipedia, CC BY-SA 3.0

These codes also live on their own page: test codes.