Вы просматриваете старую версию данной страницы. Смотрите текущую версию.

Сравнить с текущим просмотр истории страницы

« Предыдущий Версия 46 Следующий »


API methods are available here

Instance key is your API Key 

Secret is secret Key used to protect API Key (Instance key) if third-party programmers were involved for development or someone from the company quit, etc. Usually not required. We can generate one for you in future and Signature and timestamp will be automatically generated. Here is more information if you need to use Secret key http://docs.otapi.net/en/Documentations/Description/MethodSignature 

To get response in XML format send request to http://otapi.net/service/

To get response in JSON format send request to http://otapi.net/service-json/

Request

Method

Example

Comment (these are examples. enter data you need to request)

Get all categories

GetRootCategoryInfoList

Documentation example

ℹ️ Our API does not allow to get all products in all categories at once. first we request the main (root) categories, then we separately request the subcategories of the second, third, ... level

Get subcategories in category 

GetCategorySubcategoryInfoList 

Documentation example

Search by category (get products in category)

BatchSearchItemsFrame

Documentation example

In xmlParameters specify category ID (for example, otc-1):

<SearchItemsParameters><CategoryId>otc-1</CategoryId></SearchItemsParameters> 

You can get category ID in 2 ways:

1️⃣ via API using http://docs.otapi.net/en/Documentations/Method?name=BatchGetItemFullInfo method. In blockList parameter specify RootPath

2️⃣ via website (https://clip.otcommerce.com/files/40/48/category.jpg). in address bar the last digits are category ID

Get 20 goods from Taobao

BatchSearchItemsFrame

Documentation example

In xmlParameters specify provider and category (for example, Taobao and category otc-1):

<SearchItemsParameters><Provider>Taobao</Provider><CategoryId>otc-1</CategoryId></SearchItemsParameters>

In frameSize specify required number of products (for example, 20)

ℹ️ You can change provider, category and quantity of goods according to your request.

Get full product info with characteristics

Search product by ID

BatchGetItemFullInfo

Documentation example

itemId - enter product ID (for Taobao without prefix. for other providers specify Prefix)

blockList - add Description if you need a photo, video and description of the product

Get product SKU and configurations

BatchGetItemFullInfo

Documentation example

Get number of sold items

BatchGetItemFullInfo

Documentation example

Find values:

SalesInLast30Days

TotalSales

Search product by word

BatchSearchItemsFrame

All search parameters are in documentation

1 provider: Documentation example

Specify in xmlParameters search query (for example, dress):

<SearchItemsParameters><ItemTitle>dress</ItemTitle></SearchItemsParameters>

ℹ️ Maximum 200 items per request

Search query can be in any required language. ℹ️ API Keys K0 Basic, K1 Standard and K2 Advanced include only 1 language. To connect additional language, you need to connect paid module "Multilingualism". Price

ℹ️ Unlimited number of languages ​​are available for K3 Enterprise Key.

Several providers:

Documentation example

If there are several providers, in xmlParameters specify provider and search query (for example, dress on Taobao):

<SearchItemsParameters><Provider>Taobao</Provider><ItemTitle>dress</ItemTitle></SearchItemsParameters>

ℹ️ Maximum 200 items per request

Search query can be in any required language. ℹ️ API Keys K0 Basic, K1 Standard and K2 Advanced include only 1 language. To connect additional language, you need to connect paid module "Multilingualism". Price

ℹ️ Unlimited number of languages ​​are available for K3 Enterprise Key.

Search product by phrase


BatchSearchItemsFrame

1 provider: Documentation example

Specify in xmlParameters search query (for example, dress):

<SearchItemsParameters><ItemTitle>red dress</ItemTitle></SearchItemsParameters>

ℹ️ Maximum 200 items per request

Search query can be in any required language. ℹ️ API Keys K0 Basic, K1 Standard and K2 Advanced include only 1 language. To connect additional language, you need to connect paid module "Multilingualism". Price

ℹ️ Unlimited number of languages ​​are available for K3 Enterprise Key.

Several providers:

Documentation example

If there are several providers, in xmlParameters specify provider and search query (for example, dress on Taobao):

<SearchItemsParameters><Provider>Taobao</Provider><ItemTitle>red dress</ItemTitle></SearchItemsParameters>

ℹ️ Maximum 200 items per request

Search query can be in any required language. ℹ️ API Keys K0 Basic, K1 Standard and K2 Advanced include only 1 language. To connect additional language, you need to connect paid module "Multilingualism". Price

ℹ️ Unlimited number of languages ​​are available for K3 Enterprise Key.


BatchSearchItemsFrame

Documentation example

In xmlParameters specify link:

<SearchItemsParameters><ItemTitle>https://detail.1688.com/offer/530220113667.html</ItemTitle></SearchItemsParameters >

You can't copy and paste a product link into a request in this form https://item.taobao.com/item.htm?spm=a21wu.241046-global.4691948847.9.41cab6cb6SlLhG&scm=1007.15423.84311.100200300000001&id=566279369923&pvid=0c5ba9c6-4ad1-4735-b0d3-b30089f3bdb3

There are 2 variants:

1. All & signs inside the link need to be replaced with &amp;. This is done according to XML standard rules, so the link should look like this https://item.taobao.com/item.htm?spm=a21wu.241046-global.4691948847.9.41cab6cb6SlLhG&amp;scm=1007.15423.84311.100200300000001&amp;id=566279369923&amp;pvid=0c5ba9c6-4ad1-4735-b0d3-b30089f3bdb3

2. Shorten the link to https://detail.tmall.com/item.htm?id=......

Search product by photo

BatchSearchItemsFrame

1 provider:

Documentation example

Specify in xmlParameters link to photo:

<SearchItemsParameters><ImageUrl>https://img.alicdn.com/imgextra/i1/529782397/O1CN01qnZeTY1TZs3xAcmOv_!!529782397.jpg</ImageUrl></SearchItemsParameters>

ℹ️ Maximum 200 items per request

⚠️ Link to photo can be any but it must be viewable in any browser

⚠️ Search by photo is an additional module. it costs 170$ (one-time payment) for each provider

Several providers: 

Documentation example

Specify in xmlParameters required provider and link to photo (for example, https://img.alicdn.com/imgextra/i1/529782397/O1CN01qnZeTY1TZs3xAcmOv_!!529782397.jpg):

<SearchItemsParameters><Provider>Taobao</Provider><ImageUrl>https://img.alicdn.com/imgextra/i1/529782397/O1CN01qnZeTY1TZs3xAcmOv_!!529782397.jpg</ImageUrl></SearchItemsParameters>

ℹ️ Maximum 200 items per request

⚠️ Link to photo can be any but it must be viewable in any browser

⚠️ Search by photo is an additional module. it costs 170$ (one-time payment) for each provider

Search product by brand

BatchSearchItemsFrame

For Taobao:

Documentation example

For example, Adidas:

1️⃣ add brand into brands list in admin panel of API Key:

Catalog –> Collections –> Popular brands (https://clip.otcommerce.com/files/71/3f/brandseng.jpg). You can add brand:

- from list https://clip.otcommerce.com/files/54/91/brandsrus2%20%281%29.jpg 

- by link or ID https://clip.otcommerce.com/files/e7/68/brandseng3.jpg. You can copy link or ID from website https://open-demo.otcommerce.com/?q=brands (https://clip.otcommerce.com/files/3d/cd/brandsrus4.jpg -> https://clip.otcommerce.com/files/dc/40/brandsrus5.jpg)

ℹ️ ID should be copied exactly from the link (for example, ot:34657)

2️⃣ Then make request using BatchSearchItemsFrame method. In xmlParameters specify brand:

<SearchItemsParameters><BrandId>Adidas</BrandId></SearchItemsParameters>

For other providers:

Don’t add brand to brands list in admin panel of API Key. Make a request as when searching by word, phrase, seller and other filters, using BatchSearchItemsFrame method.

In xmlParameters specify brand

<SearchItemsParameters><ItemTitle>Adidas</ItemTitle></SearchItemsParameters>

Search product by vendor/seller

BatchSearchItemsFrame

Documentation example

You can find vendor/seller name here https://clip.otcommerce.com/files/21/99/seller.jpg

In xmlParameters specify vendor/seller name: 

<SearchItemsParameters><VendorId>myczx8</VendorId></SearchItemsParameters>

Get vendor info (location, rating, etc.)


GetVendorInfo


Documentation example

You can find vendor/seller name here https://clip.otcommerce.com/files/21/99/seller.jpg

In vendorId specify vendor/seller name

Vendor’s rating in our API is Level

BatchGetItemFullInfo 

Documentation example

You can find vendor/seller name here https://clip.otcommerce.com/files/21/99/seller.jpg

In blockList specify vendor/seller name

Vendor’s rating in our API is Level

Get internal delivery price

BatchGetItemFullInfo

Documentation example

In blockList specify DeliveryCosts

In the code search for words InternalDelivery (without a space)

ℹ️ It's impossible to get internal shipping charge of a product for a specific address via api. You should set it in admin panel of API Key

Sorting provider products by price descending

BatchSearchItemsFrame

Documentation example

In xmlParameters specify provider, category ID and sorting order (for example, Taobao, otc-1, descending):

<SearchItemsParameters><Provider>Taobao</Provider><CategoryId>otc-1</CategoryId><OrderBy>Price:Desc</OrderBy></SearchItemsParameters>

More about possible sorting methods

Sorting provider products by price ascending


BatchSearchItemsFrame

Documentation example

In xmlParameters specify provider, category ID and sorting order (for example, Taobao, otc-1, ascending):

<SearchItemsParameters><Provider>Taobao</Provider><CategoryId>otc-1</CategoryId><OrderBy>Price:Asc</OrderBy></SearchItemsParameters>

More about possible sorting methods

Search 20 items of Taobao in category otc-1 sorted by descending reviews count

BatchSearchItemsFrameDocumentation example

In xmlParameters specify:

<SearchItemsParameters><Provider>Taobao</Provider><CategoryId>otc-1</CategoryId><SearchMethod>Reviews</SearchMethod><OrderBy>ReviewCount:Desc</OrderBy></SearchItemsParameters>

ℹ️ Available with "Customers reviews" module only.

More about available sorting methods

Search 20 items of Taobao in category otc-1 sorted by ascending reviews count

BatchSearchItemsFrameDocumentation example

In xmlParameters specify:

<SearchItemsParameters><Provider>Taobao</Provider><CategoryId>otc-1</CategoryId><SearchMethod>Reviews</SearchMethod><OrderBy>ReviewCount:Asc</OrderBy></SearchItemsParameters>

ℹ️ Available with "Customers reviews" module only.

More about available sorting methods

Search items in category dress with reviews after purchase

BatchSearchItemsFrameDocumentation example

In xmlParameters specify:

<SearchItemsParameters><CategoryId>162104</CategoryId><SearchMethod>Reviews</SearchMethod><Features><Feature Name="PurchasedItemReviews">true</Feature></Features></SearchItemsParameters>

List of available features is in documentation.

Search 20 T-shirts by descending sales count

BatchSearchItemsFrame

Documentation example

In xmlParameters specify:

<SearchItemsParameters><ItemTitle>T-shirt</ItemTitle><OrderBy>Volume:Desc</OrderBy></SearchItemsParameters>

More about available sorting methods

Search 20 T-shirts by ascending sales count

BatchSearchItemsFrame

Documentation example

In xmlParameters specify:

<SearchItemsParameters><ItemTitle>T-shirt</ItemTitle><OrderBy>Volume:Asc</OrderBy></SearchItemsParameters>

More about available sorting methods

Search T-shirts by minimal vendor's rating 19

 BatchSearchItemsFrameDocumentation example

In xmlParameters specify: 

<SearchItemsParameters><ItemTitle>T-shirt</ItemTitle><MinVendorRating>19</MinVendorRating></SearchItemsParameters>

ℹ️ Maximum seller rating value varies from provider to provider.

It can be found in available search methods of provider.

In this particular example, the only provider is Taobao and maximum seller rating for this provider is 20

Search T-shirts by price interval: from 10 to 40 yuan

BatchSearchItemsFrameDocumentation example

In xmlParameters specify:

<SearchItemsParameters><ItemTitle>T-shirt</ItemTitle><CurrencyCode>CNY</CurrencyCode><MinPrice>10</MinPrice><MaxPrice>40</MaxPrice></SearchItemsParameters>

Selection includes items with promotion price (PromotionPrice). Currency (if not explicit) gets from administrators panel (first currency from list) and converts.

Search T-shirts by USD equivalent price not exceed 3

BatchSearchItemsFrameDocumentation example

In xmlParameters specify:

<SearchItemsParameters><ItemTitle>T-shirt</ItemTitle><MaxPrice>3</MaxPrice><CurrencyCode>USD</CurrencyCode></SearchItemsParameters>

Get currency code (CurrencyCode) by using GetCurrencyInstanceList or GetInstanceCurrencyInfoList methods.

Search T-shirts with minimal sales count of 50

BatchSearchItemsFrameDocumentation example

In xmlParameters specify:

<SearchItemsParameters><ItemTitle>T-shirt</ItemTitle><MinVolume>50</MinVolume></SearchItemsParameters>

Search T-shirts with minimal first lot 5

BatchSearchItemsFrameDocumentation example

In xmlParameters specify:

<SearchItemsParameters><Provider>Alibaba1688</Provider><ItemTitle>T-shirt</ItemTitle><MinFirstLot>5</MinFirstLot></SearchItemsParameters>

ℹ️ Method works only for 1688

Search T-shirts with maximal first lot 1 (equals to retail order)

BatchSearchItemsFrameDocumentation example

In xmlParameters specify:

<SearchItemsParameters><Provider>Alibaba1688</Provider><ItemTitle>T-shirt</ItemTitle><MaxFirstLot>1</MaxFirstLot></SearchItemsParameters>

Search new T-shirts

BatchSearchItemsFrameDocumentation example

In xmlParameters specify:

<SearchItemsParameters><ItemTitle>T-shirt</ItemTitle><StuffStatus>New</StuffStatus></SearchItemsParameters>

We have 2 conditions: New and Second.

Search by attribute: red coloured XL size T-shirt

BatchSearchItemsFrameDocumentation example

Search attributes for selected item by using BatchGetItemFullInfo (example's item - id 646674173023) (<Attributes> )
<ItemAttribute Pid="20509" Vid="28317"> (for XL size)
<ItemAttribute Pid="1627207" Vid="13535612018"> (for "red" colour)

With additional information block 'SearchProperties' pass (more details about additional information blocks)

In xmlParameters specify:

<SearchItemsParameters><ItemTitle>T-shirt</ItemTitle><Configurators><Configurator Pid="20509" Vid="28317" /><Configurator Pid="1627207" Vid="13535612018" /></Configurators></SearchItemsParameters>


Search T-shirts with discount

BatchSearchItemsFrameDocumentation example

In xmlParameters specify:

<SearchItemsParameters><ItemTitle>T-shirt</ItemTitle><Features><Feature Name="Discount">true</Feature></Features></SearchItemsParameters>

List of available features is in documentation.

Search T-shirts in stock

BatchSearchItemsFrameDocumentation example

In xmlParameters specify:

<SearchItemsParameters><ItemTitle>T-shirt</ItemTitle><Features><Feature Name="IsStock">true</Feature></Features></SearchItemsParameters>

List of available features is in documentation.

Search TMall T-shirts

BatchSearchItemsFrameDocumentation example

In xmlParameters specify:

<SearchItemsParameters><ItemTitle>T-shirt</ItemTitle><Features><Feature Name="Tmall">true</Feature></Features></SearchItemsParameters>

List of available features is in documentation.

Get available languages ​​for API Key

GetLanguageInfoList

Documentation example

ℹ️ API Keys K0 Basic, K1 Standard and K2 Advanced include only 1 language. To connect additional language, you need to connect paid module "Multilingualism". Price

ℹ️ Unlimited number of languages ​​are available for K3 Enterprise Key.


It's possible to request maximum 200 products in one request

framePosition - 0 (this is the beginning of the page)

frameSize -  200 (for example). this is the number of products on the page


To request further, specify:

framePosition: 200 (this is the beginning of the page)

frameSize: 200 (for example)


To request further, specify:

framePosition: 400 (this is the beginning of the page)

frameSize: 200 (for example)

  • Нет меток