NAV
ASP.net

Authentication

Test Credentials

User Password Rights
vrp vrp Read Only
<%
 Dim SiteCredentials As System.Net.ICredentials = New System.Net.NetworkCredential("USER","PASSWORD")
 %>

Inventory

Get All Inventory

This endpoint retrieves all inventory.

HTTP Request

GET http://dev.visualretailplus.com/inventory

<%
  try
   Dim ThreadResponse = ""
   Dim PathURL As String = "http://dev.visualretailplus.com/inventory?upc=800111"
   Dim SiteCredentials As System.Net.ICredentials = New System.Net.NetworkCredential("USER","PASSWORD")
   Dim rdataStream As System.IO.Stream
   Dim request As System.net.WebRequest = System.net.WebRequest.Create(PathURL)
   request.Credentials = SiteCredentials
   request.Method = "GET"
   Dim rsp = CType(request.GetResponse(), system.net.HttpWebResponse)
   Dim  dataStream = rsp.GetResponseStream()
   Dim reader As New System.IO.StreamReader(dataStream)
   ThreadResponse = reader.ReadToEnd()
   reader.Close()
   dataStream.Close()
   response.write(ThreadResponse)
 catch ex as exception 
     response.write(ex.message)
 end try
     response.end()
%>

The above command returns JSON structured like this:

{
    "results": [{
        "StoreID": "01",
        "UPC": "800111",
        "IVDesc": "Slv-less rouched top",
        "Size": "XS",
        "Color": "A006",
        "ParentItem": "",
        "UnitCost": "49.0000",
        "Averagecost": "0.0000",
        "MSRP": "187.0000",
        "SalePrice": "1000.0000",
        "OnHand": "9",
        "TagsToPrint": "0",
        "OnOrder": "0",
        "OnLayaway": "10",
        "Redlevel": "26",
        "LastUpdate": "12/18/2015 10:18:13 AM",
        "OnCustOrder": "110",
        "WSPrice": "0.0000",
        "ivLocation": "1",
        "WIL": "",
        "MaxLevel": "",
        "ProductID": "r2000c",
        "Description": "cashmere reversible zip hoodie.",
        "Scale": "XS-XL",
        "VendorID": "AO",
        "MG": "FashionA",
        "SG": "123",
        "SSG": "123",
        "Taxable": "1",
        "DOB": "12/23/2015",
        "TotalPurchaseToDate": "26914",
        "TotalSoldToDate": "2235",
        "LastPurchaseDate": "10/13/2015",
        "LastPurchaseQty": "30",
        "FirstSoldDate": "11/2/2006",
        "Service": "0",
        "Commission": "1",
        "PU1": "1",
        "PU2": "",
        "PU3": "",
        "PU4": "sticker3",
        "Pcode": "",
        "WilID": "",
        "Active": "1",
        "Discontinued": "0",
        "AllowDiscount": "1",
        "FinalSale": "0",
        "MixAndMatch": "",
        "VIPEligible": "1",
        "AllowFractions": "1",
        "WebProduct": "1",
        "Brand": "",
        "Season": "good",
        "AllowLayaway": "1",
        "AllowSpecialOrder": "1",
        "AllowCoupon": "1",
        "CustomerRequired": "0",
        "MinimumOrder": "0"
    }],
    "Rows": 1,
    "Page": 1,
    "Pages": 1
}

Gift Cards

Query a Card

HTTP Request

GET http://dev.visualretailplus.com/giftcard/{CardID}

Query Parameters

Parameter Data Type Required Description
CardID String TRUE VRP Gift Card Number

Data Returned

Parameter Data Type Description
CardID String VRP Gift Card Number
CardBalance Decimal Current Gift Card Balance
ResponseStatus String Transaction Result (Success\Failed)
ResponseText String Error Details
<%
  try
   Dim ThreadResponse = ""
   Dim PathURL As String = "http://dev.visualretailplus.com/giftcard/123"
   Dim SiteCredentials As System.Net.ICredentials = New System.Net.NetworkCredential("USER","PASSWORD")
   Dim rdataStream As System.IO.Stream
   Dim request As System.net.WebRequest = System.net.WebRequest.Create(PathURL)
   request.Credentials = SiteCredentials
   request.Method = "GET"
   Dim rsp = CType(request.GetResponse(), system.net.HttpWebResponse)
   Dim  dataStream = rsp.GetResponseStream()
   Dim reader As New System.IO.StreamReader(dataStream)
   ThreadResponse = reader.ReadToEnd()
   reader.Close()
   dataStream.Close()
   response.write(ThreadResponse)
 catch ex as exception 
     response.write(ex.message)
 end try
     response.end()
%>

The above command returns JSON structured like this:

{
    "CardBalance": "108.4000",
    "CardID": "123",
    "ResponseStatus": "Success",
    "ResponseText": "Transaction Completed."
}

Create a Gift Card Transaction

HTTP Request

PUT http://dev.visualretailplus.com/giftcard

Required Properties

Name Data Type Required Description
TransType String TRUE Type of transaction to create. FILL will add amount to card. Charge will reduce amount on card
CardID String TRUE Card ID to add transaction to
TransAmount Decimal TRUE Amount of transaction
ReceiptNo Integer FALSE Corresponding VRP receipt that transaction took place on
StoreID String FALSE VRP StoreID that the transaction took place in

Data Returned

Parameter Data Type Description
CardID String VRP Gift Card Number
CardBalance Decimal Current Gift Card Balance
ResponseStatus String Transaction Result (Success\Failed)
ResponseText String Error Details
<%
  try
   Dim ThreadResponse = ""
   Dim content as string = "{ ""TransType"":""Charge"",""CardID"":""123"",""TransAmount"":5,""ReceiptNo"":0,""StoreID"":""01""}"
   Dim PathURL As String = "http://dev.visualretailplus.com/giftcard"
   Dim SiteCredentials As System.Net.ICredentials = New System.Net.NetworkCredential("USER","PASSWORD")
   Dim rdataStream As System.IO.Stream
   Dim request As System.net.WebRequest = System.net.WebRequest.Create(PathURL)
   request.Credentials = SiteCredentials
  Dim arr As Byte() = System.Text.Encoding.UTF8.GetBytes(Content)
  request.ContentType = "application/json"
  request.ContentLength = arr.Length
  rdataStream = request.GetRequestStream()
  rdataStream.Write(arr, 0, arr.Length)
  rdataStream.Close()

   request.Method = "PUT"
   Dim rsp = CType(request.GetResponse(), system.net.HttpWebResponse)
   Dim  dataStream = rsp.GetResponseStream()
   Dim reader As New System.IO.StreamReader(dataStream)
   ThreadResponse = reader.ReadToEnd()
   reader.Close()
   dataStream.Close()
   response.write(ThreadResponse)
 catch ex as exception 
     response.write(ex.message)
 end try
     response.end()
%>

The above command returns JSON structured like this:

{
    "CardBalance": "108.4000",
    "CardID": "123",
    "ResponseStatus": "Success",
    "ResponseText": "Transaction Completed."
}

Customer Orders

Get All Customer Orders

This endpoint retrieves all customer orders.

HTTP Request

GET http://dev.visualretailplus.com/orders

Query Parameters

Parameter Data Type Required Description
StoreID String TRUE 5 Digit VRP Store Code
ReceiptNo Integer FALSE
TRSDate DateTime FALSE Date of Transaction
TRSTime DateTime FALSE Time of Transaction
<%
  try
   Dim ThreadResponse = ""
   Dim PathURL As String = "http://dev.visualretailplus.com/orders?ReceiptNo=12"
   Dim SiteCredentials As System.Net.ICredentials = New System.Net.NetworkCredential("USER","PASSWORD")
   Dim rdataStream As System.IO.Stream
   Dim request As System.net.WebRequest = System.net.WebRequest.Create(PathURL)
   request.Credentials = SiteCredentials
   request.Method = "GET"
   Dim rsp = CType(request.GetResponse(), system.net.HttpWebResponse)
   Dim  dataStream = rsp.GetResponseStream()
   Dim reader As New System.IO.StreamReader(dataStream)
   ThreadResponse = reader.ReadToEnd()
   reader.Close()
   dataStream.Close()
   response.write(ThreadResponse)
 catch ex as exception 
     response.write(ex.message)
 end try
     response.end()
%>

The above command returns JSON structured like this:

{
    "orders": [
        {
        "StoreID": "02",
        "OrderID": "10",
        "Receiptno": "12",
        "TRSDate": "4/13/2006",
        "TRSTime": "7:36:35 PM",
        "TaxAmt": "19.8000",
        "LineItems": [{
            "Amount": "1.00",
            "Discount": "0.00",
            "LineTax": "1.00",
            "Quantity": "1.00",
            "UPC": "800005"
        }],
        "Payments": [{
            "PaymentAmount": "217.8000",
            "PaymentType": "A"
        }],
        "Customer": {
            "CustomerID": "3234224694",
            "FirstName": "Jeannie",
            "LastName": "Lee",
            "EmailAddress": "",
            "BillingAddress": {
                "Address1": "",
                "Address2": "",
                "City": "",
                "StateOrProvince": "",
                "PostalCode": "",
                "Country": ""
            },
            "ShippingAddress": {
                "Address1": "",
                "Address2": "",
                "City": "",
                "StateOrProvince": "",
                "PostalCode": "",
                "Country": ""
            }
        }
    }]
}

Create a New Customer Order

This endpoint creates an customer order.

HTTP Request

POST http://dev.visualetailplus.com/orders

<%
  try
   Dim ThreadResponse = " "
   Dim JSON = " { " 
json += "          ""OrderID"": ""105""," 
json +="           ""TRSDate"": ""6/9/2006""," 
json +="           ""TRSTime"": ""5:44:24 PM""," 
json +="           ""TaxAmt"": ""27.95"","
json +="            ""LineItems"": [" 
json +="                    {" 
json +="                        ""Amount"": ""265.00""," 
json +="                        ""Discount"": ""106.00""," 
json +="                        ""LineTax"": ""1.00""," 
json +="                        ""Quantity"": ""1.00""," 
json +="                        ""UPC"": ""Ticket1""," 
json +="                        }," 
json +="                    {" 
json +="                        ""Amount"": ""275.00""," 
json +="                        ""Discount"": ""110.00""," 
json +="                        ""LineTax"": ""1.00""," 
json +="                        ""Quantity"": ""1.00""," 
json +="                        ""UPC"": ""Ticket2"","                  
json +="                    }" 
json +="                ]," 
json +="            ""Payments"": [" 
json +="                {" 
json +="                    ""PaymentAmount"": ""351.9500""," 
json +="                   ""PaymentType"": ""M""" 
json +="                }" 
json +="            ]," 
json +="            ""Customer"" : {" 
json +="                ""FirstName"":""John""," 
json +="                ""LastName"":""Doe""," 
json +="                ""EmailAddress"":""email@domain.com""," 
json +="                ""BillingAddress"":{" 
json +="                    ""Address1"":""1 New  Street""," 
json +="                    ""Address2"":""Suite 400""," 
json +="                    ""City"":""Hackensack""," 
json +="                    ""County"":""Bergen""," 
json +="                    ""StateOrProvince"":""NJ""," 
json +="                    ""Zip"":""07601""," 
json +="                    ""Country"":""US""" 
json +="                }," 
json +="                ""ShippingAddress"":{" 
json +="                    ""Address1"":""1 New Street""," 
json +="                    ""Address2"":""Suite 400""," 
json +="                    ""City"":""Hackensack""," 
json +="                    ""County"":""Bergen""," 
json +="                    ""StateOrProvince"":""NJ""," 
json +="                    ""Zip"":""07601""," 
json +="                    ""Country"":""US""" 
json +="                }" 
json +="            }" 
json +="}"
   Dim PathURL As String = "http://dev.visualretailplus.com/orders"
   Dim SiteCredentials As System.Net.ICredentials = New System.Net.NetworkCredential("USER","PASSWORD")
   Dim rdataStream As System.IO.Stream
   Dim request As System.net.WebRequest = System.net.WebRequest.Create(PathURL)
   request.Credentials = SiteCredentials
   request.Method = "POST"
   Dim rsp = CType(request.GetResponse(), system.net.HttpWebResponse)
   Dim  dataStream = rsp.GetResponseStream()
   Dim reader As New System.IO.StreamReader(dataStream)
   ThreadResponse = reader.ReadToEnd()
   reader.Close()
   dataStream.Close()
   response.write(ThreadResponse)
 catch ex as exception 
     response.write(ex.message)
 end try
     response.end()
%>

The above command returns JSON structured like this:

{
   "StoreID": "01",
   "OrderID": "105",
   "Receiptno": "8850887",
   "TRSDate": "6/9/2006",
   "TRSTime": "1/1/1900 5:44:24 PM",
   "TaxAmt": "0.0000",
   "LineItems":    [
            {
         "Amount": "265.00",
         "Discount": "106.00",
         "LineTax": "1.00",
         "Quantity": "0.00",
         "UPC": "Ticket1"
      },
            {
         "Amount": "275.00",
         "Discount": "110.00",
         "LineTax": "1.00",
         "Quantity": "0.00",
         "UPC": "Ticket2"
      }
   ],
   "Payments": [   {
      "PaymentAmount": "351.9500",
      "PaymentType": "M"
   }],
   "Customer":    {
      "CustomerID": "5052445280101",
      "FirstName": "John",
      "LastName": "Doe",
      "EmailAddress": "email@domain.com",
      "BillingAddress":       {
         "Address1": "1 New Street",
         "Address2": "Suite 400",
         "City": "540 Hudson Street",
         "StateOrProvince": "NJ",
         "PostalCode": "07601",
         "Country": "US"
      }
   }
}