FTOS_TPM_InsertInvoiceDetails
Inserts an invoice detail for the specified third-party invoice in Draft
status based on the information contained in the requested pre-invoice detail record. If more pre-invoice details are specified, the system inserts an invoice detail for each of them. The requested pre-invoice details must be still unattached to another invoice. If the invoice detail is successfully inserted into the invoice, the pre-invoice detail on which the invoice detail was based upon becomes unavailable to be attached to another invoice, as its Invoiced
field becomes True
.
Syntax
The FTOS_TPM_InsertInvoiceDetails
custom endpoint is called from within the Endpoint API
endpoint. Visit the Endpoint API
page for more details.
POST <host_address>/ftosapi/automation-processors/actions/FTOS_TPM_InsertInvoiceDetails
Content-Type: application/json
{
"invoiceNo": "<Draft_invoice_number>",
"preInvoiceDetailNos": ["<pre_invoice_number_1>", "<pre_invoice_number_2>", "<pre_invoice_number_n>"]
}
Here's a list of the available parameters:
Parameter | Description |
---|---|
host_address | URL of the FintechOS Platform server. |
invoiceNo | Mandatory, text. The invoice number you wish to insert details into, in Draft status. |
preInvoiceDetailNos | Mandatory, text. The pre-invoice detail numbers you wish to add as invoice details to the invoice, separated by commas. You must send at least one item. The requested pre-invoice details must be still unattached to another invoice. |
Response
The response indicates the result of the code execution and the number of the newly created invoice detail(s). The number of each invoice detail created is the same as the number of the pre-invoice detail on which it is based upon.
Example
To insert an invoice detail, based on a pre-invoice detail, to the specified invoice in Draft
status, send the following request, making sure you replace the parameter values with your own values. The requested pre-invoice detail must be still unattached to another invoice. The pre-invoice detail on which the invoice detail was based upon becomes unavailable to be attached to another invoice, as its Invoiced
field becomes True
.
Request
POST https://FintechOSStudio/ftosapi/automation-processors/actions/FTOS_TPM_InsertInvoiceDetails
Content-Type: application/json
{
"invoiceNo": "TPMI000001047",
"preInvoiceDetailNos": ["12490"]
}
Response
{
"IsSucces": true,
"InvoiceDetailNo": [
"12490"
]
}