首页 > 解决方案 > 需要 url (demo) 用于 Ups Shipment Api 集成

问题描述

我只需要货物跟踪并请求 Api Link/任何代码。

这是演示代码: 我没有验证载体。

import requests

headers = {
    'Authorization': 'ShippoToken ,<shippo_test_7406cb4031cd20465ee984a6b65595bef87cfbf8>',
    'Content-Type': 'application/json',
}

data = [
  ('amount', '2000'),
  ('currency', 'usd'),
  ('source', 'tok_amex'),
  ('metadata[order_id]', '6735'),]
response = requests.post('https://api.goshippo.com/shipments/', headers=headers, data=data)
print(response.json())

标签: python-3.xodoo-11

解决方案


推荐阅读