API BigCommerce: «Название продукта является дубликатом» `PUT: / catalog / products / $ {product_id}` - PullRequest
0 голосов
/ 18 февраля 2020

Я отправляю следующую полезную нагрузку на v3: PUT: /catalog/products/${product_id}

  name: '**** C4129X HP 29X - High Yield - black - original - LaserJet - toner cartridge (C4129X) - for LaserJet 5000, 5000dn, 5000gn, 5000LE, 5000n, 5100, 5100dtn, 5100Le, 5100n, 5100se, 5100tn',
  description: '                <section id="key-selling-points">                    <h2>Key Selling Points</h2>                    <div class="content"><ul><li>Designed to work precisely with your LaserJet printer></li><li>Ultraprecise techology delivers optimum quality printouts></li><li>High-capacity cartridge means a lower cost per page></li></ul></div>                </section>            ,                <section id="marketing-description">                    <h2>Marketing description</h2>                    <div class="content">The HP 29X Black LaserJet Toner Cartridge with Ultraprecise technology for the HP LaserJet 5000 and 5100 Printer series produces optimum quality output. The higher yield cartridge offers users a long lasting, reliable cartridge which reduces the number of cartridge replacements and printer down-time. This higher yield cartridge also provides customers with a low overall cost of ownership. Average cartridge yields 10000 pages. Declared yield value in acordance with ISO/IEC 19752.><br /></div>                </section>            ,                <section id="whats-in-the-box">                    <h2>What\'s in the Box</h2>                    <div class="content"><ul><li>Recycling guide></li><li>Toner cartridge></li></ul></div>                </section>            ',
  weight: 888,
  width: 0,
  depth: 0,
  height: 0,
  price: 0,
  cost_price: 0,
  retail_price: 0,
  sale_price: 0,
  tax_class_id: 0,
  product_tax_code: '',
  categories: [ 23 ],
  brand_id: 38,
  inventory_warning_level: 5,
  inventory_tracking: 'product',
  total_sold: 0,
  fixed_cost_shipping_price: 0,
  is_free_shipping: false,
  is_visible: true,
  is_featured: false,
  warranty: null,
  mpn: 'C4129X',
  gtin: '',
  availability: 'available',
  availability_description: '',
  condition: 'New',
  is_condition_shown: false,
  order_quantity_minimum: 0,
  order_quantity_maximum: 0,
  page_title: 'C4129X — HP 29X - High Yield - black - original - LaserJet - toner cartridge (C4129X) - for LaserJet 5000, 5000dn, 5000gn, 5000LE, 5000n, 5100, 5100dtn, 5100Le, 5100n, 5100se, 5100tn',
  meta_keywords: [],
  meta_description: 'C4129X — HP 29X - High Yield - black - original - LaserJet - toner cartridge (C4129X) - for LaserJet 5000, 5000dn, 5000gn, 5000LE, 5000n, 5100, 5100dtn, 5100Le, 5100n, 5100se, 5100tn',
  view_count: 2,
  price_hidden_label: '',
  is_price_hidden: false
}

Но я получаю сообщение об ошибке

"error": " Ошибка: запрос вернул код ошибки: 409 и тело: {\ "status \": 409, \ "title \": \ "Имя продукта является дубликатом \", \ "type \": \ "https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes \ ", \" errors \ ": {\" name \ ": \" Название продукта является дубликатом \ "}

Не вижу, что не так ... I нужно только обновить. Если имя совпадает с предыдущим - не должно ли оно быть разрешено

1 Ответ

0 голосов
/ 22 февраля 2020

Вы пытались искать в своем магазине, чтобы узнать, имеет ли другой продукт похожее название? Если вы делаете запрос GET для того же product_id, успешно ли он загружается с тем же продуктом?

...