USPS API-创建标签后,获取跟踪编号C# [英] USPS API - After creating labels retrieving Tracking Number C#

查看:188
本文介绍了USPS API-创建标签后,获取跟踪编号C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经能够成功使用USPS API创建运输标签.返回的XML给了我一个传递确认号,但是没有返回跟踪号.跟踪号是我真正需要的.我用过( https ://www.usps.com/business/web-tools-apis/delivery-confirmation-domestic-shipping-label-api.pdf )是成功创建标签的基础,但是没有地方它提到了如何获取跟踪号.

I have been able to successfully use the USPS API to create a shipping label. The XML returned gives me a Delivery Confirmation Number, but it does not return the tracking number. The tracking number is what I really need. I've used (https://www.usps.com/business/web-tools-apis/delivery-confirmation-domestic-shipping-label-api.pdf) as my base for how to successfully create the label, but no place does it mention how to get the tracking number.

跟踪号在标签中,该标签可以从XML输出中发送给您的base64代码创建.因此,为了解决我的问题,我试图将标签保存为图像文件,并使用OCR阅读器(均为MODI和Tesseract两者)读取跟踪号.那没有用.我收到的只是胡言乱语.

The tracking number is in the label that can be created from the base64 code that they send you in the XML output. So to try to get around my problem I tried to save the label as an image file and use an OCR reader (both MODI & Tesseract) to read the tracking number. That did not work. All I received was gibberish.

因此,我然后尝试将输出另存为PDF,并使用iTextSharp读取PDF.结果是它没有从文件中读取任何内容.

So then I tried to save the output as a PDF instead and use iTextSharp to read the PDF. The result was it did not read anything from the file.

所以现在我在砖墙上.我从USPS找不到任何API文档,该文档使我可以使用交付确认号"来检索跟踪号.我也找不到从base64编码的输出文件中读取跟踪号的OCR.

So now I'm at a brick wall. I cannot find any API documentation from USPS that would allow me to use the Delivery Confirmation Number to retrieve the tracking number. I also cannot find an OCR that will read the tracking number from the output files from the base64 encoding.

有没有人可能对此问题有解决方案?提前致谢.

Is there anyone out there that might have a solution to this problem? Thanks in advance.

推荐答案

事实证明,可以将通过XML返回的传递确认号用作跟踪号.只是在API创建的交货确认号出现在USPS网站上之前有一点滞后时间.

It turns out that the delivery confirmation number that is returned via the XML can be used as the tracking number. It's just that there was a little bit of lag time before the API created Delivery Confirmation Number appeared on the USPS website.

这篇关于USPS API-创建标签后,获取跟踪编号C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆