API 对象
所有 API 响应都遵循统一的结构。本页介绍你在使用 atoship API 时会遇到的常见属性和模式。
对象标识符
API 中的每个对象都有唯一标识符。这些 ID 带有前缀,用于表明对象类型,让你一眼就能识别出对应的资源。
lbl_运输面单adr_地址trk_物流追踪ins_保险clm_理赔whk_Webhookevt_事件通用属性
大多数 API 对象都包含以下标准属性:
idstring对象的唯一标识符
objectstring对象类型(例如 "Label"、"Address")
created_atdatetime对象创建时间的 ISO 8601 时间戳
updated_atdatetime对象最后修改时间的 ISO 8601 时间戳
分页
列表接口返回分页结果。可使用查询参数控制分页:
pageinteger页码(默认:1)
limitinteger每页条数(默认:20,最大:100)
时间戳
所有时间戳均以 UTC 时区的 ISO 8601 格式返回:
2025-01-14T10:30:00ZOBJECT
示例结构| 1 | { |
| 2 | "id": "lbl_k7x9m2p4q8r5", |
| 3 | "object": "Label", |
| 4 | "status": "purchased", |
| 5 | "tracking_number": "9400111899223456789012", |
| 6 | "carrier": "USPS", |
| 7 | "service": "Priority Mail", |
| 8 | "rate": 8.95, |
| 9 | "currency": "USD", |
| 10 | "label_url": "https://atoship.com/api/labels/lbl_k7x9m2p4q8r5.pdf", |
| 11 | "created_at": "2025-01-14T10: 30: 00Z", |
| 12 | "updated_at": "2025-01-14T10: 30: 00Z" |
| 13 | } |
ID 前缀
lbl_Label
adr_Address
trk_Tracking
ins_Insurance
clm_Claim
whk_Webhook
evt_Event
分页查询参数
?page=2页码
?limit=50每页条数
?sort=created_at排序字段
?order=desc排序方向