Edara API v3: Tax Invoices
Read the guide first: authentication, paging, errors, rate limits and the shared PagedResult, BatchResult and *Reference shapes.
GET /v3/tax-invoices/nr-report: Gets the notes receivable report.GET /v3/tax-invoices/np-report: Gets the notes payable report.POST /v3/tax-invoices/taxable-sales-invoices: Creates a taxable sales invoice.
Endpoints
GET /v3/tax-invoices/nr-report: Gets the notes receivable report.
Operation GetNrReport · permission read:tax-invoice-report
Responses: OK TaxInvoiceReportResponse: Notes receivable report. · NotFound ProblemDetails: No report rows were found.
Notes
- The report takes no parameters. It always returns the notes that are not yet collected, with no date limit.
- The response is a generic table.
columnslists each column's name and data type, androwsholds one object per row. Empty values are null. - When there is no data, the endpoint returns
404instead of an empty table, so handle404as an empty report.
GET /v3/tax-invoices/np-report: Gets the notes payable report.
Operation GetNpReport · permission read:tax-invoice-report
Responses: OK TaxInvoiceReportResponse: Notes payable report. · NotFound ProblemDetails: No report rows were found.
Notes
- The report takes no parameters. It always returns the notes that are not yet collected.
- The response has the same generic
columnsandrowsshape as the notes receivable report. - When there is no data, the endpoint returns
404instead of an empty table, so handle404as an empty report.
POST /v3/tax-invoices/taxable-sales-invoices: Creates a taxable sales invoice.
Operation CreateTaxableSalesInvoice · permission create:taxable-sales-invoice
Body: CreateTaxableSalesInvoiceRequest
| field | type | default | validation | description |
|---|---|---|---|---|
salesOrderCode |
string |
NotEmpty() | The source sales order code. | |
invoiceNumber |
int |
NotEmpty() .GreaterThan(0) | The taxable invoice number to assign. | |
date |
DateTime? |
NotNull() | The taxable invoice date. |
Responses: Created TaxableSalesInvoiceResponse: Taxable sales invoice created. · NotFound ProblemDetails: The related SI/IO/SO chain could not be resolved.
Business errors (HTTP 409, match on errorCode):
CannotSaveWithZeroQuantityOrPrice: At least one invoice line has zero quantity or zero price.DupplicatedDate: Another invoice already uses the same date or numbering combination.DupplicatedInvoiceNumber: Another invoice already uses the same invoice number.IO_SO_AlreadyHasRelatedInvoice: The source IO or SO already has a taxable invoice, so it cannot be created again.RelatedSalesOrderDeleted: The linked sales order record was deleted, so the taxable sales invoice cannot reference it.RelatedWorkorderDeleted: The linked work order record was deleted, so the taxable sales invoice cannot be built from it.
Notes
- The sales order must have exactly one related document whose code starts with SI. If it has none or more than one, the request returns
400, not404. - If that document has a related issue offering (IO) document, the invoice is built from the issue offering. Otherwise it is built from the sales order. If any of these documents is missing, the request returns
404. - If the source issue offering or sales order already has a tax invoice, the request returns
409IO_SO_AlreadyHasRelatedInvoice. - A customer with an empty name returns
409SecondPartyMandatoryError, even though this error is not listed for the endpoint. CannotSaveWithZeroQuantityOrPriceis returned only when a quantity is zero or less. A zero price does not trigger it.- The invoice code is SlsInv-{year}-{invoiceNumber}, using your
invoiceNumber. The year comes from the date of the source issue offering or sales order, not fromdate.dateis stored as the invoice date. - An
invoiceNumberalready used in the same year for another document of the same type returns409DupplicatedInvoiceNumber. You can also get409DupplicatedDate, andRelatedWorkorderDeletedorRelatedSalesOrderDeletedwhen the source document no longer exists. - Creating the invoice does not create an accounting journal entry.
Types
TaxInvoiceReportColumnResponse
Response describing a tax invoice report column.
| field | type | description |
|---|---|---|
name |
string |
The column name. |
type |
string |
The CLR type name for column values. |
TaxInvoiceReportResponse
Response describing a tax invoice report.
| field | type | description |
|---|---|---|
columns |
IReadOnlyCollection<TaxInvoiceReportColumnResponse> |
The ordered column definitions. |
rows |
IReadOnlyCollection<TaxInvoiceReportRowResponse> |
The ordered report rows. |
TaxInvoiceReportRowResponse
Response describing a tax invoice report row.
| field | type | description |
|---|---|---|
values |
IDictionary<string,object> |
The row values keyed by column name. |
TaxableSalesInvoiceResponse
Response describing a created taxable sales invoice.
| field | type | description |
|---|---|---|
invoiceCode |
string |
The created invoice code. |