{
"filter": {
"offer_id": [
],
"product_id": [
],
"visibility": "ALL"
},
"page": 0,
"page_size": 0
}
Exception: Request failed for https://api-seller.ozon.ru returned code 400. Truncated server response: {"error":{"code":"BAD_REQUEST","message":"Invalid JSON payload","data":[{"name":"cause","code":"","value":"invalid character 'i' in literal false (... (use muteHttpExceptions option to examine full response)
function myFunction() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("Лист1");
var row = sheet.getRange(2,2);
const API_URL = "https://api-seller.ozon.ru";
const endpoint = "/v1/product/list";
// const endpoint = "/v2/posting/fbs/list";
let options = {
method: "POST",
headers: {
'Client-Id': 'XXX',
'Api-Key': 'XXX',
'accept': 'application/json'
},
payload:{
"filter": {
"offer_id": [
// "string" // задайте значение или список
],
"product_id": [
// 0 // задайте значение или список
],
"visibility": "ALL" /* "ALL" "VISIBLE" "INVISIBLE" "EMPTY_STOCK" "NOT_MODERATED" "MODERATED" "DISABLED" "STATE_FAILED" "READY_TO_SUPPLY" "EMPTY_NAVIGATION_CATEGORY" "VALIDATION_STATE_PENDING" "VALIDATION_STATE_FAIL" "VALIDATION_STATE_SUCCESS" "TO_SUPPLY" "IN_SALE" "REMOVED_FROM_SALE" "ARCHIVED" */
},
"page": 0, // Номер страницы, возвращаемой в запросе.
"page_size": 0 // Количество элементов на странице.
}
};
let response = UrlFetchApp.fetch(API_URL + endpoint, options);
let data = JSON.parse(response);
Logger.log(data);
}
Ошибка
Exception: Request failed for https://api-seller.ozon.ru returned code 400. Truncated server response: {"error":{"code":"BAD_REQUEST","message":"Invalid JSON payload","data":[{"name":"cause","code":"","value":"EOF","message":""}]}}
(use muteHttpExceptions option to examine full response)
<script>
$("input[name='qty']").each(function() {
var self = $(this);
var max = self.attr('max');
self.TouchSpin({
min: 0,
max: max,
});
});
</script>
<input id="qty" type="text" max="<?=$rowProduct['quantity']?>" min="1" value="1" name="qty" class="form-control-sm form-control" style="display: block;">
SELECT products.name, products.sku, t.*
FROM relatedProduct AS t
INNER JOIN products ON products.id = t.idProduct
WHERE ((t.idProduct = '850' and t.relProduct <> '850') or (t.relProduct = '850' and t.idProduct <> '850'))
"name" "sku" "id" "idProduct" "relProduct"
"Паяльник 30W, 220V, «Ермак»" "44601" "3" "1885" "850"
"Паяльник 40W, 220V, «Ермак»" "44600" "4" "1886" "850"
SELECT products.name, products.sku, t.*
FROM relatedProduct AS t
INNER JOIN products ON products.id = t.idProduct
WHERE ((t.idProduct = '1885' and t.relProduct <> '1885') or (t.relProduct = '1885' and t.idProduct <> '1885'))
"name" "sku" "id" "idProduct" "relProduct"
"Паяльник 30W, 220V, «Ермак»" "44601" "1" "1885" "1943"
"Паяльник 30W, 220V, «Ермак»" "44601" "2" "1885" "998"
"Паяльник 30W, 220V, «Ермак»" "44601" "3" "1885" "850"
"name" "sku" "id" "idProduct" "relProduct"
"Канифоль 20гр" "7817" "1" "1885" "1943"
"Канифоль жидкая, 25мл, Connector" "37483" "2" "1885" "998"
"Припой ПОС-40, пруток 8мм" "26731" "3" "1885" "850"
SELECT * FROM relatedProduct AS t
where ( (t.idProduct = idProduct and t.relProduct <> idProduct)
or (t.relProduct = idProduct and t.idProduct <> idProduct))
foreach ($links['Links'] as $url) {
$needles = [
'art1' => 'pattern1',
'art2' => 'pattern2'
];
foreach ($links['Links'] as $url) {
$needles = [
'art1' => 'pattern1',
'art2' => 'pattern2'
];
$matches=[];
$url = dlPage($url['url']);
foreach($url->find('div.content') as $art=>&$article) {
preg_match("/{$needles[$art]}/", $article, $match);
}
}
в bootstrap4 нет элемента sidebar-item, это аналог nav-item?