Getting Started

Welcome to the Onlinecomponents.com API Suite! Follow these steps to get started:

Authentication

To access the Onlinecomponents.com APIs, you'll need an API key. You can obtain both production and sandbox API keys from the same location:

  1. Navigate to your customer profile
  2. Log in to your Onlinecomponents.com account and go to your customer profile

  3. Go to API Access and Services
  4. Under the customer profile, locate the section labeled API Access and Services You can also directly click here to access the API Access and Services page

  5. Request Your API Key
  6. Request an API key from this section, choosing between a production or a sandbox API key. You'll receive your key instantly. If you suspect any security issues, you can retrigger and regenerate your key at any time


Sandbox Environment

We understand the importance of testing before going live. That's why we provide a fully functional sandbox environment where you can experiment with all of our APIs without affecting your production data.

Accessing the Sandbox

  1. Requesting a Sandbox API Key
  2. Request your Sandbox API Key from the API Access and Services page. This key is distinct from your production key and is used exclusively for sandbox testing.

  3. Different Base URL
  4. While the API endpoints remain the same, the sandbox environment uses a different base URL.

    1. https://api.onlinecomponents.com
    2. https://sandbox.onlinecomponents.com
  5. Sandbox Developer Portal
  6. Access the sandbox environment through the Sandbox Developer Portal . Here, you'll find all the necessary documentation, tools, and support to help you effectively test your integration

Inventory And Pricing

The Onlinecomponents.com Inventory And Pricing is a powerful, yet easy, way to gain access to and utilise Onlinecomponents.com product data, availability and pricing in your own applications

Description

The Inventory And Pricing service allows customers to utilise Onlinecomponents.com product data, availability, and pricing in their own applications. Search over 8 million products and detailed product information with ease. JSON Data Format is now available for Onlinecomponents.com Inventory And Pricing

    We have a new version of Inventory And Pricing that is faster and more flexible:
  • JSON offers faster processing with cleaner response data
  • Data formatting is cleaner and easier to display in modern browsers
  • API version control: Requests and responses are available in either JSON or XML

Features

  • Instant Access
  • Search by Keyword Method
  • Search by Part Number Method
  • Up to 50 results returned per call
  • Up to 100 calls per minute
  • Up to 100,000 calls per day

Data Available

  • 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

Endpoints

Order API

Gain access to the Onlinecomponents.com checkout process and order parts inside your own applications.

Description

The Order API can be used to place and check orders from Onlinecomponents.com It is intended to be used in conjunction with the Pricing and Availability API. We have a new version of Order API that is faster and more flexible:

  • JSON offers faster processing with cleaner response data
  • Data formatting is cleaner and easier to display in modern browsers
  • API version control: Requests and responses are available in either JSON or XML

Endpoints

The Order API can be used to place and check orders from Onlinecomponents.com It is intended to be used in conjunction with the Pricing and Availability API.

Request Parameters

Parameter Description Required
email Email Yes
firstName First name Yes
lastName Last name Yes
phoneNumber Phone number Yes
shippingMethod   Yes
accountNo Shipping account number Yes
carrier   No
shippingInsurance   Yes
taxable   Yes
resaleNumber   No
shippingAddress Shipping address Yes
shippingAddress.firstName First name Yes
shippingAddress.lastName Last name Yes
shippingAddress.company Company Yes
shippingAddress.countryTwoletterISOCode Country Yes
shippingAddress.stateProvinceAbbreviation State / province Yes
shippingAddress.city City Yes
shippingAddress.address1 Address 1 Yes
shippingAddress.address2 Address 2 Yes
shippingAddress.zipPostalCode Zip / postal code Yes
shippingAddress.phoneNumber Phone number Yes
billingAddress Billing address Yes
billingAddress.firstName First name Yes
billingAddress.lastName Last name Yes
billingAddress.company Company Yes
billingAddress.countryTwoletterISOCode Country Yes
billingAddress.stateProvinceAbbreviation State / province Yes
billingAddress.city City Yes
billingAddress.address1 Address 1 Yes
billingAddress.address2 Address 2 Yes
billingAddress.zipPostalCode Zip / postal code Yes
billingAddress.phoneNumber Phone number Yes
paymentMethod Payment method Yes
CustomerPoNumber
  no
orderComment Order comment No
orderItem   Yes
orderItem.productId Order line item identifier Yes
orderItem.partNumber   No
orderItem.manufacturerName   No
orderItem.quantity Qty Yes
orderItem.price Price No
orderItem.customerpartnumber Customer part number No
currencycode Currency Code No

Example Request

{
    "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",
}

Example Response

{
    "orderId": "string",
    "errors": [
        "string"
    ],
    "success": true
}

Available Shipping Methods

Domestic Options

Agent Code Service Code
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

 

International Options

Agent Code Service Code
UPS UPS World Wide Express
UPS UPS World Wide Saver
UPS UPS World Wide Expedited
FEDEX FedEx International Priority
FEDEX FedEx International Economy

 

Available Payment Methods

Payment Method Name
Net30
Net45
Net60
PrePayment
Net15
Net75
Net90

 

Available Currencies

Currency Currency Code
USD usd
EUR eur

 

Potential Error Messages

The following is a list of error messages that may be returned because of an API request error or an unmet internal prerequisite.

Description
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

Order History API

Gain access to the Onlinecomponents.com checkout process and order parts inside your own applications.

Description

The Order API can be used to place and check orders from Onlinecomponents.com It is intended to be used in conjunction with the Pricing and Availability API. We have a new version of Order API that is faster and more flexible:

  • JSON offers faster processing with cleaner response data
  • Data formatting is cleaner and easier to display in modern browsers
  • API version control: Requests and responses are available in either JSON or XML

Endpoints

The Order API can be used to place and check orders from Onlinecomponents.com It is intended to be used in conjunction with the Pricing and Availability API.

Join the circuit, keeping you connected to OnlineComponents.com and beyond!