post
https://api.my-rent.net/rents/payment_invoice/
Create (and optionally issue) an advance invoice from a payment
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Creates an advance invoice from a payment recorded on a reservation, like the Generate invoice action on the payment in MyRent.
The invoice gets the reservation guest as the customer, one advance item with the payment amount and the payment method of the payment. One payment can have only one invoice.
issue | Result |
|---|---|
N (default) | Draft invoice without a number. It can still be edited and issued in MyRent. |
Y | The invoice is issued: it gets the next number and is locked. It is fiscalized automatically when the payment method has automatic fiscalization turned on in MyRent. |
Typical flow
- Add payment with
"return_id": "Y"and keep the returnedpayment_id. - Call this endpoint with that
payment_id. - Read the invoice with the returned
invoice_id(invoices/get/{invoice_id}).
Example request body
{
"type": "inv_advance",
"issue": "Y",
"worker_id": "15"
}
Responses
| Code | Meaning |
|---|---|
| 200 | Invoice created. |
| 400 | Unknown type, or no valid worker. |
| 401 | Missing or wrong b2b_guid / user_guid headers. |
| 403 | sorry: the payment does not belong to the account in the headers. |
| 409 | The payment already has an invoice. The body contains its invoice_id. |
