Skip to main content

Invoice Service

Invoice is a document issued by a seller to the buyer that indicates the quantities and costs of the products or services provider by the seller. Invoice specifies what a buyer must pay the seller according to the seller’s payment terms. Payment terms indicate the maximum amount of time that a buyer has to pay for the goods and/or services that they have purchased from the seller.

SalesInvoiceRequest Object

Attributes


AttributeTypeDescription
openingInvoicebooleanHas the value true if the invoice is opening invoice or false if the invoice is not opening invoice.
totalAmountBigDecimalTotal amount of invoice.
payableAccountCodestringAccount code of contact's account payable.
taxAmountBigDecimalTax amount of invoice.
openingDocumentNumberstringOpening document number of invoice.
warehouseCodestringWarehouse code.
dropShipbooleanHas the value true if the invoice created for drop ship or false if the invoice is not created for drop ship.
backOrderbooleanHas the value true if the invoice is backorder or false if the invoice is not backorder.
statusenumStatus of the invoice. Possible values for invoice status.
customFieldjsonobjectKey-value pair for custom field name and its value.
attachmentIdslistAttachment ids of invoice.
contactCodestringContact code.
linkedDocumentsarrayArray of linked documents associated with invoice.
purchaseOrderRefNostringPurchase order reference number.
journalEntryCodestringJournal entry code associated with invoice.
currencystringCurrency code of invoice.
exchangeRateBigDecimalExchange rate.
salesInvoiceDatestringSales invoice date.
salesInvoiceDueDatestringSales invoice due date.
memostringMemo of the invoice.
attachmentsarrayArray of file attachments.
unitPriceGstInclusivebooleanHas the value true if the unit price is inclusive of GST or false if the unit price is exclusive of GST.
dueAmountBigDecimalDue amount of invoice.
recurringbooleanHas the value true if the invoice is recurring invoice or false if the invoice is not recurring invoice.
recurringActivatedbooleanHas the value true if the recurring is activated for invoice or false if the recurring is de-activated for invoice.
salesInvoiceRecurringobjectRecurring details for the invoice. Attributes of Sales Invoice Recurring Details.
salesInvoiceItemslistList of items associated with invoice. Attributes of Sales Invoice Items.
contactobjectContact information. Attributes for ContactInfo.
shipFromobjectShip from address. Attributes for Address.
shipToobjectShip to address. Attributes for Address.
billToobjectBill to address. Attributes for Address.
shipByDatestringShip by date.
fulfillmentStatusenumFulfillment status of invoice. Possible values for Fulfillment status.
draftbooleanHas the value true if the invoice is in draft state or false if the invoice is not in draft state.
fulfillmentCompletebooleanHas the value true if auto fulfilled is required. or false if auto fulfilled is not required.
documentSequenceCodestringUnique code is associated with invoice.
sequenceFormatstringSequence format id.

API


Create Invoice

Creates a new invoice.

Parameters

Code

  @Autowired
private InvoicesApiClient invoicesApiClient;

public SalesInvoiceResponse createInvoice(SalesInvoiceRequest salesInvoiceRequest, String accessToken){
return this.invoicesApiClient.createInvoice(salesInvoiceRequest, accessToken);
}

Retrieve Invoice

Retrieves the details of an existing invoice. You only need to supply the unique invoice code that was returned upon invoice creation.

Parameters

Code

  @Autowired
private InvoicesApiClient invoicesApiClient;

public SalesInvoiceResponse getInvoiceByCode(String invoiceCode, String accessToken){
return this.invoicesApiClient.getInvoiceByCode(invoiceCode, accessToken);
}

List All Invoices

Returns list of invoices.

Parameters

Code

  @Autowired
private InvoicesApiClient invoicesApiClient;

public SalesInvoices getAllSalesInvoice(String accessToken, Integer limit, Integer page, String status){
return this.invoicesApiClient.getAllSalesInvoice(accessToken, limit, page, status);
}

Objects


Address

AttributeTypeDescription
address1stringAddress line 1.
address2stringAddress line 2.
countrystringCountry.
statestringState.
citystringCity.
postalCodestringPostal Code.
preferredbooleanHas the value true if the address is default or false if the address is not default address.

ContactInfo

AttributeTypeDescription
namestringContact name.
addressstringAddress of the contact.
peppolIdstringPeppolId of the contact.

SalesInvoiceItemDetails

AttributeTypeDescription
idlongUnique identifier for item.
productCodestringProduct code of the item.
productDescriptionstringProduct description of the item.
productQuantityBigDecimalProduct quantity of the item.
unitPriceBigDecimalUnit price of the item.
discountBigDecimalDiscount on the item.
discountInPercentbooleanHas the value true if discount is in percentage. or false if discount is not in percentage.
taxCodestringTax code of the item.
taxAmountBigDecimalTax amount of the item.
totalAmountBigDecimalTotal amount of the item.
productOrderintProduct view order.
salesInvoiceItemCodestringSales Invoice Item Code.
typeobjectType of the item. Possible values for ProductType.

SalesInvoiceRecurringDetails

AttributeTypeDescription
idlongUnique identifier for item.
recurrenceTypeintEvery x Days/Weeks/Months.
recurrenceFrequencyenumRecurrence frequency. Possible values for Recurring Frequency Type.
invoiceRecurringCountintNumber of Invoices to be created.
recurrenceEndDatestringRecurrence End date.

Enums


INVOICE_STATUS

  • OPEN
  • DRAFT
  • CLOSED

FULFILLMENT_STATUS

  • UNFULFILLED
  • PARTIAL_FULFILLED
  • FULLY_FULFILLED

ProductType

  • TRACKED
  • NONTRACKED
  • BILL_OF_MATERIALS

RECURRING_FREQUENCY_TYPE

  • DAYS
  • WEEK
  • MONTH