訂單 API

訂單擷取

生產端點:
https://transact.ti.com/v2/store/orders/

使用訂單擷取 API 以提取您的訂單記錄副本。此清單預設顯示過去 30 天內建立的訂單。若要指定在特定日期範圍內所建立的訂單,請新增查詢參數「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」。

訂單擷取流程

  1. 進行驗證,方法為使用指派給您的 API 金鑰和秘密
  2. 在提交並確認訂單後,API 將會回覆狀態代碼 201 OK。
  3. 查詢訂單 API 以取得訂單狀態和其它詳細資訊。
  4. API 將會回覆狀態代碼 200 OK,以及包含訂單詳細資料的 JSON
  5. 如需更多資訊,請參閱訂單 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" }