Overview

This method allows you to create a Web Order in Komet Sales for a given item.This method searches for a Web Order with Pending status and adds the items to it. In case there is not an existing Order, it creates a new Web Order for the items. Keep in mind that this method only works with user's tokens.

Request

https://api.kometsales.com/api/web-order-item.add

  • Method: POST
  • Content-Type: application/json

Headers

  • X-SALES-CHANNEL (optional) (string: 20): Valid values: "WEB_APP", "MOBILE_APP", "K2K" , "ECOMMERCE_LITE". 
  • X-ACCOUNT (required)(integer:20): Company ID that is using the API. Please ask Komet Sales team to have this ID. 
  • authenticationToken (required)(string:50): Komet Sales security token.


Input parameters:

  • customerId (required)(integer:20): customer ID, used to search orders from only one customer. You can obtain this value from the customer.list API method.
  • inventoryIds (required)(string): Inventory Item ID.
  • inventoryOrigin (required)(integer:1):  the inventory type. 1=OM (Open Market), 2=FS (Future Sales), 3=VA (Vendor Availability), 4=K2K (Komet to Komet).
  • price (required)(decimal:10, 2): the unit price.
  • quantity (required)(integer:10): the number of boxes. 
  • carrierId (required)(integer:20): Komet Sales internal Carrier Id. You can obtain this value from the carrier.list API method.
  • date (date) (date format YYYY-MM-DD).
  • companyLocationId (integer:20): Required if the company is in Multi Location mode. You can obtain this value from the location.list API method.
  • shipToId (integer:20): The Ship To ID. You can obtain this value from the customer.shipto.list API method.
  • markCode (string:20): The item mark code. 
  • webOrderId (integer:20): The ID of the Web Order you want to add this item to. If this value is not specified, the system will try to find an existing web order or it will create a new one in the case that it doesn't exist. 


Response

Output:

    • message (String):  description of the transaction status.
    • status (integer:1):  transaction status. 1 for success or 0 for failure.
    • webOrderId: the ID of the Web Order created on Komet Sales.
    • prebookItemId: the ID of the prebook Item created. (It appears if the inventoryOrigin is 2, 3, 4 (FS, VA, K2K)).
    • orderItemId: the ID of the Order Item created.(It appears if the inventoryOrigin is 1 (OM)).

Important

This is the master API method for Web Orders creation in Komet.