Add Items to a Web Order
Use this method to search for a Web Order with Pending status and add items to it. If there is not an existing Order, the system will create a new Web Order for the items.
Valid Tokens: Customer and User.
This is the master API method for Web Order creation in Komet.
Invoices created through this method are subject to a transaction fee. Internal company transactions are generally exempt from this transaction fee.
Request
URL: https://api.kometsales.com/api/web-order-item.add
Method: POST
Content-Type: application/JSON
Headers
X-ACCOUNT (required)(integer:20)
ID of the Company using the API.
Please ask the Komet Sales team to get this ID.
authenticationToken (required)(string:50)
Komet Sales security token.
Input parameters
customerId (required)(integer:20)
Customer ID.
Use this parameter to search orders from a specific customer.
You can get this value from the customer.list API method.
reservedInventory (boolean)
Return products associated with the customerId
.
Valid values: true = Yes | false = Only products with no associated customer
Default is false.
inventoryIds (required)(string)
Inventory Item IDs that represent the lines that will be added to the web order.
You can get these IDs from the ecommerce/inventory.list API method.
This field is not required if you send productCode
.
inventoryOrigin (required)(integer:1):
Inventory origin.
Valid values: 1 = OH (On Hand) | 2 = FS (Future Sales)
This field is not required if you send productCode
.
🔒 fedExInfoSameAsCustomer (optional)(boolean)
Use the Customer’s Ship-To information for the FedEx Labels.
Valid values: True | False
Default is false.
🔒 productCode (required)(string:20)
Komet Sales internal Product Legacy Code.
You can get this value from the product.list API method.
This field is not required if you send inventoryIds
.
🔒 companyProductId (required)(integer:20):
Komet Sales internal Product ID.
You can get this value from the product.list API method.
This field is not required if you send productCode
or inventoryIds
.
🔒 boxTypeCode (required)(string:3)
Box Type code from the Komet Sales Inventory item.
You can get this value from the boxtype.list API method.
This field is not required if you send inventoryIds
.
🔒kometNetworkBoxTypeCode (required)(integer:4)
Komet Network Code Box type ID.
You can get this value from the boxtype.list API method.
This field is not required if you send boxTypeCode
or inventoryIds
.
🔒 unitsPerBox (required)(integer:10)
Units per box.
This field is not required if you send inventoryIds
.
🔒 unitType (required)(string:5)
Unit type.
Valid values: Stem and Bunch
This field is not required if you send inventoryIds
.
price (required)(decimal:10,2)
Unit price in the selected currency.
The price number is limited to two decimals.
quantity (required)(integer:10)
Number of boxes in the Order.
🔒 addAvailableQuantity (optional)(boolean)
Add the available Boxes to the Inventory.
Valid values: True | False
This field is required if you send quantity
.
carrierId (required)(integer:20)
Komet Sales Internal Carrier ID.
You can get this value from the carrier.list API method.
date (required)(date)
Shipping date.
Date format: YYYY-MM-DD
companyLocationId (required)(integer:20)
Location ID.
Only applies to Multi-Location Companies.
You can get this value from the location.list API method.
shipToId (required)(integer:20)
Ship To ID.
You can get this value from the customer.shipto.list API method.
🔒shipToName (string:200)
Ship-To location name.
🔒shipToAddress (string:200)
Address where the shipment is sent to.
🔒shipToCity (string:200)
City where the shipment is sent to.
🔒shipToState (string:200)
State where the shipment is sent to.
🔒shipToZipCode (string:10)
Zip Code where the shipment is sent to.
🔒shipToCountry (string:200)
Country where the shipment is sent to.
markCode (string:20)
Item mark code.
webOrderId (optional)(integer:20)
Komet Sales internal Web Order ID.
Use this parameter to consolidate every item under the same Web Order.
If this value is not specified, the system will search existing orders with pending status and identical information and will add the items to them. If none exist, the system creates a new order with the selected items.
For Invoices, the system creates an Invoice for every Web Order.
For Prebooks, all the items from the same Customer, Carrier, and Date are consolidated into one single Prebook regardless of the Web Order.
{
"customerId": 7349,
"companyLocationId": 13,
"date": "2017-06-30",
"carrierId": 4521,
"quantity": 1,
"price": 17.56,
"inventoryOrigin": 4,
"inventoryIds": 428720,
"markCode": "1234"
}
Response
prebookId (integer:20)
Prebook ID.
Returned when inventoryOrigin
= 2 (FS).
prebookNumber(integer:10)
Prebook number associated to the Web Order.
webOrderId (integer)
Komet sales internal Web Order ID.
prebookItemId (integer:20)
Prebook Item ID.
Returned when inventoryOrigin
= 2 (FS).
message (string)
Transaction status description.
🔒 shipToId (integer:10)
Order Ship-To ID.
orderItemId (integer:20)
Komet Sales internal Order Item ID.
Returned when inventoryOrigin
= 1 (OH).
invoiceNumber (integer:10)
Web Order Invoice number.
Returned when inventoryOrigin = 1 (OH).
status (integer:1)
Transaction status.
Valid values: 1 = Success | 0 = Failure
🔒 quantityAdded (integer:10)
Number of products added to the Web Order.
{
"prebookId":3834,
"prebookNumber": 3495,
"webOrderId":47,
"prebookItemId": 928342,
"message":"The item was successfully added.",
"shipToId": 20137,
"status":1,
"quantityAdded": 1
}
Related Articles
-
Identify E-commerce Orders (Knowledge Base)
-
Manually Add Items to the Inventory (Knowledge Base)
-
Settings for Multiple Location Companies (Knowledge Base)
-
E-Commerce for Customers (Knowledge Base)
-
Create Promotions and Messages (Knowledge Base)