Versions Compared

Key

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

Use this method to get a detailed list of Purchase Orders based on the applied filters within a date range.

Tip

Valid Tokens: Company and Vendor.

When using this method, take the following statements into account:

  • The maximum range for this request is six months.

  • 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 boxes array is only available when the Purchase Order was shipped by the Grower.


Filter by label (Content by label)
showLabelsfalse
max5
titleRelated Articles
cqllabel in ( "purchase-orders" , "purchase-order-management" , "purchase-orders-vendors" )

Request


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

Method: GET

Content-Type: URL Parameters 


Input parameters:

authenticationToken (required)(string:50)

Komet Sales security token.


date (required if number is not sent)(date)

Vendor Ship Date.

Date format: YYYY-MM-DD


futureInventoryAvailableFrom (optional)(date)

Date when the product will be available.

The specified date range must not exceed 4 days.

Date format: YYYY-MM-DD 


futureInventoryAvailableTo (optional)(date)

Date when the product stops being available.

Date 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)

Komet Sales internal Vendor ID.

This parameter is used to search purchase orders from only one vendor.

You can get this value from the vendor.list API method.


customerId(optional)(integer:20)

Komet Sales internal Customer ID.

You can get this value from the customer.list API method.


customerPONumber (optional)(string:20)

Customer PO Number.


product (optional)(string:100)

Product description.


number (required if date is not sent)(string:10)

Purchase order number. 

You can send a set of numbers separated by commas. 


origin (optional)(string:4)

Origin code. For example: MIA, MDE, and BOG.


prebook(optional)(string:10)

Prebook number.


awbId (optional)(integer)

AWB ID of the order.

If you use this parameter, or inboundTruckId, you don’t need to send any other parameters aside from the authenticationToken.


inboundTruckId (optional)(integer)

Inbound Truck ID.

If you use this parameter, or awbId, you don’t need to send any other parameters aside from the authenticationToken.


locationId (optional)(integer:10)

Komet Sales internal Location ID.

You can obtain this value from the location.list API method.


status (optional)(string:20)

Prebook status.

Valid values: Confirmed by Farm, Approved, Pending Approval, Cancelled.

If this filter is not set, the system will return every Purchase Order, including those that have the Pending Approval status.


statusLine (optional)(string:20)

Product line status.

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)

Include Vendor Availability information.

Valid values: True | False

Default it's false.  


updatedAsOf (optional)(datetime)

When provided the system will only return orders that have been updated as of the date/time that is specified.

Date format: YYYY-MM-DDhh:mm:ss

Time must be in the GMT time zone. 


excludeDetails(optional)(integer:1)

If the result should include only headers and exclude details.

Valid values: 0 = Include details | 1 = Exclude details

Default is 0.


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

Response


status (integer:1)

Transaction status.

Valid values: 1 = Success | 0 = Failure


message (string:500)

Transaction status description.


purchaseOrders (array)

An array containing Purchase Orders.


id (integer:20)

Komet Sales internal Purchase Order ID.


number (integer:10)

Purchase Order number.


carrierName (string:200)

Purchase Order carrier name.


carrierId (integer:20)

Purchase Order Carrier ID.


networkCodeId (integer)

Purchase Order Carrier’s Komet Network Code.


origin (string:4)

Origin code.


vendorId (integer:20)

Komet Sales internal Vendor ID.


vendorName (string:200)

Vendor name.


shipDate (date)

Purchase Order shipping date.

Date format: YYYY-MM-DD


status (string:1)

Status code.

Valid values: CF = Confirmed by Farm | A = Approved | PA = Pending Approval | CA = Cancelled


locationId (integer:20)

Komet Sales internal Location 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 is in the GMT time zone.


createdOn (datetime)

Date when the order was created.

Date format: YYYY-MM-DD'T'hh:mm:ss


details (array)

Purchase Order details.


poItemId (integer:20)

Komet Sales internal Purchase Order Item 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)

Komet Sales internal Prebook Carrier ID.


carrierName(string:200)

Prebook Carrier nameName.


standingOrder(string:10)

Standing order number.


orderType(string:1)

Order type.

Valid values: P = Prebook | S = Standing Order | D = 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.  


subtotalCost(decimal:10,2)

Purchase Order total cost plus additional charges.


shipState (string:200): ship state name. 


shipAddress (string:200): ship address. 


shipZipCode (string:10): ship zip code.  


shipCountry (string:200): ship

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.


totalFbe(decimal:10,2)

Total Full Box Equivalent (FBE) of every box in the Purchase Order.


totalUnits(integer:10):total of units.


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


totalAdditionalCharges (decimal:10,2)

Total additional charges.


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.


stemsBunch(integer:10): stems per bunch.


bunches (integer:10): number of bunches.


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


boxes: array of boxes


boxCode(string:20): box code number.


lotNumber(string)

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 UPC instructions.  


Info

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


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",
         "subtotalCost":"123.96",
         "number":"P007298",
         "details":[
            {
               "orderType":"S",
               "stemsBunch":25origin": "MIA",
               "notesvendorId":"" 25211,
               "standingOrdertotalBoxes":"S00717" 15,
               "notesForVendorshipName": "",
               "customFieldscreatedOn":[
 "2024-10-07T08:06:28",
            "shipCountry": "",
                   ],
"number": "P002937",            
  "breakdowns":[          "locationId": 4,
            "id": 90456,
          ],  "shipZipCode": "",
            "bunchesshipCity":6 "",
               "prebookItemIdlocationName":929164, "Omaha Mod",
            "updatedOn": "units":1502024-10-07T07:06:37",
            "vendorName":   "totalBoxesAgriFarms":20,
  
            "unitTypeshipDate": "Stem2024-10-07",

              "carrierNameshipAddress": "Armellini",
  
            "referenceNumbersubtotalCost": "15",
             "shipState":  "poItemId":283404,            
   "customerId":6319,
               "lineItemStatustotalCost": "C15",
               "productDescriptiontotalAdditionalCharges":"Red Roses Black Magic 60 Cm",
  "0",
            "status": "recipesPA":[],
               "laborAndMaterialscarrierId":[] 1357,
               "boxescarrierName":[ "Armellini",
            "networkCodeId": 0,
            "details": [
     ],           {
    "productId":139688,                "boxTypeorderType": "HBP",
                    "customerNamestemsBunch":"Jeff's Flowers", 2,
                    "totalUnitstotalPrice":3000 "10",
                    "markCodenotesForVendor": "",
                    "prebookcustomFields":12385 [],
                    "unitCostbreakdowns":"0.33", [],
                    "prebookTruckDatebunches":"2018-09-24", 1,
                    "quantityConfirmedprebookItemId":20 934637,
                    "carrierIdcustomerCode":1204, "main code",
                    "totalCostunits":"990" 1,
           }         "totalBoxes": ]5,
          "id":88233,          "shipZipCodeunitType": "Bunch",
          "totalCost":"990",          "statustotalFbe": "CF10",
      },
      {          "origincarrierName": "MDEElite",
          "vendorId":6521,          "updatedOnreferenceNumber":"2018-09-20T14:25:19", "",
                    "vendorNamepoItemId":"Flores Duales"288102,
         "shipDate":"2018-09-24",           "totalBoxescustomerId":10 29330,
         "createdOn":"2018-09-20T14:24:36",           "numberlineItemStatus": "P007309P",
              "details":[      "productDescription": "Fancy Alstro",
    {                "orderTypeunitPrice": "S2",
               "stemsBunch":25,        "boxes": [],
       "notes":"",
               "standingOrderrecipes":"S00953" [],
               "notesForVendor":"",      "productId": 217045,
        "customFields":[            "laborAndMaterials": [],
                     ]"boxType": "FB",
               "breakdowns":[     "customerName": "customer test main",
                    "totalUnits": 5,
    ],                "bunchesprebook":6 3280,
                    "prebookItemIdunitCost":929183, "1",
                    "customerCodeprebookTruckDate": "BTW2024-10-07",
                "units":150,    "quantityConfirmed": 0,
          "totalBoxes":10,          "carrierId": 3000,
    "unitType":"Stem",                "totalFbetotalCost": "5"
               "carrierName":"Delivery" },
               "referenceNumber":"1.5", {
                    "unitPriceorderType": "0.9P",
                    "poItemIdstemsBunch":283417 2,
                    "customerIdtotalPrice":6614 "20",
                    "lineItemStatusnotesForVendor": "C",
                    "productDescriptioncustomFields":"Recipe Roses 60 Cm", [],
                    "recipesbreakdowns": [],
                    {
"bunches": 1,
                    "productDescriptionprebookItemId":"Pink Roses"934636,
                    "customerCode": "stems":10main code",
                    "units": }1,
                  {  "totalBoxes": 10,
                    "productDescriptionunitType": "Akito RosesBunch",

                    "stemstotalFbe":15 "20",
                 }   "carrierName": "FedEx",
           ],                "laborAndMaterialsreferenceNumber":[ "",
                    {
"poItemId": 288103,
                    "productDescriptioncustomerId":"Ribbon red"29330,
                    "lineItemStatus": "quantity":10P",
                    "productDescription": "10 pack }Leather Leaf",
              ],      "unitPrice": "2",
        "boxes":[            "boxes": [],
                    "recipes": [],
               "productId":139655,     "productId": 219070,
         "boxType":"HB",           "laborAndMaterials": [],
   "customerName":"John's john Flowers",               "boxType": "totalUnitsFB":1500,
               "markCode":"",     "customerName": "customer     test main",
    "totalPrice":"90",                "prebooktotalUnits":12394, 10,
                    "unitCostprebook":"0.2" 3279,
                    "prebookTruckDateunitCost": "2018-09-241",
               "quantityConfirmed":10,        "prebookTruckDate": "2024-10-07",
       "carrierId":1209,                "totalCostquantityConfirmed":"300" 0,
           }         "carrierId": ]4605,
         "id":88244,           "shipZipCodetotalCost": "CRE",10"
                }
     "totalAdditionalCharges":"12.90",       ]    "totalCost":"300",        
 "status":"CF"       }
    ],
    "status": 1
}
We've encountered an issue exporting this macro. Please try exporting this page again later.