Allegro WebAPI

Programming interface of the Allegro platform

doAddToBlackList

Group: Blacklist
Last change: ---
Availability:
This method allows for adding indicated users to a blacklist. Users from the blacklist cannot buy items from the owner of the list.

  1. session-handle | string | required
    User's session identifier received using the doLogin(Enc) method.
  2. users-black-list-array | UserBlackListStruct[] | required
    Arrays with structures containing information users to be added to blacklist (max. 25).
    1. user-id | int | required
      User identifier.
    2. user-black-list-note | string | non-required
      Memo describing reasons of adding a user to blacklist.



Sample structure of method call

$doaddtoblacklist_request = array(
   'session-handle
' => '22eb99326c6be29aa16d07d622bcfbcbee94ad54846f2f4e03_1',
  
'users-black-list-array' => array(
      array(
        
'user-id' => 6241878,
        
'user-black-list-note' = 'Joker'),
      array(
        
'user-id' => 7730309,
         'user-black-list-note' = ''))
);

  1. user-black-list-results-arr | UserBlackListAddResultStruct[]
    Array of structures containing information on operation results.
    1. user-id | int
      User identifier.
    2. add-to-black-list-result | int
      Result of an attempt of adding a user to blacklist (1 - positive, 0 - negative).
    3. add-to-black-list-err-code | string
      Error code indicating a reason of the failure (for negative result).
    4. add-to-black-list-err-msg | string
      Error message describing a reason of the failure (for the negative result).



Sample structure of server reply

$doaddtoblacklist_response = array(
   'user-black-list-results-arr
' => array(
      array(
        
'user-id' => 6241878,
         'add-to-black-list-result' => 1,
         'add-to-black-err-code' => '',
         'add-to-black-err-msg' => ''),
      array(
         'user-id' => 7730309,
         'add-to-black-list-result' => 0,
         'add-to-black-err-code' => 'ERR_USER_ALREADY_ADDED_TO_BLACK_LIST',
         'add-to-black-err-msg' => 'This user is on your blacklist.'))
);


  • ERR_CANT_ADD_YOURSELF_TO_BLACK_LIST
    You cannot add yourself to blacklist.
  • ERR_NO_SESSION / ERR_SESSION_EXPIRED
    Invalid session identifier or the session has expired.
  • ERR_USER_ALREADY_ADDED_TO_BLACK_LIST
    This user is already on the black list.
  • ERR_USER_IS_GUEST
    This user has not registered an account on the site.
  • ERR_USER_NOT_FOUND
    Invalid user identifier.
  • ERR_USERS_ARRAY_OVERSIZED
    No user identifier has been provided or the number of identifiers exceeds the acceptable limit (max. 25).
  • ERR_WEBAPI_KEY_INACTIVE
    The session-generating WebAPI key has been deactivated (the owner did not accept the User Agreement).
  • ERR_WEBAPI_NOT_AVAIL
    Problems with Allegro WebAPI service.

Allegro is not to be held liable for consequences of using examples of the published code. It does not guarantee its correct operation either. The code you see serves as an example only and may contain errors.