Allegro WebAPI

Programming interface of the Allegro platform


Group: Buyer
Last change: 17.07.2014 r.
This method allows for making a bid in an ongoing offer.

  1. session-handle | string | required
    User's session identifier received using the doLogin(Enc) method.
  2. bid-it-id | long | required
    Identifier of an offer in which you wish to make a bid.
  3. bid-user-price | float | required
    Bid price (for offers of a bidding type). For offers of the Buy it Now! type the field must pass a price that equals the Buy it Now! price set by a seller, displayed in the ongoing offer.
  4. bid-quantity | long | required
    Number of items related to the made bid (also in multi-variant offers).
  5. bid-buy-now | long | non-required (required for offers of the Buy it Now! type)
    Information whether the purchase has to be made through But it Now! (the offer has to have such purchase method available). (1 - yes, 0 - no; default value is 0).
  6. pharmacy-recipient-data | PharmacyRecipientDataStruct | required
    Structure containing address data of a buyer (relates to the category: Health and Beauty > OTC drugs; Filling out this structure while making purchase in other category results in ignoring the passed data).
    1. recipient-first-name | string | non-required
      Buyer's name.
    2. recipient-last-name | string | non-required
      Buyer's surname.
    3. recipient-address | string | non-required
      Buyer's address. 
    4. recipient-postcode | string | non-required
      Buyer's postal code.
    5. recipient-city | string | non-required
      Buyer's city.
  7. variant-id | string | non-required
    Identifier of a purchased variant that is received after using the doShowItemInfoExt method.

Sample structure of method call

$dobiditem_request = array(
   'session-handle' => '22eb99326c6be29aa16d07d622bcfbcbee94ad54846f2f4e03_1',
   'bid-it-id' => 1086438628,
   'bid-user-price' => 15.00,
   'bid-quantity' => 1,
   'bid-buy-now' => 0,
   'pharmacy-recipient-data' => array()
   'variant-id' => '22eb99326c6be29aa16d07d622bcfbcbee94ad5',

  1. bid-price | string
    Amount of bid with information about a purchase or current bidding status.

Sample structure of server reply

$dobiditem_response = array(
   'bid-price' => '15.50 PLN – Unfortunately you have been outbidden. Someone has offered higher maximum price. The current highest bid is 15.50 PLN'

    You cannot load information on this offer as it has been removed by the site administrator.
    User whose account has been blocked cannot use this method.
    You cannot make a bid in the indicated offer (e.g. incorrect number of items has been provided, offered price is too low, the offer has disabled the 'Buy it Now!' option, you can buy only via 'Buy it Now!', the offer is closed, you have tried to buy alcohol using Junior account, etc.).
    To buy an item listed as a multi-variant offer, you need to select item variant.
    While buying via 'Buy it Now!' you need to pass in the bid-user-price field a price that equals the Buy it Now! price set by a seller, displayed in the ongoing offer.
    Incorrect offer identifier.
    Number of variant items you wish to buy is incorrect (it exceeds available quantity or is lower than 1).
    Item is listed in other country than country which user is logged in.
    Acceptable limit set by a seller on a number of items bought by a single user has been exceeded (relates only to offers featured as 'Allegro Super Deal' which with set offer limits for a single user).
    Invalid session identifier or the session has expired.
    You cannot place a bid in the indicated offer - users without full account activation cannot take part in offers for which sellers have set 'first purchase' access restriction or in which the seller (in a Buy it Now! offer type) does not allow for payment via PayU.
    You cannot make a bid in this offer - users without full account activation cannot make bids if it less than one hour to end the offer.
    You cannot make a bid in this offer - users without full account activation cannot use Buy it Now! type of offers when they have made purchase in their first offer (within the limit of 500 PLN). This rule relates only to foreign platforms.
    The session-generating WebAPI key has been deactivated (the owner did not accept the User Agreement).
    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.