Valor Talk

Welcome to Valor Talk Sign in | Join | Help
in Search
 
 
 
Your Ad Here

VALOR API!!

Last post 08-08-2008, 2:30 AM by questdesign. 34 replies.
Page 1 of 3 (35 items)   1 2 3 Next >
Sort Posts: Previous Next
  •  11-19-2006, 12:58 AM 93

    VALOR API!!

    So, I finally sat down and started putting together an API.  I have started simple and would like some feedback before I move forward.

     First things first.  I have made a key manager for you to add your url of the site that will use the api.  The manager will generate a string which will be your 'key' to use the api.  The api must be called from the site you register the key with. (It's late, I hope you're following this)

    The key manager is here:

     http://www.valorcorp.com/Dealer_Products/account/api/key_manager/default.asp (corrected link)

    Once you have your key, you can use the first script I have written which is a simple on hand script.  Paste this script in your webpage where you want the results to show.  There are three properties to set:

    • key
    • item
    • show_onhand

    [key] is to be replaced with the key generated with the link above
    [item] is Valor's 7 digit item number.
    [show_onhand] should be either a 1 or 0. 1 will show the quantity available.  0 will show "In Stock" or "Out of Stock".

    <script type="text/javascript" src=http://www.valorcorp.com/api/stock_status.asp?key=[key]&show_onhand=[show_onhand]&item=[item]></script>

     Of course, this is all being tested, so don't move it to your site yet.  If I can get enough feedback, I will make this the first version so you can add it to your site in time for the holiday rush.

     PLEASE, let me know what you think and what I should change/add etc.

     Thanks, I'm going to sleep


    Ben Newton
    Filed under:
  •  11-20-2006, 3:15 AM 98 in reply to 93

    Re: VALOR API!!

    Sorry Ben What's an API?
  •  11-20-2006, 7:11 AM 100 in reply to 98

    Re: VALOR API!!

    An API (Application Programming Interface) is an interface that any computer application (in this caes, valor's website) makes available to another program or computer.  Basically, it's an extension of Valor's website that you can use on your page.  So far, there is only one limited interface.  The product on hand script.  I'm not even sure if this is technically an API yet, but it will be as I add more features.
    Ben Newton
  •  11-20-2006, 7:46 AM 102 in reply to 93

    Re: VALOR API!!

    I have been waiting a long time for something like this.  It is simple, but awesome.  I have tested it on my site here:

    http://www.lighterfactory.com/testapi.aspx

    It seems to work pretty good.  I'm looking forward to when the entire product catalog can be accessed through the API...then I could really stop using the xls downloads.

     Thanks for working on this Ben.  I know it will be a great help to a lot of people.

  •  11-20-2006, 11:19 AM 103 in reply to 93

    Re: VALOR API!!

    I just did a quick test. It took about two minutes to generate the key and set up a test page. It worked as advertised. This is really above and beyond anything any of our other suppliers make available. Great work, Ben!
  •  11-20-2006, 1:14 PM 104 in reply to 93

    Re: VALOR API!!

    Well I guess an API can be a good thing.  But I remember asking why you took away the FTP for images and your reply was that to many people were having a hard time figure out how to use FTP.

    <> 
    I guess I would rather see the FTP come back with the inventory list in there.

    <>How do you get the API to work in Yahoo Shopping?

    <><>In all honesty.  An API or an RSS feed help the sellers.  But is what really would boost sales would be a conectration on missing product images and descriptions.   I spends dozens of hours each year trying to find missing images. 

    <>I spent a bunch of time acquiring the images of fishing lures.  Bang, I started selling a bunch of those lures.   I went and found the images for all fishing reels and bang I started selling a bunch of reels.  I am still missing close to 8000 Valor Product images.  The last significant image update was March.

     

    <>Robert

    <>Trading Post Supply<><>
     <>

  •  11-20-2006, 1:23 PM 105 in reply to 93

    Re: VALOR API!!

    API and Yahoo Shopping.

    <>What would be some methods to get this to work in Yahoo Shopping. 

    <> 
    <>Could I paste the script into my AVAILABILITY and have it automatically generate QUANTITY when the customer pulls up the item?  That would be awsome.
     

    Robert

    Trading Post Supply 

  •  11-20-2006, 2:10 PM 106 in reply to 105

    Re: VALOR API!!

    Robert,

     I am not familiar with Yahoo Shopping.  Maybe somebody else here will implement it and post intructions.  But, yes, you can paste that script anywhere in the domain you registered for the key with and get the quantity to come up.  As long as you pass the correct item number to the script.

    As for the images, I have addressed that plenty of times, I am not going to again.  I don't take pictures, I program.  So my time is used on programming items like the API.

    As for the FTP, I took it down for security reasons mainly.  People not being able to use it was a problem, but not why I took it down.  I don't really understand what is wrong with downloading some zip files every once in a while.


    Ben Newton
  •  11-20-2006, 2:53 PM 107 in reply to 104

    Re: VALOR API!!

    rdborch:

    <><>In all honesty.  An API or an RSS feed help the sellers.  But is what really would boost sales would be a conectration on missing product images and descriptions.   I spends dozens of hours each year trying to find missing images. 

    <>I spent a bunch of time acquiring the images of fishing lures.  Bang, I started selling a bunch of those lures.   I went and found the images for all fishing reels and bang I started selling a bunch of reels.  I am still missing close to 8000 Valor Product images.  The last significant image update was March.

     

    Gee, when I'm missing a picture I get out my camera.

     

     

  •  11-20-2006, 3:11 PM 108 in reply to 106

    Re: VALOR API!!

    The nice part about the FTP was that I could select and download only the new images.  With the Zip Files I have to download the entire batch and pull out the new ones.

     

    I had tried pasting it into a field in Yahoo and it returns  INVALID URL  here is the exact script

    <script type='text/javascript' src=http://www.valorcorp.com/api/stock_status.asp?key={KEY]&show_onhand=1&item=6705079></script>

     any suggestions.  Did I create the script correctly.  Yes  the key is the one generated by Valor for me.

  •  11-20-2006, 3:16 PM 109 in reply to 107

    Re: VALOR API!!

    Gee, I wish I had all 8000 products without images on hand to take the pictures of.  I suppose I could ask to be let into the Warehouse for 4 weeks.

    <> But yes, taking pictures is a brilliant idea.

     <>Robert<>

  •  11-20-2006, 3:32 PM 110 in reply to 109

    Re: VALOR API!!

    Invalid URL means the site you are calling the script from is not the same as the key.  It looks like you are calling from http://us-f4-edit.store.yahoo.com/ instead of your url.  You probably need to look at the site in a different browser with your url instead of through yahoo..
    Ben Newton
  •  11-20-2006, 3:34 PM 111 in reply to 109

    Re: VALOR API!!

    And if you think you can take 8000 images in 4 weeks of work, I would hire you.

    Let's just drop the images subject.


    Ben Newton
  •  11-20-2006, 10:04 PM 113 in reply to 111

    Re: VALOR API!!

    Ben!

    Great work on the API!  It works great for displaying the item quantity.  Hmm...now how can I go about pulling that value from your javascript and adding a mysql query that will update the quantity in my database each time an item is viewed?  :)
     
    It's late...I'll have to work on that tomorrow or something. 


    --
    Rick
  •  11-21-2006, 11:39 AM 115 in reply to 113

    Re: VALOR API!!

    I would like to have that ability also to update quantities in my database each time an item is viewed. Since I carry other products besides Valor I need to figure out how to fit that into my site an only query the Valor products. It's a great start and something I have been looking forward to.
Page 1 of 3 (35 items)   1 2 3 Next >
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems