訂單 API
訂單檢索
生產端點:
https://transact.ti.com/v2/store/orders/
使用訂單檢索 API 獲取您的訂單歷史記錄的副本。該列表將默認顯示過去 30 天內創(chuàng)建的訂單。要指定訂單創(chuàng)建的日期范圍,則添加查詢參數(shù)“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”。
?
訂單檢索流程
- 使用為您分配的 API 密鑰和密碼進行身份驗證。
- 訂單提交并確認后,API 將使用狀態(tài)代碼“201 OK”進行響應。
- 查詢訂單 API,了解訂單狀態(tài)和其他詳細信息。
- API 將使用狀態(tài)代碼“200 OK”和包含訂單詳細信息的 JSON 進行回復
- 有關更多信息,請參閱“訂單 API 說明”。
使用訂單號的申請示例:
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" }