jkeen / tracking_number_data Goto Github PK
View Code? Open in Web Editor NEWShared data for cross platform tracking number detection
License: MIT License
Shared data for cross platform tracking number detection
License: MIT License
Hi guys,
Great gem! We found out that the new DHL ecommerce format isn't supported, example:
It seems like they all start with GM (in our case) but apparently they can have different starts: http://parcelsapp.com/en/carriers/dhl-ecommerce
Canada Post uses tracking numbers that are 16 numeric digits (ex 0073938000549297
) -- this tracking gem reports this as an invalid tracking number, which is incorrect.
DPD has mod_37_36
as the validation algorithm for the check digit. It's not referenced in https://github.com/jkeen/tracking_number_data/blob/main/CHECKSUM_ALGORITHMS.md Do you have a source for how it is generated?
Hi, I've found a real OnTrac number, https://www.ontrac.com/trackingres.asp?tracking_number=C12340740337674
I tried the mod10 with 1,2 multipliers and the 4 prefix, but it doesn't seem to work
Hey! Congralations for this great gem, you did an awesome job!
I found an ontrac tracking number that is not detected by the gem:
D10011326755777
I've tested others starting with D
and they don't work either.
what do you think?
There are UPS tracking numbers that look like this K1506235620
.
Expected behaviour:
TrackingNumber.new('K1506235620').carrier
=> :ups
Actual behaviour:
TrackingNumber.new('K1506235620').carrier
=> :unknown
version used: 1.0.5
I see support for DHL eCommerce here, but the DHL eCommerce tracking numbers we're getting from Shippo are 30 characters long and start with 420
.
Examples:
420902459261290336128704042634
420941179261290336128704062441
420926029261290336128704067248
420902729261290336128704124163
420950549261290336128704133837
420193809261290336128704280838
420900469261290336128704216936
I can't find any documentation for this tracking number pattern. Have you seen these before?
Thanks!
I have a few number from UPS Mail Innovations which just started coming into my app and being labelled unknown
They are 18 digits, all numbers, and so far have this format 801184************ but it could just be a simple id counter (which seems likely) so the first few digits are likely irrelevant
According to this stack overflow answer, (https://stackoverflow.com/questions/38188373/how-to-distinguish-ups-mail-innovations-from-usps-tracking-number) they can't be distinguished from USPS, so this might be strictly impossible.
The tracking number in the above question has 26 digits though, so the system seems to have changed since then. Either that or there are multiple options:
Q. | What number do I use to track my mail piece?
A. | You can use the Package ID, Tracking number, or Delivery Confirmation Number.
I'll send a message to UPS and see if there are any consistencies that would make this doable. Any advice is welcome
Hi,
I have some Amazon logistics tracking numbers which seems to not be matched by the regexes from this repo. I am in Europe (Paris), so not sure if this is different here or not.
I don't have many of them to confirm, but all of them I have so far are made of the letter C followed by 11 digits. Are you familiar with such tracking numbers?
Thanks!
I found these tracking number formats for lasership:
Standard one:
10 chars: LX16641251
And others:
15 chars: 1LS713461643483
18 chars: 1LS7235012355811-1
20 chars: 1LS72301001401854622
21 chars: 1LS716317038000783263
and this documentation:
https://www.trackingex.com/lasership-tracking.html
TODO: figure out if there is a matching checkdigit algo for each pattern and add support for this.
I've raised a pull request to reference a go implementation for this data.
#94
Here are some examples of USPS tracking numbers that are received as FedEx instead of USPS
{
"name": "FedEx SmartPost",
"trackingUrl": "https://www.fedex.com/apps/fedextrack/?tracknumbers=%s",
"description": "IMpb CO3 standard",
"trackingNumber": "9202090339598350198298",
"courier": {
"name": "FedEx",
"code": "fedex"
}
}
Actually, it matches the USPS tracking numbers, but also matches FedEx, and since FedEx is prior in the checklist it results in FedEx output
Here are some USPS tracking numbers:
9202090339598352279018
9202090339598352366718
9201990153540214710128
9202090339598351457004
9202090339598350916519
9202090339598350819421
9202090339598350198298
I think after #8 and #9 are merged in, we should create a 1.0.0
release, tag it as such, and then from that point forward release updates in the semver format where patches are bug fixes to existing logic, minor releases are additions of new tracking number types or additional information that might require clients to be modified slightly, and a major release would be something so significant it's sure to cause compatibility problems for clients (let's not do that for a long time).
Then the clients can pin themselves to a version tag.
I'm pretty close to releasing the new tracking_number
which supports this library.
Sound good to you @adgaudio?
please see the link below
What is a Tracking Number?
Share
UPS tracking numbers appear in the following formats:
1Z9999999999999999
999999999999
T9999999999
999999999
https://www.ups.com/ca/en/help-center/sri/tracking-number.page
Hello! I created a python library that uses the data from this repo. Great work on this, and great idea to use a language-agnostic approach.
Hi
Love this gem, it's working really well for us tracking UPS in the UK. We've just started shipping in Germany using Deutsche Post DHL. All of the tracking numbers we have are 20 Digits long and seem to start with the digits 00340434
Does anyone have any idea about the format of these tracking numbers ? I'd like to try and help to add support but I can't find if there is any further information embedded.
Two of the valid tracking numbers for USPS 20 test numbers start with a "03" which is the Service Type; however under additional
there is no "03" in the lookup
array for the Service Type. Are these then bad examples, or is it not actually required there's a match to be valid?
Thanks!
Hi!
https://www.dhl.com/us-en/home/tracking/id-labels.html
I was looking at this package, and I noticed that the DHL formats do not support DHL's documentation.
We are using this code with success for many of the carriers included. However, we have run into another carrier that is popular in Europe.
Dynamic Parcel Distribution (DPD) is the second largest company in the parcel and express logistics sector in Germany, second only to Deutsche Post subsidiary DHL. The company is a subsidiary of GeoPost S.A., an international parcel and logistics provider owned by French company La Poste.
In some googling this might be helpful
https://www.trackingmore.com/tracking-status-detail-en-259.html
Is it possible to get new carriers added? and whats the process for that? Not sure how active this project is.
Super nit pick, but lots of the fed ex links are dead.
I was able to find this one on web.archive.org and will update this with any additional ones I find.
http://images.fedex.com/us/solutions/ppe/FedEx_Ground_Label_Layout_Specification.pdf => https://web.archive.org/web/20211007110607/http://images.fedex.com/us/solutions/ppe/FedEx_Ground_Label_Layout_Specification.pdf
Originally documented in this issue on tracking_number
, a tracking number 9274890103422546330271
was labeled as [FedExSmartPost, USPS91] but it was actually shipped with UPS and delivered via USPS.
Another tracking number 9261290172376608200214
was labeled as [FedExSmartPost, USPS91] but it was actually shipped with OSM, delivered via USPS.
Reason this is needed: needed to query the correct shipper's website.
Findings so far:
I think it has something to do with the SCNC portion of the tracking number.
This document says SCNC 11, 12, and 13 identify a Fedex ground tracking number, and the two numbers @vimagick specified
From the other tracking numbers I've been able to find in my email it seems like a pretty good bet that SCNC=74 means sent by UPS, but a variety of other numbers that are not OSM have SCNC=61, so not sure exactly what that one means and can't seem to find a list to look these up in.
A UPS SurePost number, however, looks like a UPS number but has YW
for the ServiceType, even though it's delivered by USPS.
Landmark Global tracking starts with LTN and ends with N1, but doesn't seem to have much else of a pattern.
Here is a few examples:
LTN74207623N1
LTN74209518N1
LTN74224021N1
So i've been looking over some barcode tracking numbers and had a client say that they weren't being registered as fedex on theses 32 char barcodes for Fedex.
after doing some looking i'm thinking this fits into the ASTRA (legacy Barcode)
so I began breaking them into chunks and kinda trying to dive into what could be the identifiers
Not sure where to go from here, it's enough for me to make some regex but i'd like to understand whats going on here but so far I got (3 Zipcode ### 60##### trackingnumber ####)
Hi, the gem is identifying this valid FedEx tracking number 5096672442
as DHL. FedEx does generate 10 digit tracking numbers just like DHL. I don't quite know how to distinguish the two without making a call to the FedEx API. Nonetheless, it seems the DHL and FedEx JSON files should be updated?
Thanks for this great gem btw!
Hi @jkeen , currently the "CheckDigit" regex part in couriers/ups.json is
"(?<CheckDigit>[A-Z0-9]\\s*)"
but it is meant to be always a digit, so perhaps it can be made more restrictive as only digits, like this ?
"(?<CheckDigit>[0-9]\\s*)"
Apparently, we don't capture numbers like this one:
4201028212169270490119521303389129
Need to look into it.
I made a new library using this data if you want to link to it. Thank you for supplying this!
Came across a few of the 34 digit fedex barcodes that begin with 101 and 102. Having a look at the regexs, it appears that they must start with 100 to be accepted, is this correct?
tracking_number_data/couriers/fedex.json
Line 46 in 5212dd1
Here is one: 1027590111820004833500785458233610
I've found 101 and 102, not sure if there are more. Would you accept a PR to accept 10[0-9] ?
9274890103422546330271 was labeled as [FedExSmartPost, USPS91].
Actually, it was shipped with UPS, delivered via USPS.
9261290172376608200214 was labeled as [FedExSmartPost, USPS91].
Actually, it was shipped with OSM, delivered via USPS.
Basically, UPS/OSM/FedExSmartPost using the same format when they work with USPS.
Is it possible to distinguish?
Thanks
Please can you add support for Yodel in the UK?
Typically Yodel tracking numbers start with either JD or JJD followed by digits of varying length, but can take other formats depending on the source into the Yodel network.
https://www.yodel.co.uk/help-centre/what-is-my-tracking-number
Typical tracking ID formats (covers 99% of use-cases):
JJD0002123456789012
JD0002123456789012
Other potential tracking ID formats (possibly add these at a later date)
8YDR098765432
0980982.1
Tracking links are based on the tracking ID and the ZIPCODE:
https://www.yodel.co.uk/tracking/ + TRACKING_ID + / + ZIPCODE
e.g.
https://www.yodel.co.uk/tracking/JD0002123456789012/BN19AB
Some other examples here:
https://www.trackingmore.com/tracking-status-detail-en-260.html
I'm writing a Python version of tracking_number that uses these JSON files, but I found that the "invalid" S10 tracking number on line 29 of s10.json is actually valid. The number is RB123456785XX.
Using the function 'validates_s10?' lifted directly from the original Ruby implementation, it agrees: the number is correct and the checksum passes.
I was looking at some Amazon Logistics tracking numbers but don't have access to the "my orders" page on Amazon. Do you have any idea which one is the tracking number, and how should we parse them?
I scanned the barcodes on an Amazon Logistics package label and found these:
big barcode towards top of label:
SNDI9xDHq4_001_v
2D barcode on right side of label:
{"cids": {"pkey": "170628125122107217782010201AZ"}}
2D barcode on left side of label:
TBA333656997000
Barcode at bottom of label. The barcode's contents are written underneath the label, and centered-aligned under the barcode.
TBA333656997000
I also see the text written between the big barcode and left 2d barcode:
DNI9xDHq4/q/second/1 of 1/9178604518/115
I think the TBA number is the correct one, but haven't figured out its check sum yet. Thoughts? I'd very much like to add support for this, as we have thousands of these packages.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.