Volusion's API is a powerful tool that lets you integrate your store with nifty applications such as Quickbooks, StoneEdge, Endicia and more! Additionally, Volusion provides easy access to custom XML exports that can extend your store's functionality and integrate it with other third-party software and services.
To access the Volusion API, you must have a Business or Prime monthly hosting plan. Additionally, please keep in mind that the Volusion API was designed for advanced users and developers with API experience; it is provided as-is!
Getting Started 🏎️
With generic XML exports, you can create custom XML exports with the Orders, Products and Customers tables within your store database. The Volusion API lets you import, export, and update store data in a secure manner, or exchange information with other web services or programs.
Accessing the Generic Export System
To export your Orders table via XML, do the following:
- In your Admin Area, go to Inventory > Volusion API.
- Click Run next to one of the following export headings: Generic\Orders, Generic\Products, or Generic\Customers.
Executing an Export
There are a few things to keep in mind when using Volusion's Generic Exports:
- When you create an export, it will only output up to 100 records at once. The export will begin with the very first element in the database and export every element up to the 100th element (e.g. the Orders Export will export orders from Order ID 1000 to 1099).
- If you have many elements in your database, you'll need to run multiple (e.g. first generate an export for Order IDs 1000-1099, then generate a second export for Order IDs 1100-1199).
- Once an export has been generated, Volusion assigns it a timestamp. That export can only be generated once unless the user resets the export event. This process is described below under the topic, Export Tool Bar:
The Generic Export pages consist of two main elements - the Export Table and the Export Tool Bar.
The Export Table consists of 4 columns, described below:
- Column Name: The items listed in this column are the names of the database values that can be exported from your store's database. They are referred to in the export by the names given for each field here.
- SQLDB Type: These are the data types of entities found in Column Name.
- SELECT Columns: Checking a box in this column will set the corresponding database field in Column Name to be exported.
- WHERE Value: You can set a value in this field to instruct the API to export only values for the corresponding Column Name. Note: If used, this field must have an explicit value (e.g. 123, ABC). Users cannot set value ranges or operators such as "<" or ">" in this field.
If displayed, the Export Tool Bar consists of three elements:
- Select Date: This drop-down lets you select which export you wish to reset. All exports are assigned a timestamp which lists the date and time the export was generated.
- IDs: Once a timestamp from the Select Date field is chosen, this drop-down will be populated. The IDs drop-down will contain ID numbers for each primary key element that was exported on the date that the user has chosen. For example, within the Orders export, these IDs will be the Order ID number for each order in the export. Users can select one ID to reset or the ALL IDs value to reset all IDs within the selected export.
- Reset Export: This button will execute the export reset.
You should now understand how to use the functions within the Generic Exports portion of the API page. Please keep in mind when creating a custom XML export that the WHERE_Value field in each export page requires a specific value relating to its corresponding Column name. Many users make the mistake of using an operator such as "=" or "X AND Y" in this field, which cannot be processed in a database query.
Using the Generic Exports ↗️
Now that there's an export containing all of the Order IDs for the current day or a list of all products within the database, how is that export used? This next section will show you what to do with the XML once it has been exported.
Example: Exporting a List of Customers
You may want to have a list of customers exported via XML - possibly for use with a customer tracking application for marketing. In this case, you can export your customers' names, ID numbers, and the type of access the customer has to the site (are they a customer, an affiliate, etc.?), as follows:
- From your Admin Area, go to Inventory > Import/Export.
- Click on the Volusion API tab and click Run next to Generic\Customers.
- In the select column, check the boxes corresponding to the fields CustomerID, AccessKey, FirstName, and LastName
- Next, in the WHERE_Value column for the AccessKey element, enter "C". This tells the system to export only values where the AccessKey type is set as "C" ("C" represents customer as opposed to "A" for administrators or "P" for partners/affiliates).
- Click Run.
Once this process is complete, the API page will refresh. Click Download or use the URL provided to view the XML file in your browser.
Once you click the link to download the XML file, it invalidates the URL presented in the text box. If you have already downloaded the XML file, you'll need to reset and regenerate the XML export to gain valid access to the URL.
At this point, you should now understand how to implement Generic Exports within the Volusion API in few simple steps. This tool can produce a wealth of information, and there are endless ways Volusion can connect and share that information with other software and services; the sample code above is just one example!
For more information on the API and further examples of what can be done with it, see the Volusion API Developer resources.