Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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

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.

  • customerBillingCity (required) (string:200): customer billing city.

  • customerBillingState (required) (string:200): customer billing state.

  • customerBillingZipcode (required) (string:200): customer billing zipcode.

  • customerBillingCountry (required) (string:200): customer billing country.

  • customerShippingStreet (required) (string:200): customer shipping street.

  • customerShippingCity (required) (string:200): customer shipping city.

  • customerShippingState (required) (string:200): customer shipping state.

  • customerShippingZipcode (required) (string:200): customer shipping zipcode.

  • customerShippingCountry (required) (string:200): customer shipping country.

  • customerPhone (required) (string:100): customer phone. 

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

  • customerPO (optional)(string:20): customer purchase order.

  • autoGeneratePOsfromPrebooks (optional)(integer:1): specify 1 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)(string:20): Location code. 

  • prebookItems: array of 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 your lines and receive the same value in the response.

    • vendorCode (required: if autoGeneratePOsfromPrebooks is 1)(string:20): vendor or grower code.

    • vendorName (required: if autoGeneratePOsfromPrebooks is 1)(string:200): vendor or grower name.

    • productCode (required)(string:20): code of the product.

    • productDescription (required)(string:200): description of the product.

    • boxTypeCode (required)(string:3): code of the box type.

    • boxes (required)(integer:10): number of boxes.

    • unitType (required) (string:5): stem or bunch are the unique valid values.

    • bunches (required) (integer:10): bunches per box.

    • stemsBunch (required) (integer:10): stems for 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.

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

    • markCode (optional)(string:50): mark code for item.

    • notes (optional)(string:200): any 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

{
  "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 status. 1 for success or 0 for failure.

  • message (string:500): description of the status of the transaction.

  • items (array)

    • identifier (string:20). The value that identifies the line. This is the same value of the request. 

    • status: (integer:1): transaction status. 1 for success or 0 for failure.

    • message (string:500): description of the status of the transaction.

    • prebookId (integer:20): prebook ID that was created

    • prebookNumber (string:10): Prebook number that was created. 

    • prebookItemId (integer:10) ID of the product line that was added to the order.

    • purchaseOrderNumber (string:20) PO number that was created, if autoGeneratePOsfromPrebooks is given.

Sample Response

{
  "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
    }
   ]   
 }
  • No labels