Visual Retail Plus
Visual Retail Plus · developer reference

VRP API Reference

Read inventory, gift card and customer order data from VRP, post gift card transactions, and create inventory items, customer orders and purchase orders.

REST API
HTTP calls with Basic Authentication: inventory, gift cards, customer orders.
Stored procedures
SQL calls on the VRP database with one JSON parameter: create inventory items, create a customer order, create a purchase order.

Authentication

REST API

The REST API uses Basic Authentication. Send the user name and password with every request. The password is case-sensitive.

Test userPasswordRights
vrpvrpRead only
Dim request = CType(System.Net.WebRequest.Create(url), System.Net.HttpWebRequest)
request.Credentials = New System.Net.NetworkCredential("USER", "PASSWORD")

Stored procedures

The stored procedures run on the VRP database itself. Call them over a SQL Server connection with a login that has EXECUTE permission on them. Ask the VRP administrator for the server, database and login. Pass the JSON as an NVARCHAR(MAX) parameter, as in the samples, rather than building it into a SQL string.

Inventory

Get inventory

Returns inventory items: one row per item and store.

GEThttp://dev.visualretailplus.com/inventory

Results can be filtered by any of the fields returned, for example /inventory?upc=800111&StoreID=01.

Try
    Dim request = CType(System.Net.WebRequest.Create("http://dev.visualretailplus.com/inventory?upc=800111"), System.Net.HttpWebRequest)
    request.Credentials = New System.Net.NetworkCredential("USER", "PASSWORD")
    request.Method = "GET"
    Using rsp = CType(request.GetResponse(), System.Net.HttpWebResponse)
        Using reader As New System.IO.StreamReader(rsp.GetResponseStream())
            Dim json As String = reader.ReadToEnd()
            Console.WriteLine(json)
        End Using
    End Using
Catch ex As Exception
    Console.WriteLine(ex.Message)
End Try

Response

200 OK · application/json
{
    "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
}

Create inventory items

Creates inventory items from one JSON string: the product, its color / size items in each store, and the related vendor, group, color, size, unit-of-measure, weight and alias-UPC records. Field names are the same names Get inventory returns.

EXECdbo.CreateInventoryFromJson @Json, @CreatedOut OUTPUT
ParameterTypeDescription
@Json requiredNVARCHAR(MAX)The items as JSON
@CreatedOutINT OUTPUTNumber of store rows created

The call also returns one row per item and store. All of it is saved in one transaction: if anything is wrong, the call raises an error and nothing is saved.

DECLARE @created INT;

EXEC dbo.CreateInventoryFromJson
     @Json = N'{ "ProductID": "TEE100", "StoreID": "01", "Description": "Basic crew tee",
                 "VendorID": "ACME", "MG": "TOPS", "Color": "BLACK", "Size": "M",
                 "UnitCost": 6.50, "SalePrice": 19.99 }',
     @CreatedOut = @created OUTPUT;

SELECT @created AS RowsCreated;

JSON shape

Each item is one product / color / size / WIL. Send it in any of these forms; they can be mixed in one call.

One item

A single object.

{ "ProductID": "TEE100",
  "Color": "BLACK",
  "Size": "M" }

One product, many items

Shared fields once, then an Items array. An item's own field wins.

{ "ProductID": "TEE200",
  "SalePrice": 24,
  "Items": [
    { "Size": "S" },
    { "Size": "L", "SalePrice": 26 } ] }

Several products

An array of either form above.

[ { "ProductID": "HOOD300", ... },
  { "ProductID": "TEE100", ... } ]
  • Field names are not case-sensitive. A field with the value null counts as not sent; unknown field names are ignored.
  • Numbers can be JSON numbers or strings. For flags, true/false work as well as 1/0. Dates use ISO format ("2026-11-01").

Sample: a new product with three sizes in two stores

items.json
{
  "ProductID": "TEE200",
  "StoreID": "01,02",
  "Description": "Heavyweight pocket tee",
  "VendorID": "ACME",
  "VName": "Acme Apparel",
  "MG": "TOPS",   "MGDesc": "Tops",
  "SG": "TEES",   "SGDesc": "T-Shirts",
  "Brand": "Acme",
  "Season": "FALL26",
  "taxable": 1,
  "WebProduct": true,
  "UnitCost": 8.00,
  "SalePrice": 24.00,
  "MSRP": 28.00,
  "Items": [
    { "Color": "NAVY", "ColorDesc": "Navy blue", "Size": "S", "UPC": "850012345678" },
    { "Color": "NAVY", "Size": "M", "UPC": "850012345685" },
    { "Color": "NAVY", "Size": "L", "SalePrice": 26.00, "UnitWeight": 0.6 }
  ]
}

Sample: a new color for an existing product

The product is reused and only the fields sent change. Each size gets a new UPC.

new-color.json
{
  "ProductID": "TEE200",
  "StoreID": "01,02",
  "Color": "RED",
  "ColorDesc": "Brick red",
  "UnitCost": 8.00,
  "SalePrice": 24.00,
  "Items": [ { "Size": "S" }, { "Size": "M" }, { "Size": "L" } ]
}

Result

One row per item and store, in the order sent. This is the result of the first sample (the UPC for size L was generated):

StoreIDUPCProductIDColorSizeWILStatus
01850012345678TEE200NAVYSCreated
02850012345678TEE200NAVYSCreated
01850012345685TEE200NAVYMCreated
02850012345685TEE200NAVYMCreated
0199949996TEE200NAVYLCreated
0299949996TEE200NAVYLCreated

Created: added to that store. Exists: that store already had the UPC; the row was left as it is and is not counted in @CreatedOut.

Keys and control

FieldMeaningType / maxIf not sent
ProductID requiredProduct (style) code. IVProduct is accepted too.text 20Error 50105
StoreIDOne store ("01"), a list ("01,02") or "*"textAll active stores
UPCThe item's barcode, shared by all storestext 20The UPC the item already has, else a new one
Color · SizeColor and size codestext 20N/A
WILWidth / inseam / lengthtext 20blank
UserCodeVRP user whose UPC range numbers new UPCs. Ask the VRP administrator which one to use.text 5API
ItemsArray of items that share this object's fieldsarrayThe object is the item

Product fields

One value per product; when items of a product send different values, the first item wins. For an existing product only the fields sent are changed.

FieldMeaningType / maxIf not sent (new product)
DescriptionProduct descriptiontext 200The first item's IVDesc, else blank
VendorIDVendor code. A new code is added to the vendors.text 20N/A
MG · SG · SSGMain group · sub group · sub-sub grouptext 40 · 40 · 20N/A · blank · blank
ScaleSize scale; sizes not yet in it are addedtext 20Chosen from the item sizes
taxableTax rule numberinteger0
Brand · Seasontext 40 · 100blank
Pcode · ProductTypeVendor's product code · product typetext 117 · 20blank
PU1–PU4Product user-defined fieldstext 100blank
Active · AllowDiscount · VIPEligible · AllowLayaway · AllowSpecialOrder · AllowCouponFlags0 / 11
Discontinued · FinalSale · AllowFractions · WebProduct · CustomerRequired · ServiceFlags0 / 10
Commission · MinimumOrderinteger1 · 0

Item fields

FieldMeaningType / maxIf not sent
IVDescItem descriptiontext 200The product description
UnitCost · SalePrice · MSRP · WSPriceCost · selling price · list price · wholesale pricedecimal0
AverageCostAverage costdecimalUnitCost
VSN · ParentItem · ivLocationVendor style number · parent item · shelf locationtext 20blank
IU1 · IU2 · IU3 · IU4Item user-defined fieldstext 100 · 40 · 1000 · 40blank
Redlevel · MaxLevel · TagsToPrintReorder point · maximum stock · tags to printinteger0
isInactiveFlag0 / 10

Descriptions and related records

FieldWhat it setsType / max
VName · MinOrdVendor name · vendor minimum ordertext 100 · decimal
MGDesc · SGDesc · SSGDescGroup descriptionstext 50
ColorDesc · SwatchColor description and swatch for this producttext 400 · 20
SizeDescriptionSize description (for that size code in every product)text
ItemUOM · ContainerUOMUnits of measuretext 20
UnitWeightWeight in poundsdecimal
AssortmentsAlias UPCs that scan as this item, separated by |text 30 each

Ignored: OnHand, OnOrder, OnLayaway, OnCustOrder, OHExt, pu, LastXfrIn, CaseQty, SizeSeq, LastUpdate. New items start with zero quantities.

Send prices on every item. When an existing item is added to a new store, its prices and cost are not copied from the stores that already carry it; a missing SalePrice becomes 0.

UPC rules

An item (product + color + size + WIL) has exactly one UPC, the same in every store, and a UPC belongs to exactly one item.

You sendResult
A UPC that already belongs to a different product, color, size or WIL50113
An existing item with a different UPC than the one it has50114
The same item twice in one call with different UPCs50109
The same UPC for two different items50110
A UPC that is an alias UPC of another item50115
No UPC, and the item already has more than one UPC50118
No UPC, and the item already existsuses its UPC
No UPC, and the item is newnew UPC from the UserCode range

Errors

Every rejection is a SQL error with one of these numbers; the message starts with CreateInventoryFromJson: and names the item (counting from 1 in the order sent) where it helps.

NumberMeaningWhat to do
50101Not valid JSONCheck the JSON syntax
50102 · 50103 · 50104Wrong shape: an array element or Items element is not an object, or no itemsSend objects { }
50105No ProductID, a key that is too long, or a non-numeric UnitWeight / MinOrdFix the item named in the message
50106A value does not fit its column, e.g. value "abc" does not fit rpiv.SalePrice (decimal(18,2))Fix that field
50107 · 50108A StoreID does not exist, or there is no active storeSend valid store codes
50109 · 50110 · 50111Conflicts inside the JSON (see UPC rules); 50111: one item twice for the same storeRemove the conflict
50112Another item creation was still running after 30 secondsRetry
50113 · 50114 · 50115 · 50118UPC conflicts with existing items (see UPC rules)Send the right UPC, or leave it out
50116No new UPC could be generatedCheck the UserCode UPC range, or send UPCs
50117An Assortments UPC is too long, is an item UPC, or belongs to another itemFix the Assortments value

Gift cards

Query a card

Returns the balance of a VRP gift card.

GEThttp://dev.visualretailplus.com/giftcard/{CardID}
ParameterTypeDescription
CardID requiredStringVRP gift card number
Try
    Dim request = CType(System.Net.WebRequest.Create("http://dev.visualretailplus.com/giftcard/123"), System.Net.HttpWebRequest)
    request.Credentials = New System.Net.NetworkCredential("USER", "PASSWORD")
    request.Method = "GET"
    Using rsp = CType(request.GetResponse(), System.Net.HttpWebResponse)
        Using reader As New System.IO.StreamReader(rsp.GetResponseStream())
            Console.WriteLine(reader.ReadToEnd())
        End Using
    End Using
Catch ex As Exception
    Console.WriteLine(ex.Message)
End Try

Response

FieldTypeDescription
CardIDStringVRP gift card number
CardBalanceDecimalCurrent gift card balance
ResponseStatusStringSuccess or Failed
ResponseTextStringError details
200 OK · application/json
{
    "CardBalance": "108.4000",
    "CardID": "123",
    "ResponseStatus": "Success",
    "ResponseText": "Transaction Completed."
}

Gift card transaction

Adds an amount to a card (FILL) or takes an amount from it (Charge).

PUThttp://dev.visualretailplus.com/giftcard
FieldTypeDescription
TransType requiredStringFILL adds the amount to the card; Charge takes it from the card
CardID requiredStringCard to add the transaction to
TransAmount requiredDecimalAmount of the transaction
ReceiptNoBig integerVRP receipt the transaction belongs to
StoreIDStringVRP store the transaction took place in
Try
    Dim content As String = "{ ""TransType"":""Charge"",""CardID"":""123"",""TransAmount"":5,""ReceiptNo"":0,""StoreID"":""01"" }"
    Dim request = CType(System.Net.WebRequest.Create("http://dev.visualretailplus.com/giftcard"), System.Net.HttpWebRequest)
    request.Credentials = New System.Net.NetworkCredential("USER", "PASSWORD")
    request.Method = "PUT"
    request.ContentType = "application/json"
    Dim body As Byte() = System.Text.Encoding.UTF8.GetBytes(content)
    request.ContentLength = body.Length
    Using stream = request.GetRequestStream()
        stream.Write(body, 0, body.Length)
    End Using
    Using rsp = CType(request.GetResponse(), System.Net.HttpWebResponse)
        Using reader As New System.IO.StreamReader(rsp.GetResponseStream())
            Console.WriteLine(reader.ReadToEnd())
        End Using
    End Using
Catch ex As Exception
    Console.WriteLine(ex.Message)
End Try

Response

The same fields as Query a card, with the new balance.

200 OK · application/json
{
    "CardBalance": "108.4000",
    "CardID": "123",
    "ResponseStatus": "Success",
    "ResponseText": "Transaction Completed."
}

Customer orders

Get customer orders

Returns customer orders with their lines, payments and customer.

GEThttp://dev.visualretailplus.com/orders
ParameterTypeDescription
StoreID requiredStringVRP store code, 5 characters or less
ReceiptNoBig integerVRP receipt number
TRSDateDateDate of the transaction
TRSTimeTimeTime of the transaction
Try
    Dim request = CType(System.Net.WebRequest.Create("http://dev.visualretailplus.com/orders?ReceiptNo=12"), System.Net.HttpWebRequest)
    request.Credentials = New System.Net.NetworkCredential("USER", "PASSWORD")
    request.Method = "GET"
    Using rsp = CType(request.GetResponse(), System.Net.HttpWebResponse)
        Using reader As New System.IO.StreamReader(rsp.GetResponseStream())
            Console.WriteLine(reader.ReadToEnd())
        End Using
    End Using
Catch ex As Exception
    Console.WriteLine(ex.Message)
End Try

Response

200 OK · application/json
{
    "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 customer order

Creates a customer order, together with its customer and shipping address, from one JSON string. The same procedure also creates sales and layaways; the type is set by rpTransaction.

EXECdbo.CreateReceiptFromJson @Json, @ReceiptNoOut OUTPUT, @CustomerIDOut OUTPUT
ParameterTypeDescription
@Json requiredNVARCHAR(MAX)The order as JSON
@ReceiptNoOutBIGINT OUTPUTReceipt number of the new order
@CustomerIDOutVARCHAR(20) OUTPUTCustomer of the order (existing or newly created)

The call also returns one row (StoreID, ReceiptNo, CustomerID). Field names in the JSON are the VRP column names and are not case-sensitive. All of it is saved in one transaction: if anything is wrong, nothing is saved.

DECLARE @receiptNo BIGINT, @customerID VARCHAR(20);

EXEC dbo.CreateReceiptFromJson
     @Json = N'{ "StoreID": "01", "TRSDate": "2026-11-01T14:30:00", "rpTransaction": "CO",
                 "RPTrsd": [ { "UPC": "850012345678", "Quantity": 1, "Amount": 24.00, "LineTax": 2.13 } ],
                 "rpPay":  [ { "PayType": "C", "Amount": 26.13 } ],
                 "RPCust": { "FirstName": "John", "LastName": "Doe", "EmailAddress": "john.doe@example.com" } }',
     @ReceiptNoOut  = @receiptNo OUTPUT,
     @CustomerIDOut = @customerID OUTPUT;

SELECT @receiptNo AS ReceiptNo, @customerID AS CustomerID;

Sample: a web order with customer and shipping

order.json
{
  "StoreID": "01",
  "TRSDate": "2026-11-01T14:30:00",
  "rpTransaction": "CO",
  "Cashregister": "WEB",
  "Cashier": "API",
  "TRSNote": "Web order 105",
  "RPTrsd": [
    { "UPC": "850012345678", "Quantity": 2, "Amount": 24.00, "Discount": 0, "LineTax": 4.26 },
    { "UPC": "850012345685", "Quantity": 1, "Amount": 24.00, "Discount": 4.00, "LineTax": 1.78 }
  ],
  "rpPay": [ { "PayType": "C", "Amount": 74.04 } ],
  "RPCust": {
    "FirstName": "John", "LastName": "Doe", "EmailAddress": "john.doe@example.com",
    "PhoneNumber": "201-555-0100", "Address1": "1 New Street", "Address2": "Suite 400",
    "City": "Hackensack", "StateOrProvince": "NJ", "PostalCode": "07601"
  },
  "ShippingAddresses": {
    "FirstName": "John", "LastName": "Doe", "Address1": "1 New Street", "Address2": "Suite 400",
    "City": "Hackensack", "State": "NJ", "Zip": "07601", "Country": "US"
  },
  "ShippingReceipt": { "ShippingServiceCode": 0, "Weight": 1.5 }
}

Result

StoreIDReceiptNoCustomerID
0153122094266531220942

The order's tax (6.04) was built from the two lines' LineTax, a new customer was created because no customer had that email or phone, and the shipping address was linked to the receipt.

Order header

FieldTypeDescription
StoreID requiredStringVRP store code, 5 characters or less
TRSDate requiredDate / timeDate of the order, ISO format. Its time part is used when TrsTime is not sent.
rpTransactionStringCO customer order · LA layaway · missing: S sale. CO and LA need a customer.
ReceiptNoBig integerMissing: the next VRP receipt number. A number that already exists for the store is an error.
Cashregister · CashierStringRegister and cashier codes, 5 characters or less
CustomerIDStringAn existing VRP customer. Not needed when RPCust is sent.
TaxAmtDecimalMissing: the total of the line taxes
TRSNoteStringNote on the order, for example the web order number

Lines · RPTrsd array

At least one line or one payment is required.

FieldTypeDescription
UPC requiredStringItem UPC. An alias UPC is changed to its item UPC.
QuantityDecimalMissing: 1
AmountDecimalUnit price
DiscountDecimalLine discount
LineTaxDecimalTax of the line
TaxRuleIntegerVRP tax rule of the line
CostDecimalMissing: the item's average cost
LineitemIntegerMissing: the position in the array

Payments · rpPay array

FieldTypeDescription
PayType requiredStringVRP tender code, as set up in the store's tenders. Ask the VRP administrator for the codes.
AmountDecimalAmount paid
PaymentNumberIntegerMissing: the position in the array
RateDecimalCurrency rate. Missing: 1

Tax details · TaxCollectedDetails array

Optional: lineitem, taxCollected, Authority, SoldAmount. When it is not sent, it is built from the lines' LineTax, or from the header TaxAmt when no line has tax.

Customer · RPCust object

Any column of the VRP customer table can be sent (FirstName, LastName, EmailAddress, PhoneNumber, Address1, City, StateOrProvince, PostalCode, ...).

  • With CustomerID: that customer is used. If it exists, only the fields sent are updated; otherwise it is created.
  • Without CustomerID: an existing customer with the same EmailAddress, else the same phone number, is used. Otherwise a new customer is created and returned in @CustomerIDOut.

Shipping · ShippingAddresses and ShippingReceipt objects

ShippingAddresses takes FirstName, LastName, Address1, Address2, City, State, Zip, Country, Phone1. An identical address of the customer is reused; otherwise it is added. ShippingReceipt (ShippingServiceCode, Weight) links the order to the address. Shipping needs a customer.

Errors

NumberMeaning
50001Not valid JSON
50002 · 50003StoreID or TRSDate is missing
50004 · 50005A line has no UPC, or a payment has no PayType
50006No lines and no payments
50007 · 50008No receipt number could be generated, or the receipt number already exists for the store
50009RPCust, ShippingAddresses or ShippingReceipt is not a JSON object
50010 · 50011Shipping without a customer, or ShippingReceipt alone without the Seq of an existing address
50012A CO or LA order has no customer

Purchase orders

Create a purchase order

Creates a purchase order for one vendor, with its lines for one or more stores, from one JSON string. The items' on order quantities are updated as soon as the PO is saved.

EXECdbo.CreatePOFromJson @Json, @PONOOut OUTPUT
ParameterTypeDescription
@Json requiredNVARCHAR(MAX)The purchase order as JSON
@PONOOutVARCHAR(20) OUTPUTNumber of the new PO

The call also returns one row (PONO, VendorID, Lines, QtyOrdered, TotalCost). Field names in the JSON are the VRP column names and are not case-sensitive. All of it is saved in one transaction: if anything is wrong, nothing is saved.

DECLARE @pono VARCHAR(20);

EXEC dbo.CreatePOFromJson
     @Json = N'{ "VendorID": "ACME", "StoreID": "01", "StartShipDate": "2026-12-01",
                 "PODetail2": [ { "UPC": "850012345678", "QtyOrdered": 12, "UnitCost": 8.00 },
                                { "UPC": "850012345685", "QtyOrdered": 6 } ] }',
     @PONOOut = @pono OUTPUT;

SELECT @pono AS PONO;

Sample: one vendor, two stores

po.json
{
  "VendorID": "ACME",
  "VendorPONO": "AC-55120",
  "PODate": "2026-11-19",
  "StartShipDate": "2026-12-01",
  "CancelDate": "2027-01-15",
  "StoreID": "01",
  "Note": "Holiday reorder",
  "Freight": 35.00,
  "PODetail2": [
    { "UPC": "850012345678", "QtyOrdered": 12, "UnitCost": 8.00, "SalePrice": 24.00 },
    { "UPC": "850012345685", "QtyOrdered": 6 },
    { "UPC": "850012345678", "QtyOrdered": 4, "StoreID": "02" }
  ]
}

Result

PONOVendorIDLinesQtyOrderedTotalCost
6268747ACME322.00176.00

No PONO was sent, so the next PO number was taken. The second line had no cost and got the store's current unit cost (8.00); the third line is for store 02.

PO header

FieldType / maxIf not sent
VendorID requiredtext 20Error 50202. Must be an existing VRP vendor.
PONOtext 20The next PO number, by the shop's PO numbering. A number that already exists is an error.
StoreIDtext 5Store for the lines that do not send their own
PODatedateToday
StartShipDatedatePODate
CancelDatedateStartShipDate + 90 days
VendorPONO · Notetextblank
TermsNetDays · TermsNetPCTinteger · decimalThe vendor's terms
Freightdecimal0
BillTotext 5The header StoreID, else the first line's store
UserCodetext 5API. Also picks the PO number range when the shop numbers POs per user.
OTBPeriodtext 15blank
isOpen · ChangeIVCostUponRcv0 / 11 · 0

Lines · PODetail2 array

At least one line is required. A UPC may appear only once per store; send its total quantity.

FieldType / maxIf not sent
UPC requiredtext 20Error 50205. An alias UPC is changed to its item UPC; the item must exist in the line's store.
StoreIDtext 5The header StoreID; one of the two is required
QtyOrdereddecimal1
UnitCost · MSRP · SalePricedecimalThe item's current values in that store
CustomerIDtext 20blank. The customer the line is ordered for.
SeqintegerThe position in the array

Errors

NumberMeaning
50201Not valid JSON, or not a single JSON object { }
50202 · 50203VendorID is missing, or is not a VRP vendor
50204No lines in PODetail2
50205A line has no UPC or store, or a line value does not fit (the message names the line, counting from 1)
50206A header value does not fit, e.g. value "2026-13-45" does not fit RPPO2.PODate (datetime)
50207A UPC is not in the inventory of the line's store
50208The same UPC is on more than one line for the same store
50209The PONO sent already exists
50210 · 50211No PO number could be generated (the shop does not number POs automatically, or the range is full); send PONO
50212Another PO creation was still running after 30 seconds; retry