About Api
1.If you are a new customer please registered through our website (Sandbox url:http://u.utoptic.com/cust/register,Production url:https://www.utsource.net/cust/register), and add your shipping address in the 'Address Management' in the 'Settings' column of the user center.
2.Preparation:Contact customer service(sales@utsource.com) to obtain the API (key, secret), and the key is valid for 1 year.
Sandbox url:http://webapisandbox.utsource.net
Production url:https://webapi.utsource.net
Each request needs to add the following key to the headers
| Name | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | The api key of your app |
| nonce | string | Yes | random string of length equal to 8 |
| timestamp | string | Yes | Unix Time Seconds |
| sign | string | Yes | Sign is encrypted by AES through key+nonce+secret+timestamp+parameters. The key used for AES encryption is the API secret, For parameters, if GET requests, use the parameter name and parameter value in the request to form a string (excluding '=', '&'), such as'api/Product/GetProduct?keyword=lm358&utlabel=Original, parameters="keywordlm358utlabelOriginal" |
Shipping Address
Get api/Account/GetAddress
No parameters need to be passed
Response Information
| Name | Type | Description |
|---|---|---|
| CusAddrID | int | Shipping address ID(Parameters required to create an order) |
| Addr | string | Address |
| Province | string | Province/State |
| City | string | City |
| PostCode | string | Post code |
| Tel | string | Tel |
| Country | string | Country |
| Contact | string | Contact |
| Company | string | Company |
| Status | string | Status(Success,False,Error) |
| Message | string | Message |
Response body formats
{
"Data": [{
"CusAddrID": 162697,
"Addr": "FuTian ShenZhen GuangDong China",
"Province": "GuangDong",
"City": "ShenZhen",
"PostCode": "518000",
"Tel": "13986263349",
"Country": "China",
"Contact": "LiYang",
"Company": "UTSOURCE HOLDING COMPANY LIMITED"
}],
"Message": null,
"Status": "Success"
}
Product search
Get api/Product/GetProduct
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| keyword | string | Yes | Search Keyword(Required,Length>2) |
| utlabel | string | No | Used/Original |
| currency | string | No | Return price currency(Optional)(CNY,USD,AUD,BRL,CAD,EUR,GBP,HKD,INR,JPY,KRW,MXN,PHP,RUB,SGD,TRY,TWD) |
| pageindex | int | No | Page number(default:1) |
| Page size | int | No | Page size(default:10) |
Response Information
| Name | Type | Description |
|---|---|---|
| PageIndex | int | Page number |
| PageSize | int | Page size |
| TotalCount | int | Total number of data |
| TotalPage | int | Total number of pages |
| Id | int | Product ID(Parameters required to create an order) |
| ProductName | string | Product name |
| LadderPrices | json | Ladder price (ordinary members) |
| LadderPricesPlus | json | Ladder price (Plus member) |
| Price | Decimal(18,5) | Price, accurate to 5 decimal places |
| MinNumber | int | Starting quantity corresponding to ladder price |
| MaxNumber | int | Cut off quantity corresponding to ladder price |
| Feature | string | Product characteristic parameters |
| Brand | string | Brand |
| Datecode | string | Date code |
| Quantity | int | Stock quantity |
| Encapsulation | string | Encapsulation |
| MinBuyQuantity | int | Minimum order quantity |
| GroupQty | string | If the attribute has a value, the product will be sold in multiple packages. The attribute value is the product quantity contained in a package |
| UtLabel | string | Used/Original |
| Currency | string | Monetary unit of price(CNY,USD,AUD,BRL,CAD,EUR,GBP,HKD,INR,JPY,KRW,MXN,PHP,RUB,SGD,TRY,TWD) |
| Status | string | Status(Success,False,Error) |
| Message | string | Message |
| Title | string | ignore |
| viewPrice | string | ignore |
| viewPricePlus | string | ignore |
| PriceS | string | ignore |
Response body formats
{
"PageIndex": 1,
"PageSize": 10,
"TotalCount": 265,
"TotalPage": 27,
"Data": [{
"Id": 11205896,
"ProductName": "LM358",
"LadderPrices": [{
"Price": 16.89898,
"MinNumber": 1,
"MaxNumber": 9,
"Title": "1-99999",
"viewPrice": null,
"viewPricePlus": null,
"PriceS": 16.89898
}],
"LadderPricesPlus": [{
"Price": 15.20908,
"MinNumber": 1,
"MaxNumber": 9,
"Title": "1-99999",
"viewPrice": null,
"viewPricePlus": null,
"PriceS": null
}],
"Feature": "{}",
"Brand": "LM",
"Encapsulation": "SOP-8",
"MinBuyQuantity": 50,
"Weight": 0.008000,
"GroupQty": 0,
"UtLabel": "Original"
}],
"Currency": "RUB",
"Message": null,
"Status": "Success"
}
Create order
Post api/Order/PostCreateOrder
Parameters
Request body formats
[
{
"Currency": "USD",
"CusAddrID": 139094,
"Pros": [
{
"Quantity": 50,
"id": 11205896
}
]
}
]
| Name | Type | Required | Description |
|---|---|---|---|
| CusAddrID | int | Yes | Shipping address ID(api/Account/GetAddress) |
| Pros | json | Yes | {"id":"Product Id","quantity":Quantity to buy (must be greater than 'MinBuyQuantity')} |
| currency | string | Yes | Monetary unit of price(CNY,USD,AUD,BRL,CAD,EUR,GBP,HKD,INR,JPY,KRW,MXN,PHP,RUB,SGD,TRY,TWD) |
| Express | string | No | Collect express(DHL/Fedex/UPS) |
| ExpressAccount | string | No | Collect express account |
Response Information
| Name | Type | Description |
|---|---|---|
| Status | string | Status(Success,False,Error) |
| Message | string | If Status="Success" is returned,Message returns the order number for the new order |
Response body formats
{
"Message": "UT0123456789",
"Status": "Success"
}