Syntax to create Books Package via API?
I want to create a Package from an existing Sales Order
I pass to the Packages Create function items_list the output from the Create Sales order. Here is the JSON.
- package_data = Map();
- package_data.put("package_number","Test");
- package_data.put("date","2017-01-11");
- item_map = Map();
- // item_map.put("so_line_item_id",1234);
- item_map.put("quantity",1);
- // line_items = list();
- // line_items.add(item_map);
- package_data.put("line_items",sales_order_data.getJSON("salesorder").getJSON("line_items"));
I get this error: {"code":4,"message":"Invalid value passed for Item ID"}
In the Package I do NOT need all line_item data (ie. custom fields), but I don't understand how to pass the Item ID into the create Package function.
Do I need to iterate through the Sales Order line items to generate a new list of items for the Package with only the parameters it requires?
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.