Upload Zoho Inventory Item Image by API

Upload Zoho Inventory Item Image by API


  1. itemID = item.get("item_id");
  2. organizationID = organization.get("organization_id");
  3. resvp = zoho.inventory.getRecordsByID("items",organizationID,itemID,"zoho_inventory_conn");
  4. info resvp;
  5. image_file = invokeurl
  6. [
  7. url: "https://t4.ftcdn.net/jpg/03/13/59/81/360_F_313598127_M2n9aSAYVsfYuSSVytPuYpLAwSEp5lxH.jpg"
  8. type: GET
  9. connection:"zoho_inventory_conn"
  10. ];
  11. image_file.setParamName("image");
  12. image_form = Map();
  13. image_form.put("image_name",image_file);
  14. itemID1 = "2755065000003663509";
  15. response = invokeurl
  16. [
  17. url : "https://inventory.zoho.com/api/v1/items/" + itemID + "/image?organization_id=" + organizationID
  18. type: POST
  19. files:image_file
  20. connection:"zoho_inventory_conn"
  21. ];
  22. info response;

Thanks & Regards
Piyush Goyal
Zoho Developer || 3+ years Experience
+91-8619164837