Skip to main content
All Collections
Create a sales voucher and modify the payment method on the installments.
Create a sales voucher and modify the payment method on the installments.

How to create a sales voucher and modify the payment method on the installments via APIs.

Lara Litrico avatar
Written by Lara Litrico
Updated over 2 weeks ago

To create a sales voucher and modify the payment method on the installments, follow the steps listed below:

  1. Create the sales voucher and retrieve the voucherId.

  2. Retrieve the document id and the idrate.

  3. Modify the payment method on the installment.


Create the sales voucher and retrieve the voucherId.

To create the manual invoice or sales voucher, perform a POST request to voucher as follows:

API Endpoint

With the following payload:

{
"lines": [
{
"customer": {
"customerNumber": 1,
"name": "Cliente 1",
"self": "https://rest.reviso.com/customers/1"
},
"amount": 150.00,
"amountInBaseCurrency": 150.00,
"booked": false,
"currency": "EUR",
"entryNumber": 293,
"invoiceReference": "1",
"systemGeneratedVatLine": false,
"isGainOrLossEntry": false,
"text": "Cliente 1",
"vatDate": "2025-02-28"
},
{
"contraAccount": {
"accountNumber": 5805522,
"name": "Merci c/vendite iva al 22%",
"self": "https://rest.reviso.com/accounts/5805522"
},
"contraVatAccount": {
"isTotalVatAccountIncluded": false,
"vatCode": "V022",
"self": "https://rest.reviso.com/vat-accounts/V022"
},
"contraVatAmount": -27.05,
"contraVatAmountInBaseCurrency": -27.05,
"amount": 150.00,
"amountInBaseCurrency": 150.00,
"booked": false,
"currency": "EUR",
"entryNumber": 294,
"systemGeneratedVatLine": false,
"isGainOrLossEntry": false,
"text": "Cliente 1",
"vatDate": "2025-02-28"
}
],
"attachment": "https://rest.reviso.com/vouchers/drafts/372/attachment",
"vatDate": "2025-02-28",
"numberSeries": {
"numberSeriesNumber": 17,
"self": "https://rest.reviso.com/number-series/17"
},
"remainder": 150.00,
"remainderInDefaultCurrency": 150.00,
"totalAmount": 150.00,
"paymentTerms": {
"paymentTermsNumber": 11,
"self": "https://rest.reviso.com/payment-terms/11"
},
"version2Draft": false,
"booked": false,
"voucherType": "manualDebtorInvoice",
"date": "2025-02-28",
"voucherId": 372,
"voucherNumber": {
"displayVoucherNumber": "FVM1",
"prefix": "FVM",
"voucherNumber": 1
},
"self": "https://rest.reviso.com/vouchers/drafts/372"
}

After performing the POST, retrieve the voucherId of the voucher just created from the response.

For example: "voucherId": 372


Retrieve the document id and the idrate.

To retrieve the document id and the idrate, you need to perform a GET request on Payment Management, filtering by the voucherId just retrieved.

API Endpoint


Modify the payment method on the installment.

To modify the payment method, perform a PUT request on Payment Management, filtering by the document id retrieved from the previous GET.

API Endpoint

and use the following payload, replacing the "id" value of the method with the one you want to update.

"method": {
"id": 1,

{"id":37468320,"voucher":{"type":"ManualCustomerInvoice","id":372,"voucherNumber":"FVM1","date":"2025-02-28","voucherText":null},"type":"Invoice","amount":150,"amountInBaseCurrency":150,"date":null,"owner":{"entityNumber":1,"type":"Customer"},"bankAccount":null,"rates":[{"id":83945481,"dueDate":"2025-03-30","amount":150,"amountInBaseCurrency":150,"paidAmount":0,"status":{"id":1,"self":"https://reviso-payment-management-app.azurewebsites.net/api/rate-status/1"},"method":{"id":"1","name":"Bank transfer"},"matches":[],"invoiceNumber":"1","voucherLineText":"testo auto generato: cliente 1, 2025-03-30 150.00 EUR","distintaDocumentLink":null,"electronicBankDocumentType":null,"electronicBankDocumentLink":null,"exportDate":null,"exportId":null,"exported":false,"self":"https://reviso-payment-management-app.azurewebsites.net/api/rates/83945481"}],"currency":"EUR","self":"https://reviso-payment-management-app.azurewebsites.net/api/documents/37468320","tenderContractNumber":null}

Related contents

Did this answer your question?