API Overview
The Kole Imports API provides your application to interact with our application, programmatically. This includes access to products, orders, shipments, and account information.
This documentation provides information that developers and programmers require to integrate the API into your online store.
The API adheres to the principles of a RESTful design architecture. Using XML or JSON, requests are made to resources using four of the HTTP Verbs (GET, POST, PUT, DELETE) and responses are delivered back to the client. Using custom media types, hypermedia constraints, and other tenets of RESTful design, the Kole Imports API was built so that it could absorb improvements with minimal changes to the client.
Currently, the API only supports Drop shipping customers. An account is required on http://dropship.koleimports.com
Conventions
To make things easier to understand, the following conventions are used:
- {text} : Replace text with your own data
- REQUIRED : The direction must be followed or the API will not work.
- ... : Representation data has been omitted for the sake of brevity
Test Mode vs. Production Mode
When created, all API Keys are in test mode.
Test mode allows you to work through the development phase without having to worry about making permanent changes or placing orders.
When the development phase is over and the client is ready to move into production, please contact us and we will help you with the rest of the process.
Authentication
Most of the data that can be accessed via the Kole Imports API is sensitive in nature. We take our customers privacy very seriously.
API Authentication is REQUIRED for all requests. It's implemented as HTTP Basic Authentication over SSL (https).
Note: Your API credentials are not the same as the credentials used on the website.
How to obtain API Credentials
There are a couple of prerequisites before authentication will work.
- Account must have an address associated with it.
- At least one payment method must be set up.
Once those two requirements are fufilled, follow the instructions below to obtain an API key.
- Log
in to your account.
- From the dashboard, click on the "Account" tab.
- Scroll down to the "API Keys" section.
- Click "Add a new API Key".
How to Authenticate
The user name is the Account ID found on the Account page and the password is one of your generated API Keys. This approach allows a user to remove a key if they suspect abuse.
Authentication Example
From a Linux command line, type:
curl -H "Accept: application/vnd.koleimports.ds.links+xml" "https://{id}:{api_key}@api.koleimports.com"
Entry Point
The entry point URL is
https://api.koleimports.com`
Clients should not make any assumptions about URI layout. All resources will be available from that single entry point.
Note: HTTPS is REQUIRED on every request.
Rate Limiting
Clients are allowed to make up to 1000 requests per hour. These limits are subject to change at any time, without notice.
If for some reason a higher limit is required, please [contact us][].
Media Types
Resource representations and request bodies (when applicable) are encoded in XML or JSON.
Each representation has it's own media type. Further down this document the appropriate media type will be given for each resource but in general they follow a pattern.
XML
application/vnd.koleimports.ds.**{resource}**+xml
JSON
application/vnd.koleimports.ds.**{resource}**+json
The media type is required in the HTTP Accept header (in requests) and Content-Type header (where applicable) in both requests and responses.
Generic Media Types
We do not support the generic media types
application/xml and application/json
If a request is made without the appropriate media types, the API will serve up the most recent xml representation available for the resource. If the client does not adhere to the principle of content negotiation, we cannot guarantee predictable responses.
Request Headers
Header | Supported Values | Description of Use | Required |
---|---|---|---|
Media type describing |
Indicates to the server |
Yes |
|
Basic Authentication |
Identifies the authorized |
Yes |
|
Length (in bytes) of |
Describes the size of |
Yes, on requests that |
|
Media type describing |
Describes the representation |
Yes, on requests that |
Request Data
Request data can be sent in either XML or JSON with the appropriate media type in the Content-Type header.
URI Parameters should only be assumed when specifically noted in the corresponding resources documentation.
Debugging
Below are some handy debugging tools.
Response Headers
Header | Supported Values | Description of Use | Required |
---|---|---|---|
Canonical URI of |
Returns a new URI |
Yes, on responses |
|
Length (in bytes) of |
Describes the size of |
Yes, on responses that |
|
Media type describing |
Describes the |
Yes, on responses that |
|
Canonical URI of a the |
Describes the resource |
Yes, on responses that |
Response Data
A response message body will be received in either XML or JSON according to the appropriate media type specified in the Accept header of the request.
Note: Timestamps that appear in responses all conform to the ISO 8601 standard.
HTTP Status Codes
Code | Status | Description |
---|---|---|
200 |
Ok |
The request was successfully completed. If this request created
a new resource that is |
201 |
Created |
A request that created a new resource was completed, and no
response body containing a |
202 |
Accepted |
The request has been accepted for processing, but the processing
has not been completed. |
204 |
No Content |
The server fulfilled the request, but does not need to return a response message body. |
400 |
Bad Request |
The request could not be processed because it contains missing
or invalid information |
401 |
Unauthorized |
The authentication credentials included with this request are missing or invalid. |
403 |
Forbidden |
The server recognized your credentials, but you do not possess
authorization to |
404 |
Not Found |
The request specified a URI of a resource that does not exist. |
405 |
Method Not Allowed |
The HTTP verb specified in the request (DELETE, GET, HEAD, POST,
PUT) is not supported |
406 |
Not Acceptable |
The resource identified by this request is not capable of
generating a representation |
409 |
Conflict |
A creation or update request could not be completed, because it
would cause a conflict |
500 |
Internal Server Error |
The server encountered an unexpected condition which prevented
it from fulfilling |
501 |
Not Implemented |
The server does not (currently) support the functionality required to fulfill the request. |
503 |
Service Unavailable |
The server is currently unable to handle the request due to
temporary overloading |
Application Level Error Codes
When possible, in addition to standard HTTP Status Codes, the response will supply the client with application level error codes and a brief message describing the problem.
Code | Description |
---|---|
40001 |
Request body is malformed or missing. |
40002 |
The ship option carrier field is required. Options include FEDEX or UPS. |
40003 |
The ship option service field is required. Options include GROUND, PRIORITY or OVERNIGHT. |
40004 |
The ship to company name or first and last name is required. |
40005 |
The ship to address is required. |
40006 |
The ship to city is required. |
40007 |
The ship to state (two letter abbreviation) is required. |
40008 |
The ship to zipcode is required. |
40009 |
The ship to country is required. |
40010 |
The request requires at least one product. |
40011 |
One or more of the products are missing the SKU. |
40012 |
The account needs more configuration. |
40013 |
The account needs more configuration. |
40014 |
The account needs more configuration. |
40040 |
The following field is either incorrect or missing: {field_name} |
40041 |
The ship to state is invalid. |
40042 |
The ship to zipcode is invalid. It should contain 5 numeric digits. |
40043 |
The ship to zipcode extension is invalid. It should contain 4 numeric digits. |
40044 |
The ship to country is invalid. |
40045 |
The ship to phone is invalid. |
40046 |
The following item SKU is invalid: {sku} |
40047 |
The following SKU has an invalid quantity: {sku} |
40048 |
One or more of the items are not available for purchase. |
40049 |
The following SKU has an invalid pack size: {sku} |
40080 |
The following item in not available for purchase: {sku} |
40081 |
The order has been rejected by the system. |
40082 |
The ship to address has been rejected by the system. |
-
About Kole Imports
-
Getting Started With The Kole Imports Dropship Program
-
Dropship API Documentation
-
Dropship Account Information
-
Dropship Feed Management
-
Dropship Billing Questions
-
Dropship Shipping Policies And Procedures
-
Dropship Catalog
-
Submitting Dropship Orders
-
Dropship Returns
-
Dropship Troubleshooting