Volusion API - Export Orders by Date Range

2019-03-03 13:29发布

问题:

On a scheduled basis, I would like to export Volusion orders by a date range:

select * from orders o where o.OrderDate >= '7/20/2015' AND o.OrderDate <= '7/23/2015'

Is this possible? It appears my URL can only do an equals sign:

https://www.XX.net/net/WebService.aspx?Login=shopxperts@yahoo.com&EncryptedPassword=XX&EDI_Name=Generic\Orders&SELECT_Columns=*&WHERE_Column=o.orderdate&WHERE_Value=7/18/2015 10:58:09 AM

I looked at the SQL saved query feature. Is there a way to save a query with parameters, then fill them in?

回答1:

Yes you can insert parameters into the query and execute it from the Generic folder.

Using a custom ASP page, this is a summary of what you would have to do

1- Read the querystring(s) and sanitizing them.

2- Construct the SQL query with sanitized parameters

3- Write the SQL and XSD files to the "Generic" folder

4- execute the now written file in the generic folder by making a http request

https://www.XX.net/net/WebService.aspx?Login=shopxperts@yahoo.com&EncryptedPassword=XX&EDI_Name=Generic\xyz

5- Delete the files since it's no longer needed once the query is complete.

6- Return data from the query to the page requesting the data

Obviously, this is an very abridged version of what you would need to do but it is certainly possible.



标签: volusion