Coding help
-
I’m not really sure what to look for here but, I have a problem getting updates from a supplier. They allow API calls using XML but I don’t know how or where to put the code to get the file or update inventory. Below is a xml code provided by the supplier. I was thinking if I built a separate page with a button on it that generated the call (POST command) then I could make that page private and would be able to get the data then upload to the products to update the products. I placed this request in this forum because there may already be an extension or add on out there that has these functions but I don’t know if there is. Any ones help would be greatly appreciated because at this point, I can’t update inventory.
The XML document you will send will resemble the following:
<?xml version=”1.0″ encoding=”utf-8″ ?> <inventory><ctid>5B15B4E19BAD45B7920ACB4A4064F234</ctid>
<!–the following “itemlist” container is *OPTIONAL*If you provide an “itemlist”, then server will return only the items you requested, otherwise we will return all active items in our database (about 1MB response file).If you specify invalid item ID’s, they will be ignored.
–>
<itemlist> <item prodid=”AA02″ />
<item prodid=”ACXR410″ />
<item prodid=”AS1″ />
</itemlist>
</inventory>If there is no error, the server will respond with an inventory document similar to the following:
<?xml version=”1.0″ encoding=”utf-8″ ?>
<inventory>
<itemlist>
<item prodid=”AA02″ quantity=”42″ price=”1.16″ map=”0.0″ mfgitem=”AA02″ mfgname=”MAPLE LEAF PRESS INC” />
<item prodid=”ACXR410″ quantity=”0″ price=”321.91″ map=”379.99″ mfgitem=”775011″ mfgname=”EASTON TECHNICAL PRODUCTS” />
<item prodid=”AS1″ quantity=”6″ price=”10.67″ map=”13.99″ mfgitem=”MBC SOX LOW S” mfgname=”TEAM J SALES AND MARKETIN” />
</itemlist>
</inventory>Example of an error:
<?xml version=”1.0″ encoding=”utf-8″ ?>
<error>
<timestamp>20080101120101</timestamp>
<errorid>-20002</errorid>
<errordata>This is your error information</errordata>
</error>I have even tried to send this using POSTMAN but was unsuccessful, I believe because of the https: and the certificate.. Again, any help at all will be greatly appreciated. My coding skills are no where near where they need to be for this.
- The topic ‘Coding help’ is closed to new replies.