0

Hi can any one tell me how to get addition information (info_buyrequest) in rest api result
https://mainwebsite.com/index.php/rest/V1/orders/$order_id. but here not getting product options getting remaining data

$order_id=42678;
$accessToken = "accesstoken";
$setHeaders = array('Content-Type:application/json', 'Authorization:Bearer ' . $accessToken);
   $ch = curl_init("https://website.com/index.php/rest/V1/orders/$order_id");
   curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
   curl_setopt($ch, CURLOPT_HTTPHEADER, $setHeaders);

   $result = curl_exec($ch);
   $result = json_decode($result, 1);
    echo '<pre>';
//    echo '************************************************** Order **************************************************************';
    print_r($result);

i need below info in order rest api result how to get

 [product_options] => Array
        (
            [aw_gc_amount] => 100.00
            [aw_gc_sender_name] => Aaron, Amy and Anna
            [aw_gc_recipient_name] => Don and Naomi Hazlett
            [aw_gc_headline] =>
            [aw_gc_message] => Enjoy 
            [aw_gc_delivery_date] =>
            [aw_gc_delivery_date_timezone] =>
            [aw_gc_type] => 2
            [aw_gc_created_codes] => Array
                (
                    [0] => F3VDD9S7K09JVHOP
                )

            [info_buyRequest] => Array
                (
                    [uenc] => 
                    [product] => 8680
                    [aw_gc_amount] => 100.00
                    [aw_gc_recipient_name] => Don and Naomi Hazlett
                    [aw_gc_sender_name] => Aaron, Amy and Anna
                    [aw_gc_message] => Enjoy 
                    [qty] => 1
                )

        )

1 Answer 1

0

The info_buyRequest option is not exposed via the rest API, you will have to create your own method if you want to access it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.