Help Search our knowledge base:

Index - FAQ - Shopping Cart APIs

 Details
Frequently Asked
Question (FAQ)

Document Number: 971

Optimize for Printing
E-Mail This Link

 Feedback
This document ...
helps resolve my question or problem.
does not apply to my question or problem.
is inaccurate for my question or problem.
Admin API

Audience
This document is intended for developers who are familiar with SOAP and how to contact a SOAP service. If you are unfamiliar with SOAP we recommend you contact a developer that can assist you as our support staff cannot help with SOAP related issues.

About adminAPI
The adminAPI is a SOAP-based interface that can be used to view or modify certain settings in the merchants shopping cart administration area. This is useful for web hosting companies that would like to more seamlessly integrate the shopping cart into their platforms.

Before You Begin
You will need to contact LinkPointCart to enable adminAPI access for your application. To enable access we will need the following information:
  1. Your application/company name that we will display to the user
  2. A URL to your privacy policies
  3. A URL to post information to once the user authorizes your application
  4. A URL to direct the customer back to if they decide to decline authorization
  5. OPTIONAL: a reseller username within the LinkPointCart system. This will be used if the merchant is new to the LinkPointCart system.

Once we receive this information we will give you an RUNAME that can be used within the API.

The Merchant
The merchant must authorize your application before you can access their information. Direct the merchant to this URL so that they can authorize your application:
https://dreamhorse.linkpointcart.net/cgi-bin/adminAPI.cgi?runame=RUNAME
Make sure to replace RUNAME with the one provided by LinkPointCart

adminAPI WSDL
http://dreamhorse.linkpointcart.net/cgi-bin/adminAPI.cgi?wsdl

Methods Available - for a more detailed explanation see below
   authenticate (RuName, UserName, Password)
   getValues(Token, XMLData)
   setValues(Token, XMLData)
   listFiles(Token)
   uploadFile(Token, FileType, FileName, FileData)
   deleteFile(Token, FileType, FileName)

PHP Sample Code
   $xmlRequest = '<?xml version="1.0" encoding="utf-8"?><XML><CompanyName /></XML>';
   $client = new SoapClient('http://dreamhorse.linkpointcart.net/cgi-bin/adminAPI.cgi?wsdl');
   $resAuth = $client->authenticate('RuName', 'UserName', 'Password');
   $resValues = $client->getValues($resAuth['Token'], $xmlRequest);
   $xmlRes = new SimpleXMLElement($resValues['ResultXML']);
   print "CompanyName: ".$xmlRes->CompanyName."\n";

Method Details
Below is a list of each method available, and a description of their use.

authenticate (RuName, UserName, Password)
Authenticate your session. It returns your authorization Token and a Message. Authentication tokens will expire after 15 minutes of inactivity.

Input Parameters
RuName:The RuName parameter you received from LinkPointCart when you signed up to use the adminAPI.
UserName:The UserName of the merchant that you want to access.
Password:The password token your application received when the merchant authorized your application.

Output Parameters
Token:The authentication token can be up to 255 characters in length. This is required before you can access any other method.
Message:Will either be "Success" or a textual description of why your authentication failed.


getValues (Token, XMLData)
This method allows you to view a setting inside the shopping cart administration. Not all settings can be viewed. Click here for a complete list of allowed values.

Input Parameters
Token:The authentication token you received from the authenticate method.
RequestXML:An XML listing of the values you would like returned.

Example:
<?xml version='1.0' encoding='UTF-8'?>
<XML>
    <HTML.TextColor />
    <HTML.FontFace />
</XML>

Output Parameters
ResultXML:The XML result based on your request.

Example:
<?xml version='1.0' encoding='UTF-8'?>
<XML>
    <HTML.TextColor>red</HTML.TextColor>
    <HTML.FontFace>arial</HTML.FontFace>
</XML>
Message:A text message regarding your request.

Example:
Success


setValues (Token, XMLData)
This method allows you to change a setting inside the shopping cart administration. Not all settings can be changed. Click here for a complete list of allowed values.

Input Parameters
Token:The authentication token you received from the authenticate method.
RequestXML:An XML listing of the values you would like returned.

Example:
<?xml version='1.0' encoding='UTF-8'?>
<XML>
    <HTML.TextColor>red</HTML.TextColor>
    <HTML.FontFace />
</XML>

Output Parameters
ResultXML:The XML result based on your request.

Example:
<?xml version='1.0' encoding='UTF-8'?>
<XML>
    <HTML.TextColor>red</HTML.TextColor>
    <HTML.FontFace />
</XML>
Message:A text message regarding your request.

Example:
Success


listFiles (Token)
This method returns an XML list of the currently uploaded files, and their size on disk.

Input Parameters
Token:The authentication token you received from the authenticate method.

Output Parameters
ResultXML:The XML result based on your request.

Example:
<?xml version='1.0' encoding='UTF-8'?>
<XML>
    <Public>
        <myimage.jpg>97792</myimage.jpg>
        <logo.gif>97792</logo.gif>
    </Public>
    <ESD>
        <product.exe>97384792</product.exe>
    </ESD>
</XML>
Message:A text message regarding your request.

Example:
Success


uploadFile (Token, FileType, FileName, FileData)
Upload a file to the server.

Input Parameters
Token:The authentication token you received from the authenticate method.
FileType:This can be either "Public" or "ESD".

Public files will be available at:
https://dreamhorse.linkpointcart.net/userpages/USERNAME/FileName

ESD files will be uploaded as if the merchant used the Upload ESD File tool.
FileName:The name of the file you wish to delete.
FileData:The data you wish to save.

Output Parameters
Message:A text message regarding your request.

Example:
Success


deleteFile (Token, FileType, FileName)
Delete one of your previously uploaded files.

Input Parameters
Token:The authentication token you received from the authenticate method.
FileType:This can be either "Public" or "ESD".
FileName:The name of the file you wish to delete.

Output Parameters
Message:A text message regarding your request.

Example:
File does not exist.