Have been trying to fetch orders with this code snippet:
' Dim addS As String = (offs * 100).ToString
Dim addS As String = "0" 'credentials("lastorderid")
Try
Dim req As WebRequest = WebRequest.Create("https://apirest.3dcart.com/3dCartWebAPI/v1/Orders/?limit=100&offset=" + addS)
req.ContentType = "Content-Type: application/json;charset=UTF-8"
req.Headers.Add("SecureURL: " + credentials("SecureURL").ToString())
req.Headers.Add("PrivateKey: " + credentials("PrivateKey").ToString())
req.Headers.Add("Token: " + credentials("Token").ToString())
Any time I try to bump addS to a number greater than 0 I get an error. I need to get just the new orders.
I suspect it is something to do with the parameters on the request line.
As you can see, later in the code once we have the last order fetched, we'll update the lastorderid so next time the app is run, it begins at lastorderid+1
Anyone able to provide a suggestion?
Thanks in advance.
' Dim addS As String = (offs * 100).ToString
Dim addS As String = "0" 'credentials("lastorderid")
Try
Dim req As WebRequest = WebRequest.Create("https://apirest.3dcart.com/3dCartWebAPI/v1/Orders/?limit=100&offset=" + addS)
req.ContentType = "Content-Type: application/json;charset=UTF-8"
req.Headers.Add("SecureURL: " + credentials("SecureURL").ToString())
req.Headers.Add("PrivateKey: " + credentials("PrivateKey").ToString())
req.Headers.Add("Token: " + credentials("Token").ToString())
Any time I try to bump addS to a number greater than 0 I get an error. I need to get just the new orders.
I suspect it is something to do with the parameters on the request line.
As you can see, later in the code once we have the last order fetched, we'll update the lastorderid so next time the app is run, it begins at lastorderid+1
Anyone able to provide a suggestion?
Thanks in advance.
Comment