UTTPRO B2B API v1
維思科技企業客戶 API。讓貴公司的採購或 ERP 系統讀取與網站「企業訂單資訊」頁相同範圍的資料。
Business customer API of UTTPRO: your systems read the same data the signed-in member sees on the website.
1. 取得用戶端 / Getting a client
- 完成企業帳號連結(見 企業客戶專區「如何開通企業帳號」)。
Link your company account first. - 登入後開啟「企業訂單資訊」的「API 串接」分頁,建立 API 用戶端並選擇權限範圍。
client_secret只顯示一次。
Open the "API access" tab of Client Orders and Receivables, create a client and choose its scopes. The secret is shown once. - API 用戶端代表建立它的會員:只能讀取該會員已獲授權的客戶與開單公司資料;業務撤銷企業連結或會員撤銷用戶端後立即失效。
A client acts as the member who created it and loses access as soon as the company link or the client is revoked.
2. 取得存取權杖 / Access token
OAuth 2.0 client credentials. 權杖有效 15 分鐘。Tokens last 15 minutes.
curl -s https://api.uttpro.com/oauth/token \ -d grant_type=client_credentials \ -d client_id=YOUR_CLIENT_ID \ -d client_secret=YOUR_CLIENT_SECRET
{"access_token":"b2b1....","token_type":"Bearer","expires_in":900,"scope":"profile.read orders.read"}
之後每個請求加上 Authorization: Bearer <access_token>。Send the token on every call.
3. 端點 / Endpoints
| 端點 / Endpoint | 權限 / Scope | 說明 / Description |
|---|---|---|
GET /v1/me | profile.read | 會員與已連結的客戶、開單公司(取得 customer_guid、company_guid)。Member and its customer/company links. |
GET /v1/sales-orders?customer_guid=&company_guid=&offset= | orders.read | 已核准的銷售訂單,每頁 50 筆。 Approved sales orders, 50 per page. |
GET /v1/purchase-orders?customer_guid=&company_guid=&offset= | orders.read | 貴公司提交的客戶採購單(含已撤回)。 Client purchase orders you submitted. |
GET /v1/purchase-orders/{guid}?revision= | orders.read | 採購單版本與已連結的銷售訂單。 Revisions and linked sales orders. |
GET /v1/receivables?customer_guid=&company_guid=&offset=&sales_order_guid= | ar.read | 應收帳款明細(依到期日,每頁 100 筆);需另有帳款權限。 Receivables by delivery; needs billing access. |
GET /v1/quotes | quotes.read | 可查看的報價單清單(最新 100 筆);報價內容請由 web_url 在網站以 Email 驗證後開啟。Quote list; open contents on the website. |
curl -s "https://api.uttpro.com/v1/sales-orders?customer_guid=...&company_guid=..." \ -H "Authorization: Bearer $TOKEN"
完整欄位定義見 /v1/openapi.json(OpenAPI 3.1)。分頁請使用回應中的 next_offset。
Full field definitions in the OpenAPI file; page with next_offset.
4. 規則 / Rules
- 所有識別碼皆為 GUID;客戶採購單號、單據編號只是顯示用標籤。Every identifier is a GUID; document numbers are labels only.
- 商品只顯示品名(別名)與規格。Items carry the product alias and spec only.
- 時間為台北時間 ISO 8601,含
+08:00。金額為新台幣。Times are ISO 8601 Taipei time; amounts in TWD. - 每個用戶端每分鐘 60 次請求,超過回應
429。60 requests per minute per client. - 錯誤格式:
{"error":"...","request_id":"GUID"},請在聯絡我們時附上request_id。 - 此 API 僅供讀取;沒有付款、收款或發票寫入功能。Read-only: no payment, receipt or invoice writes.
問題請洽您的業務代表或 03-558-9888。