Versions Compared

Key

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

Overview

Excerpt

Returns a list of purchase orders with their corresponding details based on the applied filters.

 

Request

https://api.kometsales.com/api/purchase.order.list

  • Method: GET
  • Content-Type: URL Params. 

Input parameters:

  • authenticationToken (required)(string:50): Komet Sales security token.
  • date (required)(date): the vendor ship date of the order. (format YYYY-MM-DD).
  • futureInventoryAvailableFrom (optional)(date): the date when the product will be available from. (format YYYY-MM-DD). The specified date range must not exceed 4 days.
  • futureInventoryAvailableTo (optional)(date): the date when the product will be available to. (format YYYY-MM-DD). The specified date range must not exceed 4 days.
  • vendor (optional)(string:50): vendor name or code.
  • vendorId (optional)(integer:10): vendor Komet Sales internal ID. This parameter is used to search purchase orders from only one vendor. You can obtain this value from the vendor.list API method.
  • customerId (optional)(integer:20): customer Komet Sales internal ID. You can obtain this value from the customer.list API method.
  • product (optional)(string:100): product description.
  • number (optional)(string:10): purchase order number. You may send a set of numbers separated by commas. 
  • origin (optional)(string:4): origin code (MIA, MDE, BOG, etc).
  • prebook (optional)(string:10): prebook number.
  • locationId (optional)(integer:10): location Komet Sales internal ID. You can obtain this value from the location.list API method.
  • status (optional)(string:20): it's used if you want to load only some orders with a specific status. Valid values: Confirmed by Farm, Approved, Pending Approval, Cancelled. If this filter is not set, the system will return all the purchases orders, including those that are Pending Approval.
  • purchaseOrderItemIds (optional)(string:200): A set of purchase order item IDs separated by commas. This is very useful for the Vendor Availability integration. 
  • includeVendorAvailabilityDetails (optional)(boolean:true/false): By default it's false. If this value is true, the response will include the details of the vendor availability information but you will have to apply the number filter and only one number is allowed at a time. 
  • updatedAsOf (optional) (datetime) (date format YYYY-MM-DD hh:mm:ss): When provided it will force the method to only return orders that have been updated as of the date/time that is specified. Time must be in the GMT time zone. 
  • excludeDetails (optional)(integer:1): specify 1 if you want the list only the header of the orders and exclude the details. Default = 0.  

Filtering by vendorId, status, number, origin, prebook and locationId uses an exact match. Filtering by vendor and product uses a "LIKE" expression. Filters are not case sensitive.

The array of boxes will be only available when the purchase order has been shipped from the farm.

Code Block
themeConfluence
languagejs
titleSample
https://api.kometsales.com/api/purchase.order.list?authenticationToken=token_info_goes_here&date=2014-09-24&status=A

Response

Output:

  • status (integer:1): transaction status. 1 for success or 0 for failure.
  • message (string:500): description of the status of the transaction.
  • purchaseOrders: array of purchase orders
  • id (integer:20): Komet Sales internal purchase order ID.
  • number (integer:10): purchase order number.
  • origin (string:4): origin code.
  • vendorId (integer:20): vendor Komet Sales internal ID.
  • vendorName (string:200): vendor name.
  • shipDate (date): order ship date. (date format YYYY-MM-DD).
  • status (string:1): status code (CF = Confirmed by Farm, A = Approved, PA = Pending Approval, CA = Cancelled).
  • locationId (integer:20): location Komet Sales internal ID.
  • locationName (string:200): location name.
  • totalCost (decimal:10,2): total cost of the order.
  • comments (string:500): special instructions or comments.
  • totalBoxes (integer:10): number of boxes.
  • updatedOn (datetime): last time when the order was updated. (date format YYYY-MM-DD'T'hh:mm:ss). Time will be in the GMT time zone.
  • createdOn (datetime): date when the order was created. (format YYYY-MM-DD'T'hh:mm:ss).
  • details: array of purchase orders details
  • poItemId (integer:20): PO item internal ID.
  • prebookItemId (integer:20): Prebook item internal ID.
  • prebook (integer:10): prebook number.
  • prebookTruckDate (date): prebook truck date. (date format YYYY-MM-DD).
  • carrierId (integer:20): carrier Komet Sales internal ID.
  • carrierName (string:200): carrier name.
  • standingOrder (string:10): standing order number.
  • orderType (string:1): P for prebook, S for standing Order, D for double.
  • customerId (integer:20): customer Komet Sales internal ID.
  • customerName (string:200): customer name.
  • productId (integer:20)

    Returns a list of detailed Purchase Orders based on the applied filters within a date range.

    Info

    The maximum range for this request is six months.

    Request

    URL: https://api.kometsales.com/api/purchase.order.list  

    Method: GET

    Content-Type: URL Params. 

    Input parameters:

    • authenticationToken (required)(string:50): Komet Sales security token.

    • date (required)(date): the vendor ship date of the order. (format YYYY-MM-DD).

    • futureInventoryAvailableFrom (optional)(date): the date when the product will be available from. (format YYYY-MM-DD). The specified date range must not exceed 4 days.

    • futureInventoryAvailableTo (optional)(date): the date when the product will beavailable to. (format YYYY-MM-DD). The specified date range must not exceed 4 days.

    • vendor (optional)(string:50): vendor name or code.

    • vendorId(optional)(integer:10): vendor Komet Sales internal ID. This parameter is used to search purchase orders from only one vendor. You can obtain this value from the vendor.list API method.

    • customerId(optional)(integer:20): customer Komet Sales internal ID. You can obtain this value from the customer.list API method.

    • customerPONumber (optional) (string:20): The PO # of the customer.

    • product (optional)(string:100): product description.

    • number (optional)(string:10): purchase order number. You may send a set of numbers separated by commas. 

    • origin (optional)(string:4): origin code (MIA, MDE, BOG, etc).

    • prebook(optional)(string:10):prebooknumber.

    • locationId(optional)(integer:10): location Komet Sales internal ID. You can obtain this value from the location.list API method.

    • status (optional)(string:20): it's used if you want to see only some orders with a specific status. Valid values: Confirmed by Farm, Approved, Pending Approval, Cancelled. If this filter is not set, the system will return all the purchases orders, including those that are Pending Approval.

    • statusLine (optional)(string:20): the status of the line. Valid values: Pending, Confirmed, Cancelled, Partial Confirm, Shipped. 

    • purchaseOrderItemIds (optional)(string:200): A set of purchase order item IDs separated by commas. This is very useful for the Vendor Availability integration. 

    • includeVendorAvailabilityDetails (optional)(boolean:true/false): By default it's false. If this value is true, the response will include the details of the vendor availability information but you will have to apply the number filter and only one number is allowed at a time. 

    • updatedAsOf(optional) (datetime) (date format YYYY-MM-DDhh:mm:ss): When provided it will force the method to only return orders that have been updated as of the date/time that is specified. Time must be in the GMT time zone. 

    • excludeDetails(optional)(integer:1): specify 1 if you want the list only the header of the orders and exclude the details. Default = 0.  

    • Filtering by vendorId, status, number, origin, prebook, and locationId uses an exact match.

    • Filtering by vendor and product uses a "LIKE" expression. Filters are not case-sensitive.

    Info

    The Box Array is only available when the purchase order was shipped by the Grower.

    curl
    Code Block
    languagejs
    https://api.kometsales.com/api/purchase.order.list?
    authenticationToken=token_info_goes_here&date=2014-09-24&status=A

    Response

    Output:

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

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

    • purchaseOrders: array of purchase orders

      • id (integer:20): Komet Sales internal purchase order ID.

      • number (integer:10): purchase order number.

      • origin (string:4): origin code.

      • vendorId(integer:20): vendor Komet Sales internal ID.

      • vendorName(string:200): vendor name.

      • shipDate(date): order ship date. (date format YYYY-MM-DD).

      • status (string:1): status code (CF = Confirmed by Farm, A = Approved, PA = Pending Approval, CA = Cancelled).

      • locationId(integer:20): location Komet Sales internal ID.

      • locationName(string:200): location name.

      • totalCost(decimal:10,3): total cost of the order.

      • comments (string:500): special instructions or comments.

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

      • updatedOn(datetime): last time when the order was updated. (date format YYYY-MM-DD'T'hh:mm:ss). Time will be in the GMT time zone.

      • createdOn(datetime):date when the order was created. (format YYYY-MM-DD'T'hh:mm:ss).

      • details: array of purchase orders details

        • poItemId(integer:20): PO item internal ID.

        • prebookItemId(integer:20): Prebook item internal ID.

        • prebook(integer:10):prebook number.

        • prebookTruckDate(date):prebook truck date. (date format YYYY-MM-DD).

        • carrierId(integer:20): carrier Komet Sales internal ID.

        • carrierName(string:200): carrier name.

        • standingOrder(string:10): standing order number.

        • orderType(string:1): P for prebook, S for standing Order, D for double.

        • customerId(integer:20): customer Komet Sales internal ID.

        • customerName(string:200): customer name.

        • customerCode (string:50): Customer code.

        • shipName (string:200): Ship To name. 

        • shipCity (string:200): ship city name.  

        • shipState (string:200): ship state name. 

        • shipAddress (string:200): ship address. 

        • shipZipCode (string:10): ship zip code.  

        • shipCountry (string:200): ship country name.  

        • productId (integer:20) product Komet Sales internal ID.

        • productDescription(string:200): product description.

        • recipes: array of the products included within the recipe:

          • productDescription(string:200): item description.

          • stems(integer: 3): the number of stems.

        • laborAndMaterials: array of the labor and materials included within the recipe:

          • productDescription(string:200): product description.

          • quantity(integer: 3): the number of units.

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

        • quantityConfirmed(integer:10): number of boxes confirmed by the vendor. 

        • boxType(string:3): box type code. (HB, QB, EB, etc).

        • bunches (integer:10): number of bunches per box.

        • stemsBunch(integer:10): stems per bunch.

        • unitCost(decimal:10,3): unit flower cost.

        • units (integer:10): units per box.

        • unitType(string:5): stem or bunch.

        • totalUnits(integer:10):total of units.

        • totalCost(decimal:10,3): total cost.

        • unitPrice(decimal:10,3): unit flower price. This field is only available if the token type is Company Token. 

        • totalPrice(decimal:10,3): total price. This field is only available if the token type is Company Token. 

        • markCode(string:20): special mark code or slot number.

        • customField1 (string:50): additional field #1.

        • notes (string:200): general notes for each line.

        • notesForVendor (string:200): notes for the vendor associated to the prebook item.

        • lineItemStatus(string:1): vendor status code of the product line. P for Pending, C for Confirmed, CA for Cancelled, PC for Partial Confirm, S for Shipped.

        • breakdowns: array of breakdowns

          • productId (integer:20): product Komet Sales internal ID.

          • productDescription(string:200): product description.

    totalBoxes
          • stemsBunch(integer:10):

    number of boxes.
  • quantityConfirmed (integer:10): number of boxes confirmed by the vendor. 
  • boxType (string:3): box type code. (HB, QB, EB, etc).
          • stems per bunch.

          • bunches (integer:10): number of

    bunches per box.stemsBunch (integer:10): stems per bunch
          • bunches.

    unitCost
          • cost (decimal:10,

    2 Code Block
    themeConfluence
    languagejs
    titleSample
    { "message": "OK", "status": 1, "purchaseOrders": [ {
          • 3): unit flower cost.

  • units (integer:10): units per box.
  • unitType (string:5): stem or bunch.
  • totalUnits (integer:10): total of units.
  • totalCost (decimal:10,2): total cost.
  • markCode (string:20): special mark code or slot number.
  • customField1 (string:50): additional field #1.
  • notes (string:200): special instructions or comments for each line.
  • lineItemStatus (string:1): vendor status code of the product line. P for Pending, C for Confirmed, CA for Cancelled, PC for Partial Confirm, S for Shipped.
  • breakdowns: array of breakdowns
    • productId (integer:20): product Komet Sales internal ID.
    • productDescription (string:200): product description.
    • stemsBunch (integer:10): stems per bunch.
    • bunches (integer:10): number of bunches.
    • cost (decimal:10,2): unit flower cost.
  • boxes: array of boxes
    • boxCode (string:20): box code number.
    • lotNumber (integer:10): box lot number.
    • position (string:5): physical position of the box.
    • statusId (integer:10): status Komet Sales internal ID.
    • statusName (string:20): status name (Farm Shipped, Received Warehouse, Shipped Warehouse)
  • customFields: array of custom fields of the line, only if they exist.
    • name and value of the custom field (string:20).
  • vendorAvailabilityDetails: details of the vendor availability items associated to this line of the order. 
    • productDescription (string:200): product description.
    • availableFrom (date): date when the product was available from the vendor. (date format YYYY-MM-DD).
    • postHarvest (string:20): post harvest. 
    • unitType (string:20): unit type. Stem or Bunch. 
    • unitsAllocated (integer:10): number of units allocated to this line of the order. 
    • downgraded (boolean): true if the product was downgraded.
    • originalProductDescription (string:200): product where the item was downgraded from. 
  • upc: details of the upc information added to the product. 
  • number (string: 50): UPC number. 
  • checkDigit (integer: 2): UPC check digit. 
  • pullDate (string: 20): UPC Pull date
  • price (string:20): UPC unit price. 
  • description (string:200): Product description for the UPC. 
  • instructions (string:200): Additional instructions for the UPC. 
        • boxes: array of boxes

          • boxCode(string:20): box code number.

          • lotNumber(integer:10): box lot number.

          • position (string:5): physical position of the box.

          • statusId(integer:10): status Komet Sales internal ID.

          • statusName(string:20): status name (Farm Shipped, Received Warehouse, Shipped Warehouse)

        • customFields: array of custom fields of the line, only if they exist.

          • name and value of the custom field (string:20).

        • vendorAvailabilityDetails: details of the vendor availability items associated to this line of the order. 

          • productDescription(string:200): product description.

          • availableFrom(date): date when the product was available from the vendor. (date format YYYY-MM-DD).

          • postHarvest (string:20): post harvest. 

          • unitType(string:20): unit type. Stem or Bunch. 

          • unitsAllocated(integer:10): number of units allocated to this line of the order. 

          • downgraded (boolean): true if the product was downgraded.

          • originalProductDescription(string:200):product where the item was downgraded from. 

        • upc: details of the upc information added to the product. 

          • number (string: 50): UPC number. 

          • checkDigit(integer: 2): UPC check digit. 

          • pullDate(string: 20): UPC Pull date

          • price (string:20): UPC unit price. 

          • description (string:200): Product description for the UPC. 

          • instructions (string:200): Additional instructions for the UPC. 

    Info

    The Ship-To information is only displayed with Company-type Tokens.


    Sample Response

    Code Block
    {
       "message":"OK",
       "purchaseOrders":[
          {
             "origin":"MDE",
             "vendorId":6321,
             "updatedOn":"2018-09-20T14:25:20",
             "vendorName":"Flores del Este",
             "shipDate":"2018-09-24",
             "totalBoxes":20,
             "createdOn":"2018-09-20T14:24:34",
             "number":"P007298",
             "details":[
                {
                   "orderType":"S",
                   "stemsBunch":25,
                   "notes":"",
                   "standingOrder":"S00717",
                   "notesForVendor":"",
                   "customFields":[
                      
                   ],
                   "breakdowns":[
                      
        
    "id":
     
    297405,
             
    "totalCost": 45.6
     ],
            
    "vendorName
           "bunches":
    "Flores ABC",
    6,
                   "
    status
    prebookItemId":
    "A",
    929164,
                   "
    origin
    units":
    "MDE",
    150,
                   "totalBoxes":
    5
    20,
            
    "number": "P003006",
           "
    shipDate
    unitType":
    "
    2014-09-24
    Stem",
    
          
    "vendorId":
     
    6325
            
    "
    details
    carrierName":"Armellini",
    
    [
                 
    {
      "referenceNumber":"",
                   "
    customerName
    poItemId":
    "ADO Flowers"
    283404,
                   
    "
    totalCost
    customerId":
    45.6
    6319,
    
                   "
    breakdowns
    lineItemStatus":
    []
    "C",
                   
    "
    prebook
    productDescription":
    10353
    "Red Roses Black Magic 60 Cm",
                   
    "
    prebookTruckDate
    recipes":
    "2014-09-25"
    [],
                   
    "
    boxType
    laborAndMaterials":
    "HB"
    [],
                   
    "
    unitType
    boxes":[
    
    "Bunch",
                    
    "stemsBunch":
     
    25,
     
                   
    "orderType": "P",
    ],
               
    "productDescription":
     
    "Carnation
     
    White
     
    Floriana
     
    Fancy
    "productId":139688,
                   "boxType":"HB",
                   "
    units
    customerName":
    6
    "Jeff's Flowers",
                   
    "
    productId
    totalUnits":
    138825
    3000,
    
                   "
    totalUnits
    markCode":
    30
    "",
                   
    "
    poItemId
    prebook":
    1055599
    12385,
    
                   "
    customerId
    unitCost":
    37783
    "0.33",
                   
    "
    lineItemStatus
    prebookTruckDate":
    "
    S
    2018-09-24",
                   
    "
    unitCost
    quantityConfirmed":
    1.52
    20,
    
                   "carrierId":
    1280
    1204,
                   
    "bunches": 6,
    "totalCost":"990"
                }
        
    "carrierName":
     
    "DHL",
        
    ],
             "
    totalBoxes
    id":88233,
    
    5,
             "shipZipCode":"",
             "
    notes
    totalCost":
    "990",
             "status":"CF"
          
    "markCode": ""
    },
          {
             "
    boxes
    origin":"MDE",
    
    [
             "vendorId":6521,
             
    {
    "updatedOn":"2018-09-20T14:25:19",
             "vendorName":"Flores Duales",
             
    "
    statusId
    shipDate":
    1
    "2018-09-24",
             
    "totalBoxes":10,
             "
    statusName
    createdOn":
    "Farm Shipped
    "2018-09-20T14:24:36",
             "number":"P007309",
             
    "details":[
      
    "lotNumber":
     
    "5317",
             {
                   "
    boxCode
    orderType":
    "
    KS6819038
    S"
    ,
                   "stemsBunch":25,
       
    },
                "notes":"",
            
    {
           
    "standingOrder":"S00953",
                   "
    statusId
    notesForVendor":"",
    
    1,
                   "customFields":[
              
    "statusName":
     
    "Farm
     
    Shipped",
          
                   ],
      
    "lotNumber":
     
    "5317",
                "breakdowns":[
                
    "boxCode":
     
    "KS6819039"
         
                   
    }
    ],
                   "bunches":6,
            
    {
           "prebookItemId":929183,
                   
    "
    statusId
    customerCode":
    1
    "BTW",
                   
    "units":150,
         
    "statusName":
     
    "Farm
     
    Shipped",
            
    "totalBoxes":10,
                   "
    lotNumber
    unitType":
    "
    5317
    Stem",
                   
    "boxCode
    "carrierName":
    "
    KS6819040
    Delivery",
                   "referenceNumber":"",
        
    },
               
    "unitPrice":"0.9",
           
    {
            "poItemId":283417,
                   
    "
    statusId
    customerId":
    1
    6614,
    
                   
    "statusName
    "lineItemStatus":
    "
    Farm Shipped
    C",
    
                   
    "
    lotNumber
    productDescription":
    "
    5317",
    Recipe Roses 60 Cm",
                   "recipes":[
         
    "boxCode":
     
    "KS6819041"
                {
            
    },
                 "productDescription":"Pink Roses",
          
    {
                   
    "stems":10
           
    "statusId":
     
    1,
              },
                  
    "statusName": "Farm
     
    Shipped",
       {
                         "
    lotNumber
    productDescription":"Akito 
    "5317
    Roses",
                         
    "
    boxCode
    stems":
    "KS6819042"
    15
                      
    }
                   
    ],
    
                   "
    customFields
    laborAndMaterials":[
    
                      {
                         
    "
    customFieldId
    productDescription":"Ribbon 
    1
    red",
                         "quantity":10
        
    "customFieldValueId": 2,
                  }
                  
    "fieldName":"Cut Point",
     ],
                   "boxes":[
               
    "value":"Cut
     
    Point
     
    1"
         
                   
    }
    ],
                   "productId":139655,
        
    {
               "boxType":"HB",
                   "
    customFieldId
    customerName":
    2
    "John's john Flowers",
                   "totalUnits":1500,
             
    "customFieldValueId
          "markCode":
    5
    "",
                   "totalPrice":"90",
            
    "fieldName":"Sleeve",
           
    "prebook":12394,
                   
    "
    value
    unitCost":"
    Sleeve 3"
    0.2",
                   "prebookTruckDate":"2018-09-24",
         
    }
              "quantityConfirmed":10,
             
    ],
          "carrierId":1209,
              
    "upc":
      
    {
     
    "number":"454656565333",
     
    "checkDigit":"6",
     
    "pullDate
    "totalCost":"
    09/10", "price":"0.89", "description":"White Pom", "instructions":"White Pom Instructions" }
    300"
                }
             ],
             "id":88244,
             "shipZipCode":"",
             "totalCost":"300",
       
    }
          "status":"CF"
      
    ]
        }
      
    }
     ],
      
    ]
     "status":1
    }

     

     

    Panel
    titleRelated Articles
    Filter by label (Content by label)
    showLabelsfalse
    max10
    showSpacefalse
    sorttitle

    showSpacefalse

    cqllabel in ( "editing-purchase-orders" , "purchase-order-summary" , "purchase-orders" )
    labelsediting-purchase-orders purchase-orders purchase-order-summary