Create Self Inspection Token Example
Create Self Inspection SSO Token
POST
https://alto.tchek.fr/apiV1/tokenmanager/token
Please ensure you set the headers as:
'Content-Type': 'application/json',
'X-api-key': 'The API key provided when signing up. E.g. XXXXXXXee2a01385c01618a98c8feb469e8a55fffec7ed20ee6XXXXXXX'
curl --location --request POST 'https://alto.tchek.fr/apiV1/tokenmanager/token' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"options":{
"shootInspect":true,
"fastTrack":false,
"cost":false,
"report":false,
"downloadRoi":false
},
"tradeIn":{
"tradeinVehicle":true,
"immat":"AB123CD",
"vin":"ABCDEFG1234567890",
"sendingType":0
},
"customer":{
"clientType":"customer",
"email":"xx@xxx.com",
"firstname":"xxxxx",
"lastname":"xxxxx",
"gender": null,
"phone":"0033600000000",
"locale":"fr"
},
"creatorUserId": null,
"validity":90
}'
Response
This is an example of the response for future reference: {
"token": {
"expired": false,
"id": "nFhCfsiXXX",
"createdAt": "2023-11-17T07:38:53.784Z",
"updatedAt": "2023-11-17T07:38:53.784Z",
"tradeinVehicle": true,
"tradeinStatus": 0,
"tradeinStatusUpdatedAt": "2023-11-17T07:38:52.376Z",
"sendingType": 0,
"vehiclePtr": {
"id": "2StYBQcBXX"
},
"uid": "T9641XX",
"expiresIn": "2023-12-17T07:38:52.376Z",
"options": {
"fastTrack": false,
"shootInspect": true,
"cost": false,
"report": false,
"downloadRoi": false,
"loadTchek": true
},
"APITokenPtr": {
"id": "lMIgFNyXXX"
}
},
"webApiVersion": "v2.5"
}
options.shootInspect
boolean
true
Whether the customer must take the pictures themselves
options.fastTrack
boolean
false
Setting fastTrack to true or false in the options object will define whether the final user must do the damage validation after taking the pictures (true), or if the damages are reviewed by your team or by Tchek (false).
options.cost
boolean
false
Must always be false
for self-inspection tokens
options.report
boolean
false
Must always be false
for self-inspection tokens
options.downloadRoi
boolean
false
Must always be false
for self-inspections
tradeIn.tradeinVehicle
boolean
true
Must be true
(required)
tradeIn.immat
string
"AB123CD"
(Optional) The vehicle's License plate number
tradeIn.vin
string
"ABCDEFG1234567890"
(Optional) The vehicle's 17-character Vehicle Identification Number
tradeIn.sendingType
number
0
Required, defines if and how a message is sent (see reference below)
customer.clientType
string
"customer"
Required; must be "customer"
customer.email
string
"user@example.com"
Required; customer’s email. See reference below
customer.firstname
string
"John"
Required; customer’s first name. See reference below
customer.lastname
string
"Doe"
Required; customer’s last name. See reference below
customer.gender
string
"men"
Optional; "men"
, "women"
, or null
customer.phone
string
"0033612345678"
Required; must include country code. See reference below
customer.locale
string
"fr"
Required; customer language code.
Available languages:
- en
,for English,
- fr
,for French,
- de
for German,
- nl-BE
for Dutch,
- it
for Italian,
- es
for Spanish,
- sv
for Swedish,
- no
for Norwegian.
creatorUserId
string
""
Optional; ID of the back-office user who created the lead
validity
number
90
Required; number of days before the token expires
sendingType
Value
Description
0
Send token to the customer by email
1
Send token to the customer by SMS
2
Send token to the customer by both SMS & email
null
Create the token without sending a message
Please consider that we’ll need to set up any message templates during your onboarding for you before option 0, 1 and 2 can work.
Directing your customer to the inspection
Upon creating the Self-inspection SSO token, you can directly redirect the user to the Shoot inspect widget to start the photo shooting by generating yourself the URL to the inspection, such as: https://webapp.tchek.fr/fr/services/[token uid]
Where:
The environment can be either https://webapp.tchek.fr (if you created the token by calling the Production environment API URL) or https://preprod.webapp.tchek.fr (for Pre-Production environment). See this article: https://tchek.gitbook.io/documentation/environments
The language of the interface can be English (en), French (fr), German (de), Dutch (nl-E), Spanish (es), Italian (it), Swedish (sv) or Norwegian (no) and should match the language of the client
The token uid is the unique ID received upon the creation of the self inspection token.
customer
The customer object provides information on the person that will perform the Self inspection. Actual customer information is only required if you:
wish us to send them emails or SMS automatically for different events during their inspection;
if you want to monitor the inspection progress via our Hub;
and if you want their information to be retrieved in the final inspection report.
Otherwise, you MUST fill the fields with placeholders, like so:
"customer": {
"clientType": customer,
"email": xx@xx.com,
"firstname": XXX,
"gender": null,
"lastname": XXX,
"phone": 0033600000000,
"locale": "en"
}
locale
The locale is the language of the customer.
Available languages: en for English, fr for French, de for German, nl-BE for Dutch, it for Italian, es for Spanish, sv for Swedish, no for Norwegian. The WebApp interface will be localized according to this parameter.
Changing the locale in the URL while on the self inspection will display the interface in the relevant language.
Setting up your customer inspection
The flow your customer will go through can be largely customized both in terms of look&feel (onboarding and onboarding screens, masks color) or in the level of information to be provided (number of pictures, additional questions). We will help setting up your customized flow when signing up.
Last updated
Was this helpful?