Product category attributes

Hello People,

I am using your API for testing purpose and i am able to see the categories in the /products. 

I want to see the different category attributes list for a particular product to the given Retailer.

Would you please suggest me on this?

Is there any other API request i have to do for getting category_attributes for a product?

If you give directly the retailer name from the list of supported stores in your list for the category_Attributes also helpful.

 

Thanks,

Rajanikanth

15replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hey Raj,


    Thanks for posting! Can you elaborate a bit on what you mean by category attributes? Can you suggest some examples?

    Reply Like
  • For example for the /product request gives the response which can include the category attributes like below.

    "categories": [
          "Apparel & Accessories~~Shoes~~Flats"
        ],
        "category_attributes": [
          "g-women"
        ],
        "site_categories": [
          "Flats"
        ],
    Reply Like
    • Hey @Raj,

       

      Please correct if I'm wrong, I'm not 100% sure I understand the question but I'll do my best.

       

      You might be looking for /product/filters, https://docs.twotap.com/v1.0/reference#product-filters .

       

      From the docs:
      - Use this endpoint to get a list of possible filters for certain search criteria.
       

      Meaning you can ping /product/filters and search for a certain site_id. The API will respond with the available filters for the products from that store only. For instance:
       

      filter = {
        site_ids: [ 'site_id' ]
      }
      
      response = RestClient.post "https://api.twotap.com/v1.0/product/filters?public_token=PUBLIC_TOKEN", {
        filter: filter
      }
      
      puts response.body
      Reply Like
  • Hi Radu,

    I followed the same way as you mentioned above.

    But the API is not giving category_attributes field in the response coming from twotap for the particular site_id.

    Have you ever seen the category_attributes in the response coming from twotap for any site_id supported by twotap?

    Reply Like
    • Rajanikanth Reddy are you sure?

       

      This seems to work pretty well:
       

      #!/usr/bin/env ruby
      
      require 'rubygems'
      require 'httparty'
      
      filter = {
        :site_ids => [ '563b57fd69702d31d40007ab']
      }
      
      response = HTTParty.post "https://api.twotap.com/v1.0/product/filters?public_token=PUBLIC_TOKEN",
        :body => { :filter => filter }.to_json,
        :headers => {'Content-Type' => 'application/json'}
      
      puts response.body
      Reply Like
  • Yes @Radu. As Twotap API is showing in the response for /product/scroll request but in a real situation the category_attributes are not coming in the response.

     

    Please check with your team and help me out on this.

    Thanks,

    Rajanikanth 

    Reply Like
    • Raj,

       

      I'm afraid I don't understand. If you make a /product/scroll request and you set the filter right it will work.

       

      -R.

      Reply Like
    • Radu Spineanu 

      The filter is correct and I am getting the results. But in the results the category_attributes are not available.

      Reply Like
  • Raj,

     

    Pushed a change. Can you check now please?

    Reply Like
  • Radu,

    Thank you.  Still, the response coming from two-tap is not having category_attributes.

    Reply Like
    • @Raj

       

      Try making sure that you are filtering for products with those category_attributes
      
      filter = {
        :site_ids => [ '563b57fd69702d31d40007ab'],
        :genders => [ 'g-women' ]
      }
      
      response = HTTParty.post "https://api.twotap.com/v1.0/product/search?public_token=TOKEN",
        :body => { :filter => filter }.to_json,
        :headers => {'Content-Type' => 'application/json'}
      
      puts response.body
      
      Reply Like
  • Radu   

    I need the response from the two-tap by giving the only site_id as a filter. So can you suggest me on this?

    Reply Like
    • @Raj For a given site some products have category_attributes and some do not.

       

      Meaning:

      - if you don't filter by any category_attribute Two Tap will return everything for that site. Products with and without category_attributes.

      - If you also add a category_attribute in the filter field Two Tap will return only the ones matching that pattern.

      Reply Like
  • Radu Spineanu ,

    Yes, You are correct.

    But i want to know the site name or site_id's which are giving category_attributes in the response.

    Reply Like
    • I can see the site_id under each product in the response.

      Reply Like
reply to topic
Like Follow
  • 1 mth agoLast active
  • 15Replies
  • 248Views
  • 2 Following