• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

8. The eBay API > 119. Leave Feedback with the API

Leave Feedback with the API

Use the LeaveFeedback API call to more easily leave feedback.

The eBay API includes extensive support both for leaving feedback for other users and for retrieving comments from your own feedback profile.

Here’s a sample script used to leave feedback for another user with whom you’ve had a transaction (save it as leavefeedback.pl):

#!/usr/bin/perl
require 'ebay.pl';
     $item_id= shift @ARGV;
 $target_user = shift @ARGV;
$comment_type = shift @ARGV;
     $comment = shift @ARGV;

defined($comment) && $comment_type =~ m:^(positive|negative|neutral)$: 
or die "Usage: $0 item user positive/negative/neutral comment";
        my $rsp = call_api({ Verb => 'LeaveFeedback',
     DetailLevel => 0,

         ItemId => $item_id,
     TargetUser => $target_user,
    CommentType => $comment_type,
        Comment => $comment});
if ($rsp->{Errors}) {
print_error($rsp)
} else {
 print "Status: $rsp->{LeaveFeedback}{Status}";
}

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint