API Items search_field or category_id isn't returning requested search

J Kenneth
 

Whenever I try any search field or category id I receive the same information back I would with "/items". If I search with "/items/1" it works but nothing else does. I do not receive an error, I just keep receiving the same information back no matter what search field or category id I use.

Comments

3 comments

  • Comment author
    Chris Muench

    Can you post code?

    0
  • Comment author
    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));


    ?>
    0
  • Comment author
    Chris Muench

    You need to pass parameters in url

     

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

    0

Please sign in to leave a comment.