Lấy danh sách hàng hóa từ maimai.vn
POST api/product?c={company}&k={api key}&type={type}&agent={agent}&category={category}&attributes={attributes}&keyword={keyword}&pricelist1={pricelist1}&pricelist2={pricelist2}&price1={price1}&price2={price2}&sort={sort}&order={order}&page={page}&pageSize={pageSize}&showAvailableOnly={showAvailableOnly}
Đối tượng responseJSON, trong đó
$.ajax({
url: //api.maimai.vn/api/product/',
data: {
c: 'company name',
k: 'api key',
mode: 0,
agent: 1,
category: 1,
attributes: '',
keyword: '',
pricelist1: 1,
pricelist2: 2,
sort: 0,
order: 0,
page: 0,
pageSize: 40,
showAvailableOnly: true
},
dataType: "json",
success: function (responseJSON) {
//on success
},
error: function (jqXHR, tranStatus, errorThrown) {
// on error
}
});
Lấy thông tin các mặt hàng theo mã/ID từ maimai.vn
POST api/product?c={company}&k={api key}&codes={codes}&codeType={codeType}
Danh sách đối tượng product
$.ajax({
url: //api.maimai.vn/api/product/',
data: {
c: 'company name',
k: 'api key',
codes: '1,2,3',
codeType: 0
},
dataType: "json",
success: function (responseJSON) {
//on success
},
error: function (jqXHR, tranStatus, errorThrown) {
// on error
}
});
Lấy danh sách các mặt hàng bán chạy từ maimai.vn
POST api/product?c={company}&k={api key}&type={type}&agent={agent}&category={categoryID}&pricelist1={pricelist1}&pricelist2={pricelist2}&sort={sort}&interval={interval}&count={count}
Đối tượng responseJSON, trong đó
$.ajax({
url: //api.maimai.vn/api/product/',
data: {
c: 'company name',
k: 'api key',
mode: 0,
agent: 1,
category: 1,
pricelist1: 1,
pricelist2: 2,
sort: 0,
interval: 30,
count: 10
},
dataType: "json",
success: function (responseJSON) {
//on success
},
error: function (jqXHR, tranStatus, errorThrown) {
// on error
}
});
Lấy danh sách các mặt hàng ngẫu nhiên từ maimai.vn
POST api/product?c={company}&k={api key}&type={type}&agent={agent}&category={category}&pricelist1={pricelist1}&pricelist2={pricelist2}&count={count}&showAvailableOnly={showAvailableOnly}
Đối tượng responseJSON, trong đó
$.ajax({
url: //api.maimai.vn/api/product/',
data: {
c: 'company name',
k: 'api key',
mode: 0,
agent: 1,
category: 1,
pricelist1: 1,
pricelist2: 2,
count: 10,
showAvailableOnly: false
},
dataType: "json",
success: function (responseJSON) {
//on success
},
error: function (jqXHR, tranStatus, errorThrown) {
// on error
}
});
Lấy danh sách các mặt hàng trong nhóm hàng từ maimai.vn
POST api/product?c={company}&k={api key}&id={id}&agent={agent}&pricelist1={pricelist1}&pricelist2={pricelist2}
Đối tượng responseJSON, trong đó
$.ajax({
url: //api.maimai.vn/api/product/',
data: {
c: 'company name',
k: 'api key',
id: 1,
agent: 1,
pricelist1: 1,
pricelist2: 2
},
dataType: "json",
success: function (responseJSON) {
//on success
},
error: function (jqXHR, tranStatus, errorThrown) {
// on error
}
});
Lấy thông tin chi tiết 1 mặt hàng hay nhóm hàng từ maimai.vn
POST api/product?c={company}&k={api key}&type={type}&id={id}&agent={agent}&pricelist1={pricelist1}&pricelist2={pricelist2}&relCount={relCount}
Đối tượng responseJSON, trong đó
$.ajax({
url: //api.maimai.vn/api/product/',
data: {
c: 'company name',
k: 'api key',
mode: 1,
id: 1,
agent: 1,
pricelist1: 1,
pricelist2: 2,
relCount: 5
},
dataType: "json",
success: function (responseJSON) {
//on success
},
error: function (jqXHR, tranStatus, errorThrown) {
// on error
}
});