API Items search_field or category_id isn't returning requested search

Comments

3 comments

  • Avatar
    Chris Muench

    Can you post code?

  • Avatar
    J Kenneth
    <?php
    //////////////////////////////////////////////////////////
    $api_key = '40gc8c8wsco0swgokwk4gwsswk4484cw44s88w4g';
    ///////////////////////////////////////////////////////////


    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $api_base_url.'items/');
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
    'x-api-key:'.$api_key,
    'accept: application/json',
    ));
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

    $result = json_decode(curl_exec($curl));


    ?>
  • Avatar
    Chris Muench

    You need to pass parameters in url

     

    curl_setopt($curl, CURLOPT_URL, $api_base_url.'items/'?search =SEARCH);

Please sign in to leave a comment.