question

gbm avatar image
gbm asked zgreathouse Deactivated edited

How to update "options" of inventory item

ThatnHi,
I am trying to update the 'options' field of an item using https://apisandbox.dev.clover.com/v3/merchants/mId/items/itemId.
I am able to update the name, alternate name.

In my body request...I have the options listed as part of things to update but when I retrieve that inventory item, options are not listed...seems they are not been added.

Here is the request Clover Reference is generating for the post:
var request = require("request");
var options = { method: 'POST',
  url: 'https://apisandbox.dev.clover.com/v3/merchants/{mID}/items/{itemID}',
  qs: 
   { expand: 'options',
     access_token: 'ACCESS_TOKEN' },
  headers: { 'content-type': 'application/json' },
  body: '{"options":[{"name":"image_url","attribute":{"id":"1A"},"items":[{"id":"101AL"},{"id":"102AL"}]}],"name":"Item Name 1","alternateName":"Alternate Name 2","price":400}' };
request(options, function (error, response, body) {
  if (error) throw new Error(error);
  console.log(body);
});
Is there a way to update and push more options to the options field of each inventory item?
Thanks in advance.
Inventory
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

zgreathouse avatar image
zgreathouse Deactivated answered zgreathouse Deactivated edited
This question has to do with Items with Variants. Please see this post on how to properly create Items with Variants using the API: https://community.clover.com/questions/14204/how-to-create-itemgroup-on-clover-web-portal-and-o-1.html

If after reviewing the post you have further questions please let me know.
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community