Create multiple Prebooks

Use this method to create multiple Prebooks in Komet Sales.

Valid Tokens: Company.


Related Articles

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 code.


customerName (required)(string:200)

Customer name.


customerBillingStreet (required) (string:200)

Customer billing street address.


customerBillingCity (required)(string:200)

Customer billing address city.


customerBillingState (required)(string:200)

Customer billing address state.


customerBillingZipcode (required)(string:200)

Customer billing address ZIP code.


customerBillingCountry (required)(string:200)

Customer billing address country.


customerShippingStreet (required)(string:200)

Customer shipping address street.


customerShippingCity (required)(string:200)

Customer shipping address city.


customerShippingState (required)(string:200)

Customer shipping address state.


customerShippingZipcode (required)(string:200)

Customer shipping address ZIP code.


customerShippingCountry (required)(string:200)

Customer shipping address country.


customerPhone (required)(string:100)

Customer phone. 


shipViaId (logical)(integer:1)

Location’s Ship Via ID.

Valid values: 0 = Warehouse | 1 = Grower


customerPO (optional)(string:20)

Customer Purchase Order number.


autoGeneratePOsfromPrebooks (optional)(integer:1)

Generate Purchase Orders from the Prebooks.

If you want to automatically generate the 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.

Only applies to Multi-Location Companies.


prebookItems (array)

An array containing products.


carrierCode (required)(string:20)

Carrier code.


carrierName (required)(string:200)

Carrier name.


shipDate (required)(date)

Shipping date.

Date format: YYYY-MM-DD


identifier (required)(string:30)

Use this field to identify product lines and receive the same value in the response.


vendorCode (required if autoGeneratePOsfromPrebooks = 1)(string:20)

Vendor or Grower code.


vendorName (required: if autoGeneratePOsfromPrebooks = 1)(string:200)

Vendor or Grower name.


productCode (required)(string:20)

Product code.


productDescription (required)(string:200)

Product description.


boxTypeCode (required)(string:3)

Box type code.


boxes (required)(integer:10)

Number of boxes.


unitType (required) (string:5)

Unit type.

Valid values: Stem or Bunch


bunches (required)(integer:10)

Bunches per box.


stemsBunch (required)(integer:10)

Stems per Bunch.


cost (required: if autoGeneratePOsfromPrebooks = 1)(decimal:10,2)

Cost per Unit according to the selected unitType.


price (required)(decimal:10,2)

Price per Unit according to the selected unitType.


markCode (optional)(string:50)

Item mark code.


notes (optional)(string:200)

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.


{ "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


status (integer:1)

Transaction status.

Valid values: 1 = Success | 0 = Failure


message (string:500)

Transaction status description.


items (array)

An array containing products in the Prebook.


identifier (string:20)

Line ID value.


status: (integer:1)

Transaction status.

Valid values: 1 = Success | 0 = Failure


message (string:500)

Transaction status description.


prebookId (integer:20)

Prebook ID.


prebookNumber (string:10)

Prebook number.


prebookItemId (integer:10)

Product line ID.


purchaseOrderNumber (string:20)

Purchase Order number iif autoGeneratePOsfromPrebooks is given.


{ "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 } ] }
Peacock