How to set a field of an asset from within a plugin
To save a custom field value on an Asset, you'll first need to pull the actual AssetFileModel, set the custom attribute on the Asset's ContentModel, and finally re-save the Asset.

The following example assumes you've set a field photoId on your asset source:

$fileId = $response-&gt;getDataItem('fileId');
$asset = craft()-&gt;assets-&gt;getFileById($fileId);
$asset-&gt;getContent()-&gt;setAttribute('photoId', $photo['PhotoId']);
$success = craft()-&gt;assets-&gt;storeFile($asset);