FedEx 评级 API 在沙盒邮递员环境中不起作用。错误为“禁止操作”

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

我已在 Postmen 网站上创建帐户:https://secure.postmen.com/login 我得到了 API 密钥。

我指的是文档:https://docs.postmen.com/fedex.html#rates-calculate-rates/

下面是我提交的 JSON,我收到“操作禁止”错误。 我缺少什么?我需要传递任何其他参数吗?感谢您的回复。

在 Postman Header 中,我将 content-type 指定为 application/json 并传递 postmen-api-key 。 由于我已经创建了帐户,因此我获得了发货人帐户 ID。

这是费率网址: https://secure.postmen.com/explorer/sandbox/v3/rates

我正在测试POSTMAN中的所有内容。

JSON:

    {
  "async": false,
  "shipper_accounts": [
    {
      "id": "My Account ID XXXX"
    }
  ],
  "is_document": false,
  "shipment": {
    "ship_from": {
      "contact_name": "Elmira Zulauf",
      "company_name": "Kemmer-Gerhold",
      "street1": "5800 Windward Pkwy",
          "city": "Alpharetta",
          "state": "GA",
          "postal_code": "30005",
      "country": "USA",
      "type": "business"
    },
    "ship_to": {
      "contact_name": "Dr. Moises Corwin",
      "phone": "1-140-225-6410",
      "email": "[email protected]",
      "street1": "1800 W Hillcrest Dr",
      "city": "Newbury Park",
      "postal_code": "91320",
      "state": "CA",
      "country": "USA",
      "type": "residential"
    },
    "parcels": [
      {
        "description": "Food XS",
        "box_type": "custom",
        "weight": {
          "value": 2,
          "unit": "kg"
        },
        "dimension": {
          "width": 20,
          "height": 40,
          "depth": 40,
          "unit": "cm"
        },
        "items": [
          {
            "description": "Food Bar",
            "origin_country": "USA",
            "quantity": 2,
            "price": {
              "amount": 3,
              "currency": "USD"
            },
            "weight": {
              "value": 0.6,
              "unit": "kg"
            },
            "sku": "imac2014"
          }
        ]
      }
    ]
  }
}

感谢您的回复。

c# .net postman fedex
1个回答
0
投票

如果您通过 POSTMAN 进行测试,根据 https://docs.postmen.com/,计算费率的完整网址应如下所示,

沙盒:https://sandbox-api.postmen.com/v3/rates 生产:https://product-api.postmen.com/v3/rates

沙箱可用于测试

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