You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用UPS无纸化发票API创建运单时标签显示KEY而非EDI求助

UPS运单标签显示KEY而非EDI标识问题

我通过UPS无纸化发票API上传发票,获取返回的DocumentID后用于创建运单,但生成的标签未显示EDI标识,反而显示KEY。已查阅UPS官方API文档,未找到相关细节说明。

以下是创建运单时发送的JSON请求:

{
    "ShipmentRequest": {
        "Request": {
            "SubVersion": "1801",
            "RequestOption": "nonvalidate",
            "TransactionReference": {
                "CustomerContext": "example"
            }
        },
        "Shipment": {
            "Description": "Example Product",
            "Shipper": {
                "Name": "From Compnay",
                "AttentionName": "From Provider",
                "Phone": {
                    "Number": "+491565665"
                },
                "ShipperNumber": "1233123",
                "Address": {
                    "AddressLine": ["Adddress 123"],
                    "City": "Munich",
                    "StateProvinceCode": ".",
                    "PostalCode": "10719",
                    "CountryCode": "DE"
                },
                "TaxIdentificationNumber": ""
            },
            "ShipTo": {
                "Name": "ship_company 165724",
                "AttentionName": "firstname ship_lastname 165724",
                "Phone": {
                    "Number": "1657241366"
                },
                "Address": {
                    "AddressLine": ["shipping street 165724", ""],
                    "City": "ship city 165724",
                    "StateProvinceCode": "TX",
                    "PostalCode": "75049",
                    "CountryCode": "US"
                }
            },
            "PaymentInformation": {
                "ShipmentCharge": {
                    "Type": "01",
                    "BillShipper": {
                        "AccountNumber": "132312"
                    }
                }
            },
            "Service": {
                "Code": "65",
                "Description": "WorldWide Saver"
            },
            "Package": {
                "PackageWeight": {
                    "Weight": "1.185",
                    "UnitOfMeasurement": {
                        "Description": "Kilogram",
                        "Code": "KGS"
                    }
                },
                "Dimensions": {
                    "Height": "10",
                    "Width": "25",
                    "Length": "25",
                    "UnitOfMeasurement": {
                        "Description": "Centimeters",
                        "Code": "CM"
                    }
                },
                "Packaging": {
                    "Description": "Product",
                    "Code": "02"
                },
                "Description": "Product Description",
                "ReferenceNumber": [
                    {
                        "Code": "02",
                        "Value": "Some reference"
                    },
                    {
                        "Code": "02",
                        "Value": "Some Reference"
                    }
                ]
            },
            "ShipmentServiceOptions": {
                "InternationalForms": {
                    "FormType": "01",
                    "AdditionalDocumentIndicator": "",
                    "UserCreatedForm": {
                        "DocumentID": "2013-12-04-00.15.33.207814"
                    },
                    "Product": [
                        {
                            "Description": "Product",
                            "Unit": {
                                "Number": "1",
                                "Value": "1",
                                "UnitOfMeasurement": {
                                    "Code": "KGS",
                                    "Description": "KG"
                                }
                            }
                        }
                    ],
                    "InvoiceNumber": "ASJHDYEUH28",
                    "InvoiceDate": "20130410",
                    "ReasonForExport": "SALE"
                }
            }
        },
        "LabelSpecification": {
            "LabelImageFormat": {
                "Code": "GIF",
                "Description": "Label"
            },
            "HTTPUserAgent": "Mozilla/4.5",
            "LabelStockSize": {
                "Height": "6",
                "Width": "4"
            },
            "LabelPrintMethod": {
                "Code": "GIF",
                "Description": "Label"
            }
        }
    }
}

其他用户遇到同类问题后的解决方案

  • 调整FormType值:部分用户将FormType从01改为09(对应EDI Commercial Invoice)后,标签正常显示EDI标识,建议核对UPS API中无纸化发票的FormType要求。
  • 设置AdditionalDocumentIndicator:将该字段设置为"Y",明确告知UPS需要附加EDI相关标识,留空可能导致系统默认不渲染该标识。
  • 修正重复的ReferenceNumber:请求中Package下的ReferenceNumber存在两个相同Code(02)的条目,可能引发字段解析异常,建议调整为唯一Code值(如一个用02,一个用03)。
  • 验证账户权限:确认UPS账户已开通无纸化EDI标签服务,部分功能需联系客户经理开通,否则即使API请求正确也不会显示EDI标识。
  • 切换标签格式:尝试将LabelImageFormat和LabelPrintMethod改为ZPL格式测试,GIF格式可能存在渲染限制。

内容的提问来源于stack exchange,提问作者noob75la

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.23 10:20:12