public function setItem($iid, array $properties=array(), $eventTime=null)
    {
        $eventTime = $this->getEventTime($eventTime);
        if (empty($properties)) {
            $properties = (object)$properties;
        }
        $json = json_encode([
            'event' => '$set',
            'entityType' => 'item',
            'entityId' => $iid,
            'properties' => $properties,
            'eventTime' => $eventTime,
        ]);

        return $this->sendRequest('POST', $this->eventUrl, $json);
    }