Fedex API Ship:通过 URL 下载标签 PDF 时出现错误 400

问题描述 投票:0回答:1

我使用 Fedex API 生成运输标签 (https://developer.fedex.com/api/fr-fr/catalog/ship/v1/docs.html),但我无法通过 URL 下载标签提供。

这是网址:

https://wwwtest.fedex.com/document/v1/cache/retrieve/SH,f15d003851096ec9794972069960_SHIPPING_Z?isLabel=true&autoPrint=false&retrievalMode=THERMAL

这是回复:

{
    "transactionId": "94bb8cb1-e6d2-430a-a100-9850a57513b2",
    "errors": [
        {
            "code": "SHIPPING.DOCUMENT.NO.BYTES",
            "message": "We are unable to process this request. Please try again later or contact FedEx Customer Service."
        }
    ]
}
<?php
$url = "https://wwwtest.fedex.com/document/v1/cache/retrieve/SH,f15d003851096ec9794972069960_SHIPPING_Z?isLabel=true&autoPrint=false&retrievalMode=THERMAL";

$arrContextOptions=array(
      "ssl"=>array(
            "verify_peer"=>false,
            "verify_peer_name"=>false,
        ),
    );

$response = file_get_contents($url, false, stream_context_create($arrContextOptions));
?>

php rest fedex
1个回答
0
投票

我在同一条船上。 这个问题你解决了吗?

© www.soinside.com 2019 - 2024. All rights reserved.