SNCF - Prêt à Voyager (pretavoyager.sncf.com)

About

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)

Screenshots

API

Base URL: https://pretavoyager.sncf.com/api

ticketexists - Check if SNCF ticket has already been scanned

Called after ticket scanned to check if the ticket has already been scanned with the web app

POST /ticketexists

Request

{
    "ticket_string":"i0CVSTISEN173300014121111/04/1992FRPBEFRCFE0598312/040029090164110984659            DUPONT          JEAN2JR110          00000"
}

Reponse

[
  {
    "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"
  }
]

checkpassticket - Add COVID Certificate to SNCF ticket

Called after COVID certificate scanned and consent provided by the user

POST /checkpassticket

Request

{
	"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"
}

Response

{
  "valid": true
}

decodeouigo - Decode SNCF OuiGo Ticket

Uses the server to decode / decrypt OuiGo train tickets

POST /decodeouigo

Request

{
    "encryptedDataB64": "0fItRk7MFJRfSpwtZYUXzloK1ghS4F+KEQx8hdAeOhfcTQ2YPR+YINCCl6BDK/ZeklLwKPGAdsTn3UcBRzGhMHcJmSowVUiFHq1rU0Z+E7nFUbOWZvsUYnCl4rtIqCQEziTpylHDtcEALWOkXx9gOzD4IEZ/k2ghhLophHwlGpoE3hvPOIuPmrs47qymD2NVn"
}

Response

{
  "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"
}

retrieveinfo - Retrieve info

Allows retrieving information of a previously scanned ticket from the server

POST /retrieveinfo

Request

{
    "numDossier": "STISEN",
    "nomClient": "DUPONT"
}

Response

[{
	"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"
}]

Generating key

Format: [TICKET_TRIP_IDENTIFIER][PASS_STRING][PASS_UVCI]

European DCC Example

Example: STISENHC1:6BFOXNurn:uvci:01:FR:R7DTBHHGBFUT#7

Encode the string with Base64: U1RJU0VOSEMxOjZCRk9YTnVybjp1dmNpOjAxOkZSOlI3RFRCSEhHQkZVVCM3

French 2D-Doc Example

Example: STISENDC04FR03AVundefined

Encode the string with Base64: U1RJU0VOREMwNEZSMDNBVnVuZGVmaW5lZA==

App Pages