Shopping.com Partners Resource Center Forums

Best Practices / Optimization

RSS Feed

How to get Attributes and their values in a single request

    • MikeR
    • Topic created 2/18/09 10:22 am

    While doing a search by keyword is it possible to get the following items in a single API request?
    - products and offers
    - attributes
    - attribute values
    - related searches
    - categories (would be a nice bonus but optional)

    numAttributes=10&numAttributesWithValues=5 gives me attributes but no attribute values, because I don't know category ID at the time the keyword is submitted to API.

    Basically what we want is to be able to produce the page similar to what you have at shopping.com.
    If i go there and type in "music" for example, the result page has everything i mentioned above.
    Are you sending more than one API request to produce it?


    I'd like to get a list of parameters I need to supply to API query, if it is possible to do at all.


    Thank you

  1. Ryan3/2/09 6:16 pm

    Hi Mike -

    The query including just the keyword should include everything you are looking for:

    http://sandbox.api.shopping.com/publisher/3.0/rest/GeneralSearch?apiKey=authorized-key&trackingId=7000610&keyword=music

    I'm guessing your configuration has attributes turned off by default (to save query time) so you would need to set 'numValuesPerAttribute' as well as the other two parameters you already mentioned. Also, if you really want the different categories, you can disable skipping (http://developer.shopping.com/docs/API_Use_Cases#29) although your results will be less relevant (I wouldn't suggest using this.)

    Hope this helps,
    --ryan