Search
K

Deep Linking

(Updated 5/1/2023)

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 Session

Create a new session for every User by generating a session_key.
post
https://openapi.paveapi.com/v1/sessions
Create New Session

Sample Request

{
"vehicle": {
"vin":"JN1CV6AR9BMXXXXXX",
"year":"2011",
"make":"Infiniti",
"model":"G37",
"body_type":"Sedan",
"trim":"Luxury",
"transmission":"Automatic",
"ext_col":"Malbec Black",
"int_col":"Wheat",
"odom_reading":330477,
"odom_unit":"KILOMETRES"
},
"session": {
"theme": "LITE",
"redirect_url": "https://www.url-to-redirect-user-to.com",
"client_id": "SOUTH234889"
},
"sms": {
"to": "647-455-XXXX",
"to_name": "Jane Smith",
"from": "647-422-XXXX",
"by": "Steve Test Dealer"
}
}
The redirect_url is the handoff URL that we will send your User to at the end of their PAVE session to continue their journey on your application or website. So if you want to use redirect link, you have to send it to us.
Please, read the Create Session document for more information.

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

Java
Kotlin
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
}
val url = "https://capture-dev.paveapi.com/home/TMV-B0R97T5QOD/"
try {
val uri: Uri = Uri.parse("googlechrome://navigate?url=$url")
val i = Intent(Intent.ACTION_VIEW, uri)
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
startActivity(i)
} catch (e: ActivityNotFoundException) {
// Chrome is probably not installed
}

IOS

Swift
Objective C
guard let url = URL(string: "https://api.paveapi.com/v1/launch/TMV-B0R97T5QOD/")
else { return }
UIApplication.shared.open(url)
NSURL *url = [NSURL URLWithString:@"https://capture-dev.paveapi.com/home/TMV-B0R97T5QOD/"];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL: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.