入门指南
歡迎來到 Onlinecomponents.com API 套件!請依照以下步驟開始:
身份验证
若要存取 Onlinecomponents.com API,您需要 API 金鑰。您可以從同一位置取得生產 API 金鑰和沙箱 API 金鑰:
- 導航至您的客戶資料
- 前往 API 存取和服務
- 請求您的 API 金鑰
登入您的 Onlinecomponents.com 帳戶並前往您的客戶資料
在客戶資料下,找到標示為「API 存取和服務」的部分。您也可以直接點選此處造訪API接入與服務頁面
添加新分支
沙箱環境
我们了解上线前测试的重要性。因此,我们提供功能完整的沙盒环境,您可以在其中试用我们的所有 API,而不会影响您的生产数据。
访问 Sandbox
- 请求 Sandbox API 密钥
- 不同的基本 URL
- https://api.onlinecomponents.com
- https://sandbox.onlinecomponents.com
- 沙箱開發者門戶
從 API 存取和服務頁面請求您的沙盒 API 金鑰。此密鑰與您的生產密鑰不同,專門用於沙箱測試。
雖然 API 端點保持不變,但沙箱環境使用不同的基本 URL。
透過沙盒開發者入口網站存取沙盒環境。在這裡,您將找到所有必要的文件、工具和支持,以幫助您有效地測試集成
搜尋介面
Onlinecomponents.com 搜尋 API 是一種強大且簡單的方法,可在您自己的應用程式中存取和利用 Onlinecomponents.com 產品資料、可用性和定價
描述
搜尋 API 服務可讓客戶在自己的應用程式中利用 Onlinecomponents.com 產品資料、可用性和定價。輕鬆搜尋超過 800 萬種產品和詳細的產品資訊。 JSON 資料格式現已可用於 Onlinecomponents.com 搜尋 API
-
我們有一個更快、更靈活的新版本搜尋 API:
- JSON 通过更清晰的响应数据提供更快的处理
- 数据格式更整洁,并且更易于在现代浏览器中显示
- API 版本控制:请求和响应可以使用 JSON 或 XML
特徵
- 标语
- 按關鍵字搜尋方法
- 按零件号方法搜索
- 每次呼叫最多回傳 50 個結果
- 每分鐘最多 100 次呼叫
- 客户电话#
可用數據
- Product Id
- Part Number
- Manufacturer Name
- Description
- Datasheet Url
- Product Url
- Part Image
- Quantity Available
- On Order Quantity
- Factory Stock Quantity
- Factory Lead Time
- Availability
- Package Quantity
- Package Cross Quantity
- Product Sub Category
- Product Status
- RoHS
- Min Order Quantity
- Package Type
- Package Cross
- Multiple
- Unit Of Measure
- COO
- ECCN
- PRC
- HTS
- Main Category
- Sub Category
- Taxonomy
- Product Life Cycle
- Available less than min
- Alternative Parts
- Prices
端點
订单 API
在您自己的应用程序中访问 Onlinecomponents.com 结账流程并订购零件。
描述
Order API 可用于从 Onlinecomponents.com 下单和检查订单。它旨在与 Pricing and Availability API 结合使用。我们有一个更快、更灵活的新版本 Order API:
- JSON 通过更清晰的响应数据提供更快的处理
- 数据格式更整洁,并且更易于在现代浏览器中显示
- API 版本控制:请求和响应可以使用 JSON 或 XML
端點
Order API 可用于从 Onlinecomponents.com 下单和检查订单。它旨在与 Pricing and Availability API 配合使用。
请求参数
| 参数 | 描述 | 必填 |
|---|---|---|
| 电子邮件 | 是 | |
| firstName | 名字 | 是 |
| lastName | 姓氏 | 是 |
| phoneNumber | 电话号码 | 是 |
| shippingMethod | 是 | |
| accountNo | 运输账户号码 | 是 |
| carrier | 否 | |
| shippingInsurance | 是 | |
| taxable | 是 | |
| resaleNumber | 否 | |
| shippingAddress | 送货地址 | 是 |
| shippingAddress.firstName | 名字 | 是 |
| shippingAddress.lastName | 姓氏 | 是 |
| shippingAddress.company | 公司 | 是 |
| shippingAddress.countryTwoletterISOCode | 国家/地区 | 是 |
| shippingAddress.stateProvinceAbbreviation | 州 | 是 |
| shippingAddress.city | 市 | 是 |
| shippingAddress.address1 | 地址 1 | 是 |
| shippingAddress.address2 | 地址 2 | 是 |
| shippingAddress.zipPostalCode | 邮编 / 邮政编码 | 是 |
| shippingAddress.phoneNumber | 电话号码 | 是 |
| billingAddress | 4. 输入应用的名称并点击 | 是 |
| billingAddress.firstName | 名字 | 是 |
| billingAddress.lastName | 姓氏 | 是 |
| billingAddress.company | 公司 | 是 |
| billingAddress.countryTwoletterISOCode | 国家/地区 | 是 |
| billingAddress.stateProvinceAbbreviation | 州 | 是 |
| billingAddress.city | 市 | 是 |
| billingAddress.address1 | 地址 1 | 是 |
| billingAddress.address2 | 地址 2 | 是 |
| billingAddress.zipPostalCode | 邮编 / 邮政编码 | 是 |
| billingAddress.phoneNumber | 电话号码 | 是 |
| paymentMethod | 付款方式 | 是 |
|
CustomerPoNumber
|
no | |
| orderComment | 订单备注 | 否 |
| orderItem | 是 | |
| orderItem.productId | 订单行项目标识符 | 是 |
| orderItem.partNumber | 否 | |
| orderItem.manufacturerName | 否 | |
| orderItem.quantity | 数量 | 是 |
| orderItem.price | 价格 | 否 |
| orderItem.customerpartnumber | 客户零件编号 | 否 |
| orderItem.scheduleLines | Scheduled releases for this line. Leave it out to ship the line as soon as it is available. | 否 |
| orderItem.scheduleLines.quantity | Quantity shipped in this release. | 是 |
| orderItem.scheduleLines.requestedDeliveryDate | Requested ship date of this release (yyyy-MM-dd): the day it ships from our warehouse, not the day it arrives. | 是 |
| currencycode | 货币代码 | 否 |
请求示例
{
"email": "string",
"firstName": "string",
"lastName": "string",
"phoneNumber": "string",
"shippingMethod": "string",
"accountNo": "string",
"carrier": "string",
"shippingInsurance": true,
"taxable": true,
"resaleNumber": false,
"shippingAddress": {
"firstName": "string",
"lastName": "string",
"company": "string",
"countryTwoletterISOCode": "string",
"stateProvinceAbbreviation": "string",
"city": "string",
"address1": "string",
"address2": "string",
"zipPostalCode": "string",
"phoneNumber": "string"
},
"billingAddress": {
"firstName": "string",
"lastName": "string",
"company": "string",
"countryTwoletterISOCode": "string",
"stateProvinceAbbreviation": "string",
"city": "string",
"address1": "string",
"address2": "string",
"zipPostalCode": "string",
"phoneNumber": "string"
},
"paymentMethod": "string",
"customerponumber": "string",
"orderComment": "string",
"orderItem": [{
"productId": 0,
"partNumber": "string",
"manufacturerName": "string",
"quantity": 0,
"price": 0,
"customerpartnumber": "string"
}],
"currencycode": "string",
}
响应示例
{
"orderId": "string",
"errors": [
"string"
],
"success": true
}
Scheduled releases
To ship a line on a future date, or to split it into several shipments, add scheduleLines to the order item. Each entry ships its quantity on its requested ship date (requestedDeliveryDate). To set one requested ship date for the whole line, send a single entry with the full line quantity.
Validation rules
- Each requested date must be in the future, can't fall on a weekend, and can't be more than 12 months out.
- A date can't be earlier than the part's lead time allows. The error message gives the earliest date that can be met.
- Each release quantity must meet the part's minimum order quantity and order multiple.
- The release quantities must add up to the line quantity.
- Each release, and the line as a whole, must meet the minimum order value for scheduled lines.
- Two releases on the same line can't share a ship date.
Example: one line of 1,000 split into two releases
"orderItem": [{
"productId": 0,
"partNumber": "string",
"manufacturerName": "string",
"quantity": 1000,
"scheduleLines": [
{ "quantity": 500, "requestedDeliveryDate": "2027-01-15" },
{ "quantity": 500, "requestedDeliveryDate": "2027-02-15" }
]
}]
The Order Lookup API returns the releases in scheduledReleases, with the quantity and scheduled ship date of each one:
"scheduledReleases": [
{ "partNumber": "string", "manufacturer": "string", "quantity": 500, "scheduledShipDate": "1/15/2027" },
{ "partNumber": "string", "manufacturer": "string", "quantity": 500, "scheduledShipDate": "2/15/2027" }
]
可用的配送方式
国内配送选项
| 承运商代码 | 服务代码 |
|---|---|
| UPS | UPS Ground |
| UPS | UPS 3rd Day |
| UPS | UPS 2nd Day |
| UPS | UPS Next Day Saver |
| UPS | UPS Next Day |
| UPS | UPS Next Day Early |
| FEDEX | FedEx Ground |
| FEDEX | FedEx 3rd Day |
| FEDEX | FedEx 2nd Day |
| FEDEX | FedEx Priority Overnight |
| FEDEX | FedEx Std Overnight |
国际配送选项
| 承运商代码 | 服务代码 |
|---|---|
| UPS | UPS World Wide Express |
| UPS | UPS World Wide Saver |
| UPS | UPS World Wide Expedited |
| FEDEX | FedEx International Priority |
| FEDEX | FedEx International Economy |
可用的付款方式
| 付款方式名称 |
|---|
| Net30 |
| Net45 |
| Net60 |
| PrePayment |
| Net15 |
| Net75 |
| Net90 |
可用货币
| 货币 | 货币代码 |
|---|---|
| USD | usd |
| EUR | eur |
可能出现的错误消息
以下列出了因 API 请求错误或未满足内部先决条件而可能返回的错误消息。
| 描述 |
|---|
| The minimum quantity allowed for purchase is |
| The maximum quantity allowed for purchase is |
| Allowed quantities for this product: |
| You may purchase all in-stock quantity of {0} or our minimum order quantity of {1} . Please adjust your quantity and add to cart to continue. |
| Quantity should be increments of |
| Minimum order quantity is |
| Please insert valid quantity |
| MOQ for out of Stock Qty is |
| Sorry, Item has no price, please contact us or submit price request |
| Sorry, Can not change quantity for this item |
| Sorry, we have limited Availability, please contact us or submit price request |
| Email is required |
| First Name is required |
| Last Name is required |
| Phone Number is required |
| Country Two letter ISO Code is required |
| Company is required |
| Address1 is required |
| City is required |
| Zip Postal Code is required |
| Please add valid data for item |
| Order Item is required |
| ShippingMethod is required |
| AccountNo is required |
| ship account should be 6 characters |
| ship account should be 9 characters |
| No Customer Found |
| no shipping address found |
| Shipping Address Error |
| Shipping Method Error |
| Error on Process Order |
| Payment Error |
| This product is no longer available, please modify your shopping cart |
订单历史 API
在您自己的应用程序中访问 Onlinecomponents.com 结账流程并订购零件。
描述
Order API 可用于从 Onlinecomponents.com 下单和检查订单。它旨在与 Pricing and Availability API 结合使用。我们有一个更快、更灵活的新版本 Order API:
- JSON 通过更清晰的响应数据提供更快的处理
- 数据格式更整洁,并且更易于在现代浏览器中显示
- API 版本控制:请求和响应可以使用 JSON 或 XML
端點
Order API 可用于从 Onlinecomponents.com 下单和检查订单。它旨在与 Pricing and Availability API 配合使用。