N1Developer docsv1

TYPE REFERENCE

Invoice

Referenced by 5 generated operations.

Documented fields

  • createdAtString!Required

    UTC time the invoice was made.

    Example: "2026-10-07T05:00:00.000Z"

  • customerIdID!Required

    The customer (see customer).

    Example: "0192f0c1-0000-7000-8000-0000000c0002"

  • customerNameString!Required

    The customer’s name, so a list needs no second call.

    Example: "Bharat Hydraulics 2"

  • discountInt!Required

    Paise discount asked for. The amount applied is totals.discount.

    Example: 10000

  • dueDateString!Required

    Payment due date, YYYY-MM-DD. Defaults to the issue date plus the customer’s payment terms.

    Example: "2026-11-06"

  • gstRateFloat!Required

    The GST percentage asked for. The rate applied is totals.gstRate.

    Example: 18

  • idID!Required

    Stable id (UUIDv7).

    Example: "0192f0c1-0000-7000-8000-000000b10002"

  • issuedAtString!Required

    Invoice date, YYYY-MM-DD.

    Example: "2026-10-07"

  • jobCardIdIDOptional

    The job card this was raised from (see jobCard); null for a manual invoice.

    Example: "0192f0c1-0000-7000-8000-000000d20015"

  • lines[BillingLine!]!Required

    The priced operations, in the order given.

    Example: [{"id":"0192f0c1-0000-7000-8000-000000b20015","operation":"Turning","description":"Bush 25x30","minutesPerPiece":2,"setupMinutes":20,"ratePerMinute":800,"amount":112000},{"id":"0192f0c1-0000-7000-8000-000000b20016","operation":"Finishing","description":"","minutesPerPiece":0.5,"setupMinutes":0,"ratePerMinute":600,"amount":18000}]

    Show children
    • amountFloat!Required

      Integer paise: (quantity × minutesPerPiece + setupMinutes) × ratePerMinute, rounded half up to a whole paisa. Computed by the server.

      Example: 112000

    • descriptionString!Required

      Free text for the customer; empty when none was given.

      Example: "Bush 25x30"

    • idID!Required

      Stable id (UUIDv7).

      Example: "0192f0c1-0000-7000-8000-000000b20015"

    • minutesPerPieceFloat!Required

      Machine minutes for one piece.

      Example: 2

    • operationString!Required

      The operation priced, such as Turning.

      Example: "Turning"

    • ratePerMinuteInt!Required

      Paise per machine minute.

      Example: 800

    • setupMinutesFloat!Required

      One-off machine minutes to set up, charged once per line.

      Example: 20

  • notesStringOptional

    Printed on the invoice.

    Example: "Early-payment discount."

  • numberString!Required

    The invoice number. Assigned by the server; gaps never happen.

    Example: "DPW/26-27/0011"

  • orderIdIDOptional

    The order this bills (see order).

    Example: "0192f0c1-0000-7000-8000-000000d00002"

  • partString!Required

    Part name or number.

    Example: "Bush 25x30"

  • paymentPaymentOptional

    Set once the invoice is paid; null before that.

    Example: null

    Show children
    • paidOnString!Required

      The day the money arrived, YYYY-MM-DD.

    • receivedAmountInt!Required

      Paise actually received: the invoice total less tdsAmount.

    • tdsAmountInt!Required

      Paise the customer deducted as tax at source; 0 when none.

    • tdsSectionStringOptional

      The income-tax section the deduction was made under, such as 194C.

  • poAmountIntOptional

    Paise: the amount on the customer’s PO, to compare against totals.total.

    Example: 153400

  • quantityInt!Required

    Pieces billed.

    Example: 60

  • quoteIdIDOptional

    The quote this was priced from, if any (see quote).

    Example: null

  • routeCardStringOptional

    The route card number printed on the job card.

    Example: "JC-00002"

  • statusInvoiceStatus!Required

    NEW, OVERDUE or PAID. Derived from payment and dueDate.

    Example: "NEW"

    • NEWIssued, not paid, and not yet past its due date.
    • OVERDUENot paid and past its due date.
    • PAIDA payment has been recorded.
  • totalsTotals!Required

    Subtotal, GST and total, all in paise, worked out by the server.

    Example: {"subtotal":130000,"discount":10000,"taxable":120000,"gstRate":18,"supply":"INTER","cgst":0,"sgst":0,"igst":21600,"gst":21600,"total":141600}

    Show children
    • cgstFloat!Required

      Central GST; 0 unless supply is INTRA.

      Example: 0

    • discountFloat!Required

      The discount applied. Never more than the subtotal.

      Example: 10000

    • gstFloat!Required

      Total GST: cgst + sgst + igst.

      Example: 21600

    • gstRateFloat!Required

      The GST percentage applied; 0 when supply is NONE.

      Example: 18

    • igstFloat!Required

      Integrated GST; 0 unless supply is INTER.

      Example: 21600

    • sgstFloat!Required

      State GST; 0 unless supply is INTRA.

      Example: 0

    • subtotalFloat!Required

      Sum of the line amounts.

      Example: 130000

    • supplyGstSupply!Required

      Whether CGST + SGST or IGST applies.

      Example: "INTER"

      • INTERDifferent states: IGST.
      • INTRAShop and customer are in the same state: CGST + SGST.
      • NONEThe shop has no GSTIN, so no GST is charged.
    • taxableFloat!Required

      Subtotal less discount.

      Example: 120000

    • totalFloat!Required

      Taxable plus GST.

      Example: 141600

  • updatedAtString!Required

    UTC time of the last change.

    Example: "2026-10-12T04:30:00.000Z"

Used by

Search documentation

Search operations, types and errors from the generated contract.