Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

This method allows you to create multiple prebooks in Komet Sales.

Tip

Valid Tokens: Company.


Filter by label (Content by label)
showLabelsfalse
max5
titleRelated Articles
cqllabel in ( "prebooks" , "prebooks-creation" , "prebook-api" , "company-token" )

Request


URL: https://api.kometsales.com/api/multiple.prebooks.create

Method: POST

Content-Type: application/JSON


Input Parameters

authenticationToken (required)(string:50)

:

Komet Sales security token.


customerCode (required)(string:20)

: customer

Customer code.


customerName (required)(string:200)

: customer

Customer name.


customerBillingStreet (required) (string:200)

: customer

Customer billing street address.


customerBillingCity (required)(string:200)

: customer

Customer billing address city.


customerBillingState (required)(string:200)

: customer

Customer billing address state.


customerBillingZipcode (required)(string:200)

: customer billing zipcode

Customer billing address ZIP code.


customerBillingCountry (required)(string:200)

: customer

Customer billing address country.


customerShippingStreet (required)(string:200)

: customer

Customer shipping address street.


customerShippingCity (required)(string:200)

: customer

Customer shipping address city.


customerShippingState (required)(string:200)

: customer

Customer shipping address state.


customerShippingZipcode (required)(string:200)

: customer shipping zipcode

Customer shipping address ZIP code.


customerShippingCountry (required)(string:200)

: customer

Customer shipping address country.


customerPhone (required)(string:100)

: customer

Customer phone. 

shipViaId 

shipViaId (logical)(integer:1)

: ship via ID. ID of location where the product will be shipped from. Assign 0 for warehouse or 1 for grower.

Location’s Ship Via ID.

Valid values: 0 = Warehouse | 1 = Grower


customerPO (optional)(string:20)

: customer purchase order

Customer Purchase Order number.


autoGeneratePOsfromPrebooks (optional)(integer:1)

: specify 1 if

Generate Purchase Orders from the Prebooks.

If you want

the system

to automatically generate the

purchase orders. Default = 0. If this value is 1, the vendor and costs must be specified. The orders created will be left as Approved.companyLocationCode (required: if the company is Multi Location

Purchase Orders, you must enter the vendorCode, vendorName and costs parameters.

Created orders will have Approved status.

Valid values: 1 = Yes | 0 = No

Default is zero.


companyLocationCode (required)(string:20)

:

Location code

prebookItems: array of products:

.

Only applies to Multi-Location Companies.


prebookItems (array)

An array containing products.


carrierCode (required)(string:20)

: carrier

Carrier code.


carrierName (required)(string:200)

: carrier

Carrier name.


shipDate (required)(date)

: shipping date (date format

Shipping date.

Date format: YYYY-MM-DD

).


identifier (required)(string:30)

: use

Use this field to identify

your

product lines and receive the same value in the response.


vendorCode (required

:

if autoGeneratePOsfromPrebooks

is

= 1)(string:20)

: vendor

Vendor or

grower

Grower code.


vendorName (required: if autoGeneratePOsfromPrebooks

is

= 1)(string:200)

: vendor

Vendor or

grower

Grower name.


productCode (required)(string:20)

:

Product code

of the product

.


productDescription (required)(string:200)

:

Product description

of the product

.

boxTypeCode 

boxTypeCode (required)(string:3)

: code of the box type

Box type code.


boxes (required)(integer:10)

: number

Number of boxes.


unitType (required) (string:5)

: stem or bunch are the unique valid values.

Unit type.

Valid values: Stem or Bunch


bunches (required)(integer:10)

: bunches

Bunches per box.


stemsBunch (required)(integer:10)

: stems for bunch

Stems per Bunch.


cost (required: if autoGeneratePOsfromPrebooks

is

= 1)(decimal:10,2)

: when unitType is Bunch you must use the bunch cost. When unitType is Stem you must use the stem cost

Cost per Unit according to the selected unitType.


price (required)(decimal:10,2)

: when unitType is bunch you must use the bunch price. When unitType is stem you must use the stem price

Price per Unit according to the selected unitType.


markCode (optional)(string:50)

:

Item mark code

for item

.


notes (optional)(string:200)

: any additional

Additional notes.


boxWeight (optional)(decimal:10,2)

:

Weight of one box in kilograms. 


boxLength (optional)(decimal:10,2)

:

Length of one box in inches. 


boxWidth (optional)(decimal:10,2)

:

Width of one box in inches. 


boxHeight (optional)(decimal:10,2)

:

Height of one box in inches.

 

Sample Request


Code Block
{
  "authenticationToken": "token_info_goes_here",
  "customerCode": "ANG",    
  "customerName": "Ang Flowers",
  "customerBillingStreet": "900 Avenue # 5434",
  "customerBillingCity": "Miami",
  "customerBillingState": "Florida",
  "customerBillingZipcode": "24534",
  "customerBillingCountry": "USA",
  "customerShippingStreet": "900 Avenue # 5434",
  "customerShippingCity": "Miami",
  "customerShippingState": "Florida",
  "customerShippingZipcode": "24534",
  "customerShippingCountry": "USA",
  "customerPO": "2926",
  "customerPhone": "(864) 242-43432",
  "shipViaId": "1",
  "autoGeneratePOsfromPrebooks":"1",
  "prebookItems": 
  [
    {
      "carrierCode": "FX",
      "carrierName":"Fedex",
      "shipDate": "2015-09-11",
      "identifier": "2926-1",
      "vendorCode": "ABC",
      "vendorName": "Flores ABC",
      "productCode": "Rs55B",
      "productDescription":"Roses 55cm Blue",
      "boxTypeCode": "HB",
      "unitType": "Stem",
      "boxes": 5, 
      "bunches": 10, 
      "stemsBunch": 2,
      "cost": 0.70,
      "price": 2.50,
      "markCode": "text for mark code", 
      "notes": "text for notes"
    }
  ]
}

Response

Output


status (integer:1)

: transaction

Transaction status.

1 for success or 0 for failure.

Valid values: 1 = Success | 0 = Failure


message (string:500)

: description of the status of the transaction

Transaction status description.


items (array)

An array containing products in the Prebook.


identifier (string:20)

. The value that identifies the line. This is the same value of the request. 

Line ID value.


status: (integer:1)

: transaction

Transaction status.

1 for success or 0 for failure.

Valid values: 1 = Success | 0 = Failure


message (string:500)

: description of the status of the transaction

Transaction status description.


prebookId (integer:20)

: prebook ID that was created

Prebook ID.


prebookNumber (string:10)

:

Prebook number

that was created

.

 


prebookItemId (integer:10)

ID of the product line that was added to the order

Product line ID.


purchaseOrderNumber (string:20)

PO number that was created, if

Purchase Order number iif autoGeneratePOsfromPrebooks is given.

Sample Response


Code Block
{
  "status": "1",
  "message": "Prebooks ware successfully created.",
  "items": [
    {
        "identifier": "2926-1",
        "status": 1,
        "message": "Item successfully added to the order",
        "prebookId": 2543545,
        "prebookNumber": "432342",
        "purchaseOrderNumber": "P034534",
        "prebookItemId": 3427612
    }
   ]   
 }
Panel
titleRelated Articles
Filter by label (Content by label)showLabelsfalsemax10showSpacefalsesorttitlecqllabel in ( "prebooks-creation" , "add-prebooks" )labelsprebooks-creation add-prebooks