Filtering for TimeStamp using ls-retail-guzzle

Ryan ShenkRyan Shenk Member Posts: 12

Good morning. I'm attempting to pull a list of all items under Retail [ItemShop] that were modified in the last week, using ls-retail-guzzle. I'm able to search by description using the below (simplified) code, but I'm not sure what to put in place of the 'description' line in order to search by TimeStamp.

Does anyone have any insight? Thanks, it's appreciated!

  try {

    $query = [

      'load_relations' => '["ItemShops"]',

      'description' => '~,%Wood Picture Frame 8X10%',

      'limit' => 100,

      'offset' => $offset


    $response = $client->get('Item', ['query' => $query]);

    $items = json_decode($response->getBody(), true)['Item'];

    $lsproducts = array_merge($lsproducts, $items);




  • Ryan ShenkRyan Shenk Member Posts: 12

    I'm attempting to work my through it, but every time I use this line as a filter it kicks back that the timestamp needs to follow the ISO 8601 standard (I've run the timestamp through regex and it does).

    'timeStamp' => '>=2018-05-24T18:09:06+00:00',


     HTTP Error 400:\n{\n  "httpCode": "400",\n  "httpMessage": "Bad Request",\n  "message": "Date\\/time value must follow the ISO 8601 standard. >=2019-05-08 15:48 supplied.",\n  "errorClass": "InvalidDateTimeValue"\n}

  • Ryan ShenkRyan Shenk Member Posts: 12

    Figured it out - here's the info if anyone runs into it in the future.

    ls-guzzle-retail syntax:

    {field} => '{operator},{value}'

    'timeStamp' => '>=,2019-05-24T18:09:06+00:00',

Sign In or Register to comment.