Train Ticket
This section describes how to build your custom OCR API to extract data from Train Tickets using docTI. A Train Ticket is a ticket issued by a railway operator that enables the bearer to travel on the operator's network or a partner's network
Prerequisites
You’ll need at least one Train Ticketor pdf to test your model once created.
Define your Train Ticket Use Case
Using the Train Ticket below, we’re going to define the fields we want to extract from it.
- Passenger Name: The full name of the passenger traveling (Jane Martin)
- Reservation Number: The reservation number of your train ticket (925D90)
- Departure Date: The date of departure
- Departure Station Code: The 3 letters identification code for your departure station (WAS)
- Arrival Station Code: The 3 letters identification code for your arrival station (NYP)
- Departure Time: The train departure time from the departure station (01:50 PM)
That’s it for this example. Feel free to add any other relevant data that fits your requirement.
Deploy your API
Once you have defined the list of fields you want to extract from your Train Ticket, head over to the platform and follow these steps:
- Log into your Mindee account. You'll land on the My APIs page.
- Click the docTI tab.
- Click the Create a new API button.
On the Set up your API section, fill in the required information. Give the API a name, a description (optional), and a cover image(optional) and click on Next.
Define Your Model
Click on the different fields to add them to your list
Using the interface, you can manually add each field for the data you are extracting. For this example, here are the different field configurations used:
Field Name | Field Type | Example |
---|---|---|
Passenger Name | String | John Doe Jane Doe |
Reservation Number | String | 925D90 |
Departure Date | Date (Extract Date value) | Sep 3, 2018 |
Departure Station Code | String | WAS |
Arrival Station Code | String | NYP |
Departure Time | Date (Extract Time value) | 1:50 PM |
Once you’re done setting up your data model, click the Create API button at the bottom of the screen.
You are now ready to test your API on the live interface.
Questions?
Join our Slack
Updated 8 months ago