订单 API
订单检索
生产端点:
https://transact.ti.com/v2/store/orders/
使用订单检索 API 来检索有关订单的信息。
您可以执行的操作:
- 查看您最近的订单列表(默认为过去 30 天)。
- 通过订单号获取有关特定订单的详细信息。
步骤:
- 身份验证:您将需要使用分配到的 API 密钥和密码,才能通过 API 进行身份验证。
- API 请求:发送请求至订单 API,了解订单状态和其他详细信息。
- API 响应:您将收到一个包含状态代码 (200 OK) 和 JSON(含订单详情)的响应。
- 按日期筛选订单(可选):
- 要指定日期范围,请在请求中加入查询参数“startDate”和“endDate”。
- 示例:https://transact.ti.com/v2/store/orders?startDate=2021-05-01&endDate=2025-05-31
- 检索特定订单详细信息:
- 要获取有关特定订单的详细信息,请使用订单号来查询订单 API。
- 示例:"https://transact.ti.com/v2/store/orders/T999999999"
使用订单号的申请示例:
curl --request GET \
--url 'https://transact.ti.com/v2/store/orders/{orderNumber}'
--header 'Authorization: Bearer {access_token}' \
Example response:
{
"orderNumber": 0,
"orderStatus": "string",
"customerPurchaseOrderNumber": "string",
"subTotal": 0,
"totalPrice": 0,
"lineItems": [
{
"tiPartNumber": "string",
"tiPartDescription": "string",
"quantity": "string",
"status": "string",
"unitPrice": 0,
"customReelIndicator": true
}
],
"shippingAddress": [
{
"addressType": "string",
"firstName": "string",
"lastName": "string",
"company": "string",
"addressLine1": "string",
"addressLine2": "string",
"town": "string",
"state": "string",
"postalCode": "string",
"country": "string",
"email": "string",
"phoneNumber": "string",
"companyURL": "string"
}
],
"billingAddress": [
{
"addressType": "string",
"firstName": "string",
"lastName": "string",
"company": "string",
"addressLine1": "string",
"addressLine2": "string",
"town": "string",
"state": "string",
"postalCode": "string",
"country": "string",
"email": "string",
"phoneNumber": "string",
"companyURL": "string"
}
],
"orderMessages": [
{
"code": "string",
"type": "string",
"Message": "string"
}
],
"customerOrderAttributes": [
{
"attribute": "string"
}
],
"orderPlacedTime": "string",
"paymentType": "string",
"currencyISO": "string",
"totalTax": 0,
"checkoutProfileIdentifier": "string",
"totalDeliveryCost": 0,
"totalDiscount": 0,
"couponCodes": "string"
}