Retrieving value from inventory API getRecord gives null

Retrieving value from inventory API getRecord gives null

Hi all, I have an issue with my platform I am building. I would like to fetch a list of all my sales orders that are pending shipment from zoho inventory into zoho creator as a list. This is my code for now.

When running the script, i get a null value as seen below.

Why is this the case? The retrieved data should be in a JSON/map format and using get() should be able to give me the information I need. Is this the way to do it or is there another way to do this?

To note that connection to zoho inventory is fine and I am able to get the JSON as seen below.
{"code":0,"message":"success","salesorders":[{"salesorder_id":"4165317000000893001","zcrm_potential_id":"","zcrm_potential_name":"","customer_name":"Chan Jia Jin","customer_id":"4165317000000171252","email":"","delivery_date":"","company_name":"","color_code":"","current_sub_status_id":"","current_sub_status":"confirmed","pickup_location_id":"","salesorder_number":"sample number","reference_number":"","date":"2023-12-12","shipment_date":"","shipment_days":"","due_by_days":"","due_in_days":"","currency_id":"4165317000000077068","source":"Client","currency_code":"SGD","total":0.0,"bcy_total":0.0,"total_invoiced_amount":0.0,"created_time":"2023-12-12T23:44:02+0800","last_modified_time":"2023-12-12T23:44:02+0800","is_emailed":false,"quantity":1.0,"quantity_invoiced":0.0,"quantity_packed":0.0,"quantity_shipped":0.0,"order_status":"confirmed","invoiced_status":"not_invoiced","paid_status":"unpaid","shipped_status":"pending","status":"confirmed","is_drop_shipment":false,"is_backorder":false,"is_manually_fulfilled":false,"sales_channel":"direct_sales","sales_channel_formatted":"Direct Sales","salesperson_name":"Chan Jia Jin","has_attachment":false,"balance":0.0,"delivery_method":"","delivery_method_id":""}],"page_context":{"page":1,"per_page":200,"has_more_page":false,"report_name":"Sales Orders","applied_filter":"Status.All","custom_fields":[],"sort_column":"created_time","sort_order":"D"}}
    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




                          Zoho Writer Writer

                          Get Started. Write Away!

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

                            Zoho CRM コンテンツ




                              ご検討中の方