Allegro WebAPI

Programming interface of the Allegro platform

doGetCategoryPath

Last change: 10.04.2012 r.
Availability:
This method allows for loading category path for the category identifier provided on call.

  1. session-id | string | required
    User's session identifier received using the doLogin(Enc) method.
  2. category-id | int | required
    Category identifier.



Sample structure of method call

$dogetcategorypath_request = array(
   'session-id' => '22eb99326c6be29aa16d07d622bcfbcbee94ad54846f2f4e03_1',
   'category-id' => 89070
);

  1. category-path | CategoryData[]
    Array of structures containing information on category structure.
    1. cat-id | int
      Category identifier.
    2. cat-parent | int
      Supracategory identifier (or 0 for main categories).
    3. cat-country | int
      Identifier of country where that category is present.
    4. cat-level | int
      Level in a category structure.
    5. cat-is-leaf | int
      Information whether a given category is the lowest tier category (0 - no, 1 - yes).
    6. cat-name | string
      Category name.
    7. cat-options | string
      Bitmask informing on category attributes (1 - category is hidden).



Sample structure of server reply

$dogetcategorypath_response = array(
   'category-path' => array(
      array(
         '
cat-id' => 20585,
         ' cat-parent' => 0,
         ' cat-country' => 1,
         ' cat-level' => 0,
         ' cat-is-leaf' => 0,
         ' cat-name' => 'Movies',
         ' cat-options' => 0),
      array(
         ' cat-id' => 89054,
         ' cat-parent' => 20585,
         ' cat-country' => 1,
         ' cat-level' => 0,
         ' cat-is-leaf' => 0,
         ' cat-name' => 'Blu-ray',
         ' cat-options' => 0),
      array(
         ' cat-id' => 89070,
         ' cat-parent' => 89054,
         ' cat-country' => 1,
         ' cat-level' => 0,
         ' cat-is-leaf' => 1,
         ' cat-name' => 'Series',
         ' cat-options' => 0))
);

  • ERR_INCORRECT_CATEGORY_ID
    Incorrect category identifier.
  • ERR_NO_SESSION / ERR_SESSION_EXPIRED
    Invalid session identifier or the session has expired.
  • ERR_WEBAPI_KEY_INACTIVE
    The session-generating WebAPI key has been deactivated (the owner did not accept the User Agreement).

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.