Versions Compared

Key

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

Overview

Excerpt

This method returns a list of prebooks with their corresponding details.

 

Request

https://api.kometsales.com/api/prebook.details.list

  • Method: GET
  • Content-Type: URL Params

Input parameters:

  • authenticationToken (required): Komet Sales security token.
  • date (required) (date): prebook truck date (date format YYYY-MM-DD).
  • prebook (optional)(integer:10): prebook number.
  • customer (optional)(string:200): customer name or code. You can obtain this value from the customer.list API method.
  • customerId (optional)(integer:20): customer Komet Sales internal ID. You can obtain this value from the customer.list API method.
  • carrierName (optional) (string:200): carrier name.
  • carrierId (optional)(integer:20): carrier ID. You can obtain this value from the carrier.list API method.
  • salesPersonId (optional)(integer:20): customer's sales person ID.
  • soNumber (optional)(integer:20): standing order number.
  • customerPONumber (string)(integer:20): customer PO number.
  • locationId (optional)(integer:20): location Komet Sales internal ID.
  • brandId (optional)(integer:20): vendor Komet Sales internal brand ID.

Filtering by prebook, date, customerId, carrierId, salesPersonId,locationId, brandId, soNumber and customerPONumber uses an exact match.
Filtering by customer and carrier uses a "LIKE" expression.
Filters are not case sensitive.

 

Code Block
themeConfluence
languagejs
titleSample 1
https://api.kometsales.com/api/prebook.details.list?authenticationToken=token_info_goes_here&date=2015-02-10

Response

Output:

  • status (integer:1): transaction status. 1 for success or 0 for failure.
  • message (string:500): description of the status of the transaction.
  • prebooks: array of prebooks
    • id (integer:20): Komet Sales internal prebook ID.
    • number (integer:10): invoice number.
    • locationId (integer:20): location Komet Sales internal ID.
    • locationName (string:200): location name.
    • locationCode (string:20): location code.
    • customerName (string:200): name of the customer.
    • customerId (integer:20): Komet Sales internal customer ID.
    • customerCode (string:20): code of the customer.
    • type shipName (string:1200):  S for Standing Orders, P for standalone PrebooksShip To name.
    • truckDate shipCity (datestring:200): ship date of the order. (date format YYYY-MM-DD).
    • customerPONumber (string:20): customer PO number.
    • carrierId (integer:20): carrier Komet Sales internal ID.
    • carrierName Ship city name.
    • shipState (string:200): Ship state name.
    • shipAddress (string:200): Ship address.
    • shipZipCode (string:10): Ship zip code.
    • shipCountry (string:200): carrier Ship country name.shipvia 
    • type (string:101): warehouse or grower S for Standing Orders, P for standalone Prebooks, D for Doublescomments
    • truckDate (string:200date): order notes.details: array ship date of the order. (date format YYYY-MM-DD).
    • customerPONumber (string:20): customer PO number.
    • carrierId (integer:20): carrier Komet Sales internal ID.
    • carrierName (string:200): carrier name.
    • shipvia (string:10): warehouse or grower. 
    • comments (string:200): order notes.
    • details: array of prebook details
      • vendorId (integer:20): grower or vendor Komet Sales internal ID
      • vendorName (string:200): grower or Vendor name.
      • productId (integer:20): product Komet Sales internal ID.
      • productDescription (string:200): product description.
      • totalBoxes (integer:10): number of boxes in the product line.
      • boxType (string:3): box type code (FB, HB, QB, etc).
      • bunches (integer:10): bunches per box.
      • stemsBunch (integer:10): stems per bunch.
      • unitPrice (decimal:10,2): unit price.
      • units (integer:10): units per box.
      • unitType (string:10): stem or bunch.
      • totalUnits (integer:10): total units in the product line.
      • totalPrice (decimal:10,2): the amount of the product line. Unit Price times total units.
      • markCode (string:50): mark code.
      • brandId (integer:20): vendor brand Komet Sales internal ID.
      • brandName (string:200): vendor brand name.
      • breakdowns: array of breakdowns
        • productId (integer:20): product Komet Sales internal ID.
        • productDescription (string:20): product description.
        • stemsBunch (integer:10): stems per bunch.
        • bunches (integer:10): number of bunches.
        • price (decimal:10,2): unit price.

Code Block
themeConfluence
languagejs
titleOutput Sample
{
    "message": "OK",
    "status": 1,
    "prebooks": [
[
        {
			"id": 1927173,            
            "number": "13010",
			"customerName": "AB Flower Shop",
            "customerCode": "34325",
            "customerId": 34325,
            "shipName":"Store 1",
            "shipCity":"Miami",
            "shipState":"FL",
            "shipAddress":"Street 21 Av 90",
            "shipZipCode":"32009",
            "shipCountry":"USA",
            "details": [
                {
                    "breakdowns": [],
                    "vendorName": "Flores Capiro",
       {             "customerNameboxType": "AB Flower Shop","HB",
                    "idunitType": 1927173"Stem",
            "customerId": 34325,        "productDescription": "Combos Multiple Colors Rose Combo1 Multiple "details": [Grades",
                     {"stemsBunch": 12,
                    "breakdownsunitPrice": []"1.250",
                    "vendorNamevendorId": "Flores Capiro"6320,
                    "boxTypebrandId": "HB"2,
                    "unitTypebrandName": "StemDemo Brand",
                    "productDescriptionunits": "Combos Multiple Colors Rose Combo1 Multiple Grades"240,
                    "stemsBunchproductId": 12178172,
                    "unitPrice": "1.250"totalUnits": 2400,
                    "vendorIdbunches": 632020,
                    "brandIdtotalBoxes": 210,
                    "brandNametotalPrice": "Demo Brand",3,000.00"
                    "units": 240},
                {
   "productId": 178172,
                    "totalUnitsbreakdowns": 2400[],
                    "bunchesvendorName": 20"Exportadora de Flores",
                    "totalBoxesboxType": 10"HB",
                    "totalPriceproductDescription": "3,000.00"
 Carnation Assorted Select",
              },        "stemsBunch": 20,
        {                     "breakdowns"unitType": []"Bunch",
                    "vendorNameunitPrice": "Exportadora de Flores1.050",
                    "boxType": "HB"vendorId": 17684,
                    "productDescriptionunits": "Carnation Assorted Select"18,
                    "stemsBunchproductId": 20276277,
                    "unitTypetotalUnits": "Bunch"180,
                    "unitPricebunches": "1.050"18,
                    "vendorIdtotalBoxes": 1768410,
                    "unitstotalPrice": 18, "189.00"
                },
               "productId": 276277, {
                    "totalUnitsbreakdowns": 180[],
                    "bunchesvendorName": 18 "Flores del Este",
                    "totalBoxesboxType": 10"HB",
                    "totalPriceproductDescription": "189.00"Lilies Assorted Oriental  2 Blooms",
           },                 {"stemsBunch": 5,
                    "breakdownsunitType": []"Bunch",
                    "vendorNameunitPrice": "Flores del Este1.250",
                    "boxTypevendorId": "HB"6321,
                    "productDescriptionunits": "Lilies Assorted Oriental  2 Blooms"25,
                    "stemsBunchproductId": 5139103,
                    "unitTypetotalUnits": "Bunch"250,
                    "unitPricebunches": "1.250"25,
                    "vendorIdtotalBoxes": 632110,
                    "unitstotalPrice": 25,"312.50"
                }
   "productId": 139103,        ],
            "totalUnitscarrierId": 2501207,
            "shipVia": "Warehouse",
      "bunches": 25,     "carrierName": "American  Airlines",
            "totalBoxestruckDate": "2015-02-10",
             "type": "P",
            "totalPrice": "3123,501.50"
       
        },
        {
   ],
            "carrierIdid": 12071949612,          
  "customerCode": "34325",
            "shipVianumber": "Warehouse13949",
            "carrierName			"customerName": "AmericanEric's AirlinesFlowers",
            "numbercustomerCode": "130106529",
            "truckDatecustomerId": "2015-02-10"6529,
            "typeshipName":"Store "P2",
            "totalPriceshipCity": "Miami"3,501.50"
        },         {"shipState":"FL",
            "customerNameshipAddress": "Eric's Flowers"Street 15 Av 80",
            "idshipZipCode": 1949612"32010",
            "customerIdshipCountry": 6529"USA",
            "details": [
                {
                    "breakdowns": [],
                    "vendorName": "Flores Capiro",
                    "boxType": "HB",
                    "unitType": "Bunch",
                    "productDescription": "Pom Button Green Athos 70 Cm",
                    "stemsBunch": 10,
                    "unitPrice": "1.650",
                    "vendorId": 6320,
                    "brandId": 2,
                    "brandName": "Demo Brand",
                    "units": 24,
                    "productId": 139478,
                    "totalUnits": 336,
                    "bunches": 24,
                    "totalBoxes": 14,
                    "totalPrice": "554.40"
                }
            ],
            "carrierId": 1204,
            "customerCode": "6529",
            "shipVia": "Warehouse",
            "carrierName": "Armellini",
            "number": "13949",
            "truckDate": "2015-02-10",

            "type": "S",
            "totalPrice": "554.40"
        }
       
    ]
    
}