Overview


Returns a list of invoices with their corresponding details.

 


Request

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

  • Method: GET
  • Content-Type: URL Params

Input parameters:

  • authenticationToken (required)(string:50): Komet Sales security token.
  • orderDate (required) (date): shipping date (date format YYYY-MM-DD). If the orderDateFrom, orderDateTo, order or orderId are sent, this field will be optional.
  • orderDateFrom (optional) (date): shipping date from (date format YYYY-MM-DD). The specified date range must not exceed 4 days.
  • orderDateTo (optional) (date): shipping date to (date format YYYY-MM-DD). The specified date range must not exceed 4 days.
  • status: (optional)(integer:1) status of the order (0=Pending Approval,1=Confirmed), if this filter is not given, the system will return all the orders from the orderDate specified.
  • 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.
  • product (optional)(string:200): product description.
  • order (optional)(integer:10): order number.
  • orderId (optional)(integer:10): Komet Sales Order Id.
  • locationId (optional)(integer:20): location Komet Sales internal ID. You can obtain this value from the location.list API method. This only applies for companies in Multi Location mode.
  • locationIds (optional) (integer:20): lists of locations IDs separated by colonsYou can obtain these values from the location.list API method. This only applies for companies in Multi Location mode.
  • 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.
  • itemType (string 3): the item type. Possible values: box or UN (unit). By default will be box. Type "ALL" to include all the box types.
  • excludeCustomerIds (optional)(string:20): List of Customer IDs that you want to exclude from the list of results.
  • excludeTransfer (optional)(boolean): 1 if you want the system to list only the header of transfer orders and skip the details. 0 if you want to include all orders. By default will be 0.
  • externalSystemSynced (optional)(boolean): 1 if you want to search only the orders that were marked as synchronized. 0 for orders pending to be synchronized. 
  • excludeBoxesInfo (optional)(boolean): 1 if you want to exclude the "boxes" array in the response. This value in 1 could help to increase the performance in the response.
  • excludeBreakdownInfo (optional)(boolean): 1 if you want to exclude the "breakdown" array in the response. This value in 1 could help to increase the performance in the response. 

You can send parameters such as the status, customer, customerId and product in order to filter the results. Filtering by status, carrierId or customerId the system uses an exact match. Filtering by customer and product uses a "LIKE" expression. Filters are not case sensitive.

Sample 1
https://api.kometsales.com/api/invoice.details.list?authenticationToken=YOUR_TOKEN_HERE&orderDate=2018-03-26&itemType=ALL

Response

Output:

  • status (integer:1): transaction status. 1 for success or 0 for failure.
  • message (string:500): description of the status of the transaction.
  • invoices: array of invoices
    • id (integer:20): Komet Sales internal invoice ID.
    • number (integer:10): invoice number.
    • customerId (integer:20): Komet Sales internal customer ID.
    • customerName (string:200): name of the customer.
    • customerCode (string:20): code of the customer.
    • billCity (string:200): billing city name.
    • billState (string:200): billing state name.
    • billAddress (string:200): billing address.
    • billZipCode (string:10): billing Zip Code.
    • billCountry (string:200): billing country name.
    • orderRef (string:20): reference order number.
    • 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.
    • shipDate (date): ship date of the order. (date format YYYY-MM-DD).
    • carrierId (integer:20): carrier Komet Sales internal ID.
    • carrierName (string:200): carrier name.
    • carrierCode (string:20): carrier code.
    • salesPersonId (integer:20): salesperson Komet Sales internal ID.
    • salesPersonName (string:200): salesperson name.
    • locationName(string:200): location name.
    • locationId (integer:20): Komet Sales internal ID of the location.
    • mainLocationName (string:200): the name of the main location.
    • mainLocationId (integer:20): internal ID of the main location.
    • customerPONumber (string:20): customer PO #.
    • totalBoxes (integer:10): total of boxes.
    • subtotal (decimal:10,2): total of the order. This amount does not include Additional Charges nor taxes.
    • additionalCharges (decimal:10,2): total of additional charges.
    • additionalChargesDetails: array of additional charges in the order
      • name (string:200): name of the additional charge.
      • amount (decimal:10,2): additional charge amount.
      • accountingCode (string:20): additional charge accounting code. 
    • taxes (decimal:10,2): total of taxes.
    • taxesDetails: array of taxes in the order. 
      • name (string:200): name of the tax.
      • percentage (decimal:10,2): tax percentage applied to the order. 
      • accountingCode (string:20): tax accounting code. 
    • total (decimal:10,2): total of the order. Subtotal + additionalCharges + taxes.
    • status (string:20): status of the order (Draft, Pending Approval, Confirmed)
    • confirmedOn (datetime): date and time when the order was confirmed. (date format YYYY-MM-DD'T'hh:mm:ss). Time will be in the GMT time zone.
    • countConfirmed (integer:10): number of times that the order has been confirmed.
    • isEcommerce (string:3): it will return "Yes" when the order was entered from the E-commerce site, otherwise it will be "No".
    • externalSystemsSynced: array of external systems that have been marked as synced.
      • externalSystemId (internal:10): ID of the external system.
      • syncDate (date): date time when the order was synced (UTC time zone).
    • 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.
    • warehouseInstructions (string: 200): Order notes / instructions for the warehouse. 
    • invoiceNotes (string:200) Order notes for the customer that appear on the Invoice. 
    • totalCost (decimal:10,2): total cost of the order. This includes cost of the items in boxes, units and hard goods. 
    • totalLandedCost (decimal:10,2): total landed cost of the order. This includes landed cost of the items in boxes, units and hard goods. 
    • details: array of order details:
      • detailId (integer:20): internal ID of the line of the order.
      • awb (string:20): AWB number or shipment reference number.
      • ref (string:20): reference number of the product line.
      • productId (integer:20): product Komet Sales internal ID.
      • productDescription (string:200): product description.
      • productCode (string:20): product code. It's also called Product Legacy Code. 
      • categoryAccountingCode (string:20): category accounting code. 
      • growerId (integer:20): grower or vendor Komet Sales internal ID
      • growerCode (string:50): grower or vendor code.
      • growerName (string:200): grower or vendor name.
      • totalBoxes (integer:10): number of boxes in the product line.
      • boxTypeId (integer:20): box type Komet Sales internal ID.
      • boxType (string:3): box type code (FB, HB, QB, etc).
      • units (integer:10): units per Box.
      • unitType (string:10): stem or bunch.
      • totalUnits (integer:10): total units in the product line.
      • bunchesBox (integer:10): bunches per box.
      • stemsBunch (integer:10): stems per bunch.
      • markCode (string:50): mark code.
      • notes (string:200): additional notes or label instructions.
      • unitPrice (decimal:10,2): unit price.
      • amount (decimal:10,2): the amount of the product line. Unit Price times total units.
      • salesType (string:1): M (Open Market), P (Prebook), S (Standing Order), L (Local)
      • flowerCost (decimal:10,5): unit flower cost.
      • freightCost (decimal:10,5): freight cost per unit.
      • handling (decimal:10,5): handling cost per unit.
      • duties (decimal:10,5): duties cost per unit.
      • otherCharges (decimal:10,5): other cost charges per unit.
      • landedCost (decimal:10,5): landed cost per unit.
      • prebookNumber (integer:10): Prebook number associated to the invoice. 
      • productAlias (string: 200): Product alias specified by the salesperson. 
      • salesChannel (integer: 1): 0 if it is Web App, 1 for Mobile, 2 for K2K sales.  
      • aging (integer: 5): Number of days that represents the age of the product based on the ship date of the order.
      • breakdowns: Array of breakdowns
        • detailId (integer:20): internal ID of the line of the order.
        • 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.
        • price (decimal:10,2): unit price.
      • boxes: array of boxes
        • detailId (integer:20): Internal ID of the line of the order.
        • boxCode (string:10): box code or box number.
        • inventoryLineId (integer:20):  Inventory line ID. 
        • lotNumber (integer:10): lot number.
        • position (string:5): rack position or location.
        • statusId (integer:20): status Komet Sales internal ID.
        • statusName (string:20): status name: (Farm Shipped, Received Warehouse, Shipped Warehouse)
    • detailsUnits: array of order units details:

      • detailId (integer:20): Internal ID of the line of the order in units.

      • awb (string:20): AWB number.

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

      • productDescription (string:200): product description.

      • productCode (string:20): product code. It's also called Product Legacy Code.

      • categoryAccountingCode (string:20): category accounting code. 

      • growerId (integer:20): grower or vendor Komet Sales internal ID

      • growerCode (string:50): grower or vendor code.

      • growerName (string:200): grower or vendor name.

      • totalUnits: number of units in the product line.

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

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

      • totalUnits (integer:10): total units in the product line.

      • unitPrice (decimal:10,2):unit price.

      • amount (decimal:10,2): the amount of the product line. Unit Price times total units.

      • markCode (string:50): mark code.

      • notes (string:200): additional notes or label instructions.

      • unit flower cost.

      • freightCost (decimal:10,5): freight cost per unit.

      • handling (decimal:10,5): handling cost per unit.

      • duties (decimal:10,5): duties cost per unit.

      • otherCharges (decimal:10,5): other cost charges per unit.

      • landedCost (decimal:10,5): landed cost per unit.

      • productAlias (string: 200): Product alias specified by the salesperson.