NuxtJS web app available at https://pretavoyager.sncf.com/ for scanning a COVID certificate and associating it with an SNCF train ticket. (Previously called voyagezen.sncf.com
)
Base URL: https://pretavoyager.sncf.com/api
Called after ticket scanned to check if the ticket has already been scanned with the web app
POST /ticketexists
ticket_string
: string
- Train ticket QRCode contents{
"ticket_string":"i0CVSTISEN173300014121111/04/1992FRPBEFRCFE0598312/040029090164110984659 DUPONT JEAN2JR110 00000"
}
[
{
"validite": 1,
"num_dossier_voy": "STISEN",
"nom_client": "DUPONT",
"prenom_client": "JEAN",
"date_naissance": "1992-04-11T00:00:00.000Z",
"date_voyage_segment_1": "2021-04-12T00:00:00.000Z",
"num_train_segment_1": "05983",
"origine_segment_1": "FRPBE",
"destination_segment_1": "FRCFE",
"num_train_segment_2": "00000",
"origine_segment_2": null,
"destination_segment_2": null,
"type_train": "sncf",
"ticket_string": "i0CVSTISEN173300014121111/04/1992FRPBEFRCFE0598312/040029090164110984659 DUPONT JEAN2JR110 00000"
}
]
Called after COVID certificate scanned and consent provided by the user
POST /checkpassticket
ticket
: Decoded train ticket QRCode contents
format_id
: string
(Example: i
)code_pectab
: string
(Example: 0
)code_titre
: string
(Example: CV
)num_dossier_voy
: string
- Trip dossier identifier (Example: STISEN
)num_comptable_emmission
: “E-Billet” number string
- (Example: 173300014
)ind_specimen
: string
(Example: 1
)version_code_barre
: string
(Example: 2
)num_chainage
string
(Example: 11
)date_naissance
: string
- Traveler birth date - Format: DD/MM/YYYY
(Example: 11/04/1992
)origine_segment_1
: string
- UN/LOCODE Departure destination for first trip segment (Example: FRPBE
for Paris Bercy)destination_segment_1
: string
- UN/LOCODE Arrival destination for first trip segment (Example: FRCFE
for Clermont-Ferrand)num_train_segment_1
: string
- Train number for first trip segment (Example: 05983
)date_voyage_segment_1
: string
- Departure date for first trip segment - Format: DD/MM
(Example: 12/04
)mrc_client
: string
- SNCF Client number (Example: 0029090164110984659
)nom_client
: string
- Traveler last name (Example: DUPONT
)prenom_client
: string
- Traveler first name (Example: JEAN
)classe_physique_segment_1
: string
(Example: 0
)code_tarif_reduc
: string
(Example: JR11
)origine_segment_2
: string
- UN/LOCODE Departure destination for second trip segmentdestination_segment_2
: string
- UN/LOCODE Arrival destination for second trip segmentnum_train_segment_2
: string
- Train number for second trip segment (Example: 00000
)type_train
: string
- sncf
/ ouigo
ticket_string
: Train ticket QRCode contentspass
:
valid
: boolean
- Whether pass is valid or notvalidBirthDate
: boolean
- Indicates if the birth date obtained from the COVID certificate matches traveler’s birth date from the train ticketfirstName
: string
- Person’s first name (Example: JEAN
)lastName
: string
- Person’s last name (Example: DUPONT
)string
: string
- First 10 characters of COVID Certificate (Example: HC1:6BFOXN
) + person’s initials (Example: JD
) - (Example: HC1:6BFOXNJD
)certificate_id
: string
- European DCC UVCI (Example: urn:uvci:01:FR:R7DTBHHGBFUT#7
)key
: string
- Base64 encoded key - see “Generating key
” (Example: U1RJU0VOSEMxOjZCRk9YTnVybjp1dmNpOjAxOkZSOlI3RFRCSEhHQkZVVCM3
){
"ticket": {
"format_id": "i",
"code_pectab": "0",
"code_titre": "CV",
"num_dossier_voy": "STISEN",
"num_comptable_emmission": "173300014",
"ind_specimen": "1",
"version_code_barre": "2",
"num_chainage": "11",
"date_naissance": "11/04/1992",
"origine_segment_1": "FRPBE",
"destination_segment_1": "FRCFE",
"num_train_segment_1": "05983",
"date_voyage_segment_1": "12/04",
"mrc_client": "0029090164110984659",
"nom_client": "DUPONT",
"prenom_client": "JEAN",
"classe_physique_segment_1": "0",
"code_tarif_reduc": "JR11",
"origine_segment_2": "",
"destination_segment_2": "",
"num_train_segment_2": "00000",
"type_train": "sncf"
},
"ticket_string": "i0CVSTISEN173300014121111/04/1992FRPBEFRCFE0598312/040029090164110984659 DUPONT JEAN2JR110 00000",
"pass": {
"valid": true,
"validBirthdate": true,
"firstname": "JEAN",
"lastname": "DUPONT",
"string": "HC1:6BFOXNJD",
"certificate_id": "urn:uvci:01:FR:R7DTBHHGBFUT#7"
},
"key": "U1RJU0VOSEMxOjZCRk9YTnVybjp1dmNpOjAxOkZSOlI3RFRCSEhHQkZVVCM3"
}
{
"valid": true
}
Uses the server to decode / decrypt OuiGo train tickets
POST /decodeouigo
encryptedDataB64
: string
- OuiGo QRCode contents{
"encryptedDataB64": "0fItRk7MFJRfSpwtZYUXzloK1ghS4F+KEQx8hdAeOhfcTQ2YPR+YINCCl6BDK/ZeklLwKPGAdsTn3UcBRzGhMHcJmSowVUiFHq1rU0Z+E7nFUbOWZvsUYnCl4rtIqCQEziTpylHDtcEALWOkXx9gOzD4IEZ/k2ghhLophHwlGpoE3hvPOIuPmrs47qymD2NVn"
}
{
"nom_client": "Martin",
"prenom_client": "Pierre",
"date_naissance": "01/01/1973",
"num_train_segment_1": "6271",
"origine_segment_1": "MLV",
"destination_segment_1": "MSC",
"num_dossier_voy": "VBMN8K",
"date_voyage_segment_1": "29/10/2012",
"type_train": "ouigo"
}
Allows retrieving information of a previously scanned ticket from the server
POST /retrieveinfo
numDossier
: string
- Trip dossier identifier (Example: STISEN
)nomClient
: string
- Traveler’s last name (Example: DUPONT
){
"numDossier": "STISEN",
"nomClient": "DUPONT"
}
[{
"validite": 1,
"num_dossier_voy": "STISEN",
"nom_client": "DUPONT",
"prenom_client": "JEAN",
"date_naissance": "1992-04-11T00:00:00.000Z",
"date_voyage_segment_1": "2021-04-12T00:00:00.000Z",
"num_train_segment_1": "05983",
"origine_segment_1": "FRPBE",
"destination_segment_1": "FRCFE",
"num_train_segment_2": "00000",
"origine_segment_2": null,
"destination_segment_2": null,
"type_train": "sncf",
"ticket_string": "i0CVSTISEN173300014121111/04/1992FRPBEFRCFE0598312/040029090164110984659 DUPONT JEAN2JR110 00000"
}]
key
Format: [TICKET_TRIP_IDENTIFIER][PASS_STRING][PASS_UVCI]
TICKET_TRIP_IDENTIFIER
: Trip dossier identifier - ticket.num_dossier_voy
(Example: STISEN
)PASS_STRING
: First 10 characters of scanned COVID Certificate document (Example: HC1:6BFOXN
for European DCC - DC04FR03AV
for French 2D-Doc)PASS_UVCI
: European DCC UVCI - pass.certificate_id
(Example: urn:uvci:01:FR:R7DTBHHGBFUT#7
for European DCC - undefined
for French 2D-Doc)Example: STISENHC1:6BFOXNurn:uvci:01:FR:R7DTBHHGBFUT#7
Encode the string with Base64: U1RJU0VOSEMxOjZCRk9YTnVybjp1dmNpOjAxOkZSOlI3RFRCSEhHQkZVVCM3
Example: STISENDC04FR03AVundefined
Encode the string with Base64: U1RJU0VOREMwNEZSMDNBVnVuZGVmaW5lZA==