Un billet de train pour les opérateurs ferroviaires, les compagnies de bus et les agences de voyage. Il s’imprime à taille réelle avec les deux gares, les horaires et la durée, la date, le train, la voiture, la place et la classe, une ligne de trajet retour facultative et un talon avec le QR code scanné à bord, avec des offres de partenaires pour une location de voiture et un hôtel à destination, des options et une bannière de carte de réduction qui remplissent le reste de la page. Téléchargez le fichier Word pour l’adapter à votre opérateur, puis générez un billet pour chaque passager.
Importez le modèle, puis envoyez les données structurées pour générer votre billet. Remplacez YOUR_API_KEY par votre clé unique et YOUR_TEMPLATE_ID par l'ID de votre modèle.
Envoyez un tableau d'objets JSON et recevez un document par objet, dans une archive ZIP. Utilisez le paramètre output_name pour nommer chaque fichier avec les balises de fusion de votre modèle.
Importez un tableur Excel et chaque ligne devient un document, les en-têtes de colonnes correspondant à vos balises de fusion. Utilisez le paramètre sheet pour lire une feuille précise du fichier Excel.
curl -X 'POST' \
'https://api.docugenerate.com/v1/document' \
-H 'Accept: application/json' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"template_id": "YOUR_TEMPLATE_ID",
"output_format": ".pdf",
"data": {
"operator": "Meridian Rail",
"ticket_type": "Return ticket",
"from_station": "Boston South Station",
"to_station": "New York Penn Station",
"departure_time": "8:10 AM",
"arrival_time": "12:25 PM",
"duration": "4 h 15 min",
"travel_date": "Jun 12, 2027",
"train_number": "2100",
"coach": "A",
"seat": "10",
"travel_class": "Standard",
"return_journey": true,
"return_date": "Jun 14, 2027",
"return_departure": "5:30 PM",
"return_arrival": "9:45 PM",
"return_train": "2108",
"ticket_code": "MR-2027-1000-Q7XK2",
"ticket_number": "MR-5400120",
"passenger": "Emily Carter",
"passengers": "1 adult",
"booking_reference": "R487Z",
"fare": "$98.00",
"purchase_date": "Jun 1, 2027",
"car_partner": "Roadrunner Car Rental",
"to_city": "New York",
"car_title": "Car rental in New York",
"car_detail": "Pick up a few steps from the station and drop off anywhere in the city. Free cancellation up to 24 hours before.",
"car_price": "$31",
"car_unit": "a day",
"car_code": "RAIL20CAR",
"car_save": "10%",
"hotel_partner": "Hotel Meridian",
"hotel_title": "Stay in New York",
"hotel_detail": "A short walk from the station, with breakfast included and free Wi-Fi. Pay at the hotel and change your dates for free.",
"hotel_price": "$109",
"hotel_unit": "a night",
"hotel_code": "RAIL20STAY",
"hotel_save": "12%"
}
}' curl -X 'POST' \
'https://api.docugenerate.com/v1/document' \
-H 'Accept: application/json' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"template_id": "YOUR_TEMPLATE_ID",
"output_format": ".pdf",
"single_file": false,
"output_name": "Train Ticket [ticket_number]",
"data": [
{ "operator": "Meridian Rail", "ticket_type": "Return ticket", "from_station": "Boston South Station", "to_station": "New York Penn Station", "departure_time": "8:10 AM", "arrival_time": "12:25 PM", "duration": "4 h 15 min", "travel_date": "Jun 12, 2027", "train_number": "2100", "coach": "A", "seat": "10", "travel_class": "Standard", "return_journey": true, "return_date": "Jun 14, 2027", "return_departure": "5:30 PM", "return_arrival": "9:45 PM", "return_train": "2108", "ticket_code": "MR-2027-1000-Q7XK2", "ticket_number": "MR-5400120", "passenger": "Emily Carter", "passengers": "1 adult", "booking_reference": "R487Z", "fare": "$98.00", "purchase_date": "Jun 1, 2027", "car_partner": "Roadrunner Car Rental", "to_city": "New York", "car_title": "Car rental in New York", "car_detail": "Pick up a few steps from the station and drop off anywhere in the city. Free cancellation up to 24 hours before.", "car_price": "$31", "car_unit": "a day", "car_code": "RAIL20CAR", "car_save": "10%", "hotel_partner": "Hotel Meridian", "hotel_title": "Stay in New York", "hotel_detail": "A short walk from the station, with breakfast included and free Wi-Fi. Pay at the hotel and change your dates for free.", "hotel_price": "$109", "hotel_unit": "a night", "hotel_code": "RAIL20STAY", "hotel_save": "12%" },
{ "operator": "Meridian Rail", "ticket_type": "Single ticket", "from_station": "Chicago Union Station", "to_station": "Milwaukee", "departure_time": "9:05 AM", "arrival_time": "10:30 AM", "duration": "1 h 25 min", "travel_date": "Jun 13, 2027", "train_number": "2117", "coach": "C", "seat": "17", "travel_class": "First", "return_journey": false, "return_date": "Jun 15, 2027", "return_departure": "5:30 PM", "return_arrival": "9:45 PM", "return_train": "2125", "ticket_code": "MR-2027-1083-7XK2M", "ticket_number": "MR-5400173", "passenger": "Jonas Weber", "passengers": "1 adult", "booking_reference": "T488P", "fare": "$62.00", "purchase_date": "Jun 2, 2027", "car_partner": "Evergreen Rentals", "to_city": "Milwaukee", "car_title": "Car rental in Milwaukee", "car_detail": "Pick up a few steps from the station and drop off anywhere in the city. Free cancellation up to 24 hours before.", "car_price": "$37", "car_unit": "a day", "car_code": "RAIL21CAR", "car_save": "13%", "hotel_partner": "The Harborview", "hotel_title": "Stay in Milwaukee", "hotel_detail": "A short walk from the station, with breakfast included and free Wi-Fi. Pay at the hotel and change your dates for free.", "hotel_price": "$120", "hotel_unit": "a night", "hotel_code": "RAIL21STAY", "hotel_save": "17%" },
{ "operator": "Meridian Rail", "ticket_type": "Single ticket", "from_station": "Washington Union Station", "to_station": "Philadelphia 30th Street", "departure_time": "7:42 AM", "arrival_time": "9:55 AM", "duration": "2 h 13 min", "travel_date": "Jun 14, 2027", "train_number": "2134", "coach": "E", "seat": "24", "travel_class": "Standard", "return_journey": false, "return_date": "Jun 16, 2027", "return_departure": "5:30 PM", "return_arrival": "9:45 PM", "return_train": "2142", "ticket_code": "MR-2027-1166-XK2M9", "ticket_number": "MR-5400226", "passenger": "Priya Raman", "passengers": "1 adult", "booking_reference": "K489Z", "fare": "$38.00", "purchase_date": "Jun 3, 2027", "car_partner": "Skyway Cars", "to_city": "Philadelphia", "car_title": "Car rental in Philadelphia", "car_detail": "Pick up a few steps from the station and drop off anywhere in the city. Free cancellation up to 24 hours before.", "car_price": "$43", "car_unit": "a day", "car_code": "RAIL22CAR", "car_save": "16%", "hotel_partner": "Parkside Suites", "hotel_title": "Stay in Philadelphia", "hotel_detail": "A short walk from the station, with breakfast included and free Wi-Fi. Pay at the hotel and change your dates for free.", "hotel_price": "$131", "hotel_unit": "a night", "hotel_code": "RAIL22STAY", "hotel_save": "22%" },
{ "operator": "Meridian Rail", "ticket_type": "Return ticket", "from_station": "Portland", "to_station": "Seattle King Street", "departure_time": "8:30 AM", "arrival_time": "12:50 PM", "duration": "4 h 20 min", "travel_date": "Jun 15, 2027", "train_number": "2151", "coach": "A", "seat": "31", "travel_class": "Standard", "return_journey": true, "return_date": "Jun 17, 2027", "return_departure": "5:30 PM", "return_arrival": "9:45 PM", "return_train": "2159", "ticket_code": "MR-2027-1249-K2M9W", "ticket_number": "MR-5400279", "passenger": "Daniel Okafor", "passengers": "1 adult", "booking_reference": "M4810P", "fare": "$142.00", "purchase_date": "Jun 4, 2027", "car_partner": "Metro Drive", "to_city": "Seattle", "car_title": "Car rental in Seattle", "car_detail": "Pick up a few steps from the station and drop off anywhere in the city. Free cancellation up to 24 hours before.", "car_price": "$49", "car_unit": "a day", "car_code": "RAIL23CAR", "car_save": "19%", "hotel_partner": "Grand Plaza Inn", "hotel_title": "Stay in Seattle", "hotel_detail": "A short walk from the station, with breakfast included and free Wi-Fi. Pay at the hotel and change your dates for free.", "hotel_price": "$142", "hotel_unit": "a night", "hotel_code": "RAIL23STAY", "hotel_save": "13%" },
{ "operator": "Meridian Rail", "ticket_type": "Single ticket", "from_station": "Los Angeles Union Station", "to_station": "San Diego Santa Fe Depot", "departure_time": "10:15 AM", "arrival_time": "12:40 PM", "duration": "2 h 25 min", "travel_date": "Jun 16, 2027", "train_number": "2168", "coach": "C", "seat": "38", "travel_class": "First", "return_journey": false, "return_date": "Jun 18, 2027", "return_departure": "5:30 PM", "return_arrival": "9:45 PM", "return_train": "2176", "ticket_code": "MR-2027-1332-2M9WT", "ticket_number": "MR-5400332", "passenger": "Sofia Martinez", "passengers": "1 adult", "booking_reference": "X4811Z", "fare": "$55.00", "purchase_date": "Jun 5, 2027", "car_partner": "Roadrunner Car Rental", "to_city": "San Diego", "car_title": "Car rental in San Diego", "car_detail": "Pick up a few steps from the station and drop off anywhere in the city. Free cancellation up to 24 hours before.", "car_price": "$33", "car_unit": "a day", "car_code": "RAIL24CAR", "car_save": "11%", "hotel_partner": "Hotel Meridian", "hotel_title": "Stay in San Diego", "hotel_detail": "A short walk from the station, with breakfast included and free Wi-Fi. Pay at the hotel and change your dates for free.", "hotel_price": "$153", "hotel_unit": "a night", "hotel_code": "RAIL24STAY", "hotel_save": "18%" },
{ "operator": "Meridian Rail", "ticket_type": "Single ticket", "from_station": "New York Penn Station", "to_station": "Albany-Rensselaer", "departure_time": "1:05 PM", "arrival_time": "3:20 PM", "duration": "2 h 15 min", "travel_date": "Jun 17, 2027", "train_number": "2185", "coach": "E", "seat": "45", "travel_class": "Standard", "return_journey": false, "return_date": "Jun 19, 2027", "return_departure": "5:30 PM", "return_arrival": "9:45 PM", "return_train": "2193", "ticket_code": "MR-2027-1415-M9WTH", "ticket_number": "MR-5400385", "passenger": "Liam Chen", "passengers": "1 adult", "booking_reference": "Q4812P", "fare": "$44.00", "purchase_date": "Jun 6, 2027", "car_partner": "Evergreen Rentals", "to_city": "Albany", "car_title": "Car rental in Albany", "car_detail": "Pick up a few steps from the station and drop off anywhere in the city. Free cancellation up to 24 hours before.", "car_price": "$39", "car_unit": "a day", "car_code": "RAIL25CAR", "car_save": "14%", "hotel_partner": "The Harborview", "hotel_title": "Stay in Albany", "hotel_detail": "A short walk from the station, with breakfast included and free Wi-Fi. Pay at the hotel and change your dates for free.", "hotel_price": "$164", "hotel_unit": "a night", "hotel_code": "RAIL25STAY", "hotel_save": "23%" },
{ "operator": "Meridian Rail", "ticket_type": "Return ticket", "from_station": "Denver Union Station", "to_station": "Salt Lake City", "departure_time": "7:35 AM", "arrival_time": "5:10 PM", "duration": "9 h 35 min", "travel_date": "Jun 18, 2027", "train_number": "2202", "coach": "A", "seat": "52", "travel_class": "First", "return_journey": true, "return_date": "Jun 20, 2027", "return_departure": "5:30 PM", "return_arrival": "9:45 PM", "return_train": "2210", "ticket_code": "MR-2027-1498-9WTH", "ticket_number": "MR-5400438", "passenger": "Mia Nakamura", "passengers": "1 adult", "booking_reference": "R4813Z", "fare": "$178.00", "purchase_date": "Jun 7, 2027", "car_partner": "Skyway Cars", "to_city": "Salt Lake City", "car_title": "Car rental in Salt Lake City", "car_detail": "Pick up a few steps from the station and drop off anywhere in the city. Free cancellation up to 24 hours before.", "car_price": "$45", "car_unit": "a day", "car_code": "RAIL26CAR", "car_save": "17%", "hotel_partner": "Parkside Suites", "hotel_title": "Stay in Salt Lake City", "hotel_detail": "A short walk from the station, with breakfast included and free Wi-Fi. Pay at the hotel and change your dates for free.", "hotel_price": "$115", "hotel_unit": "a night", "hotel_code": "RAIL26STAY", "hotel_save": "14%" },
{ "operator": "Meridian Rail", "ticket_type": "Single ticket", "from_station": "Philadelphia 30th Street", "to_station": "Pittsburgh", "departure_time": "9:00 AM", "arrival_time": "1:45 PM", "duration": "4 h 45 min", "travel_date": "Jun 19, 2027", "train_number": "2219", "coach": "C", "seat": "59", "travel_class": "Standard", "return_journey": false, "return_date": "Jun 21, 2027", "return_departure": "5:30 PM", "return_arrival": "9:45 PM", "return_train": "2227", "ticket_code": "MR-2027-1581-WTH", "ticket_number": "MR-5400491", "passenger": "Noah Kowalski", "passengers": "1 adult", "booking_reference": "T4814P", "fare": "$58.00", "purchase_date": "Jun 8, 2027", "car_partner": "Metro Drive", "to_city": "Pittsburgh", "car_title": "Car rental in Pittsburgh", "car_detail": "Pick up a few steps from the station and drop off anywhere in the city. Free cancellation up to 24 hours before.", "car_price": "$51", "car_unit": "a day", "car_code": "RAIL27CAR", "car_save": "20%", "hotel_partner": "Grand Plaza Inn", "hotel_title": "Stay in Pittsburgh", "hotel_detail": "A short walk from the station, with breakfast included and free Wi-Fi. Pay at the hotel and change your dates for free.", "hotel_price": "$126", "hotel_unit": "a night", "hotel_code": "RAIL27STAY", "hotel_save": "19%" },
{ "operator": "Meridian Rail", "ticket_type": "Single ticket", "from_station": "San Jose Diridon", "to_station": "Sacramento", "departure_time": "6:55 AM", "arrival_time": "9:55 AM", "duration": "3 h 00 min", "travel_date": "Jun 20, 2027", "train_number": "2236", "coach": "E", "seat": "66", "travel_class": "Standard", "return_journey": false, "return_date": "Jun 22, 2027", "return_departure": "5:30 PM", "return_arrival": "9:45 PM", "return_train": "2244", "ticket_code": "MR-2027-1664-TH", "ticket_number": "MR-5400544", "passenger": "Ava Thompson", "passengers": "1 adult", "booking_reference": "K4815Z", "fare": "$36.00", "purchase_date": "Jun 9, 2027", "car_partner": "Roadrunner Car Rental", "to_city": "Sacramento", "car_title": "Car rental in Sacramento", "car_detail": "Pick up a few steps from the station and drop off anywhere in the city. Free cancellation up to 24 hours before.", "car_price": "$35", "car_unit": "a day", "car_code": "RAIL28CAR", "car_save": "12%", "hotel_partner": "Hotel Meridian", "hotel_title": "Stay in Sacramento", "hotel_detail": "A short walk from the station, with breakfast included and free Wi-Fi. Pay at the hotel and change your dates for free.", "hotel_price": "$137", "hotel_unit": "a night", "hotel_code": "RAIL28STAY", "hotel_save": "24%" },
{ "operator": "Meridian Rail", "ticket_type": "Return ticket", "from_station": "Raleigh", "to_station": "Charlotte", "departure_time": "11:20 AM", "arrival_time": "2:05 PM", "duration": "2 h 45 min", "travel_date": "Jun 21, 2027", "train_number": "2253", "coach": "A", "seat": "13", "travel_class": "First", "return_journey": true, "return_date": "Jun 23, 2027", "return_departure": "5:30 PM", "return_arrival": "9:45 PM", "return_train": "2261", "ticket_code": "MR-2027-1747-H", "ticket_number": "MR-5400597", "passenger": "Lucas Moreau", "passengers": "1 adult", "booking_reference": "M4816P", "fare": "$82.00", "purchase_date": "Jun 10, 2027", "car_partner": "Evergreen Rentals", "to_city": "Charlotte", "car_title": "Car rental in Charlotte", "car_detail": "Pick up a few steps from the station and drop off anywhere in the city. Free cancellation up to 24 hours before.", "car_price": "$41", "car_unit": "a day", "car_code": "RAIL29CAR", "car_save": "15%", "hotel_partner": "The Harborview", "hotel_title": "Stay in Charlotte", "hotel_detail": "A short walk from the station, with breakfast included and free Wi-Fi. Pay at the hotel and change your dates for free.", "hotel_price": "$148", "hotel_unit": "a night", "hotel_code": "RAIL29STAY", "hotel_save": "15%" }
]
}' curl -X 'POST' \
'https://api.docugenerate.com/v1/document' \
-H 'Accept: application/json' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: multipart/form-data' \
-F 'template_id=YOUR_TEMPLATE_ID' \
-F 'file=@Train Ticket Batch.xlsx' \
-F 'output_format=.pdf' \
-F 'single_file=false' \
-F 'output_name=Train Ticket [ticket_number]' Questions fréquentes sur nos modèles de billets
Démarrez avec 20 documents gratuits par mois et nos modèles de billets prêts à l'emploi.