PHP API creating Sales Order

PHP API creating Sales Order

Can someone please help me with creating a Sales Order using API? I can provide code and response. I tried a lot of things but nothing works for me.

Thank you!

$access_token = access_token_value();
$data = array(
"customer_id" => "1481060XXXXXXXXXXXXX",
"salesorder_number" => "026986",
"date" => "2021-09-27",
"delivery_method" => "free_shipping",
"line_items" => array(
"item_id" => "272000000247",
"rate" => "112",
"quantity" => "2"
//$data_string = "JSONString=".urlencode(json_encode($data));
echo "<br><br>".json_encode($data)."<br><br>";
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, "");
curl_setopt($ch,CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch,CURLOPT_HTTPHEADER, array (
'Authorization: Zoho-oauthtoken ' . $access_token,
'Content-Type: application/x-www-form-urlencoded'
$response = curl_exec($ch);

My response:
object(stdClass)#7078 (2) { ["code"]=> int(4) ["message"]=> string(35) "Invalid value passed for JSONString" }
    • Sticky Posts

    • Authtoken Deprecation for Zoho Inventory APIs

      UPDATE (7 July 2021): We've extended the deadline to 30 August 2021 for converting Authtokens to OAuth.  Hello everyone,   The usage of Authtokens to authenticate API calls is being deprecated on 30 August 2021 across Zoho's Finance suite of products,
    • ZOHO Inventory - Early Access

    Zoho Pagesense Resources

        Zoho SalesIQ Resources

              Zoho TeamInbox Resources

                Zoho DataPrep Resources

                    Zoho CRM Plus Resources

                      Zoho Books Resources

                        Zoho Subscriptions Resources

                          Zoho Desk Resources

                            Zoho Projects Resources

                              Zoho Sprints Resources

                                Qntrl Resources

                                  Zoho Creator Resources

                                    Zoho WorkDrive Resources

                                        Zoho Campaigns Resources

                                          Zoho CRM Resources

                                                      Design. Discuss. Deliver.

                                                      Create visually engaging stories with Zoho Show.

                                                      Get Started Now