Syntax to create Books Package via API?

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.


  1. package_data = Map();
  2. package_data.put("package_number","Test");
  3. package_data.put("date","2017-01-11");
  4. item_map = Map();
  5. // item_map.put("so_line_item_id",1234);
  6. item_map.put("quantity",1);
  7. // line_items = list();
  8. // line_items.add(item_map);
  9. 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


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      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

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner

                        • Word of the Day

                          Word of the Day


                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner

                        • Word of the Day

                          Word of the Day



                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方