Overview

What is Deep Linking?

Deep Linking is a technique in which a given URL or resource is used to open a specific page or screen on mobile. So, instead of just launching the app on mobile, using our deep link method can lead a user to open PAVE's PWA in their browser. When finished, they will be redirected to a specific page within your native app, providing a seamless mobile experience. This particular page or screen you provide as a redirect URL may reside under a series of hierarchical pages, hence the term "deep" in deep linking.

How does the PAVE Deep Linking work?

Flowchart diagram of PAVE Deep Linking

Create New Session

POST https://api.paveapi.com/v1/generate-session-id/:api-key

Replacing: API-KEY with the unique license-specific API-Key provided within the INTEGRATIONS tab of the PAVE Dashboard will generate a Session ID (case id). A new session id must be generated onthe server-side for each inspection case (ie for each vehicle being inspected). We recommend you store the session IDs since they'll be used to identify the final inspection output as well.

Path Parameters

Name
Type
Description

api-key

string

API - Key

Request Body

Name
Type
Description

redirect_url

string

The url you want to return to.

{
    "session_key": "TOA-3DFDC8Z64V",
    "status": "IDLE",
    "active": true,
    "redirect_url": "paveapp://",
    "start_date": "September 17th, 2021"
}

Launch PAVE Capture UI

https://api.paveapi.com/v1/launch/:SESSION-ID

Once you have the Session Key generated it can be used to launch the capture UI, which begins the inspection process.

Replace: SESSION-ID with the generated session-id belonging to the vehicle to be inspected.

Example:

https://api.paveapi.com/v1/launch/TMV-B0R97T5QOD/

Open links with Safari or chrome.

Android

String url = "https://api.paveapi.com/v1/launch/TMV-B0R97T5QOD/";
try {
    Uri uri = Uri.parse("googlechrome://navigate?url=" + url);
    Intent i = new Intent(Intent.ACTION_VIEW, uri);
    i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(i);
} catch (ActivityNotFoundException e) {
    // Chrome is probably not installed
}

IOS

guard let url = URL(string: "https://api.paveapi.com/v1/launch/TMV-B0R97T5QOD/") 
else { return }
UIApplication.shared.open(url)

React Native

Linking.openURL('https://api.paveapi.com/v1/launch/TMV-B0R97T5QOD/')}}

Result

After PAVE Capture successfully and tap on CLOSE button, you will redirect to your app.

Last updated

Was this helpful?