curl --request POST \
--url https://app.pennylane.com/api/external/v2/customer_invoices/create_from_quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"quote_id": 42,
"draft": true,
"external_reference": "FR123",
"customer_invoice_template_id": 42
}'
{
"id": 42,
"label": "Invoice label",
"invoice_number": "F20230001",
"currency": "EUR",
"amount": "230.32",
"currency_amount": "230.32",
"currency_amount_before_tax": "196.32",
"exchange_rate": "1.0",
"date": "2023-08-30",
"deadline": "2020-09-02",
"currency_tax": "34.0",
"tax": "34.0",
"language": "fr_FR",
"paid": false,
"status": "archived",
"discount": {
"type": "absolute",
"value": "25"
},
"ledger_entry": {
"id": 42002
},
"public_file_url": "https://app.pennylane.com/public/invoice/pdf?encrypted_id=bzjoVJe...3D%3D",
"filename": "my_file.pdf",
"remaining_amount_with_tax": "20.0",
"remaining_amount_without_tax": "16.0",
"draft": false,
"special_mention": "Additional details",
"customer": {
"id": 42,
"url": "https://app.pennylane.com/api/external/v2/customers/42"
},
"invoice_line_sections": {
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/42/invoice_line_sections"
},
"invoice_lines": {
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/42/invoice_lines"
},
"custom_header_fields": {
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/42/custom_header_fields"
},
"categories": {
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/42/categories"
},
"pdf_invoice_free_text": "Thanks for paying this invoice",
"pdf_invoice_subject": "Invoice subject",
"pdf_description": "Invoice description",
"billing_subscription": {
"id": 123
},
"credited_invoice": {
"id": 40,
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/40"
},
"customer_invoice_template": {
"id": 123
},
"transaction_reference": {
"banking_provider": "bank",
"provider_field_name": "label",
"provider_field_value": "invoice_number"
},
"payments": {
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/42/payments"
},
"matched_transactions": {
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/42/matched_transactions"
},
"appendices": {
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/42/appendices"
},
"quote": {
"id": 42
},
"external_reference": "FR123",
"archived_at": "2023-08-30T10:08:08.146343Z",
"created_at": "2023-08-30T10:08:08.146343Z",
"updated_at": "2023-08-30T10:08:08.146343Z"
}
This endpoint allows you to create a customer invoice from an existing quote. The invoice will inherit the quote’s data (customer, lines, etc.).
ℹ️ This endpoint requires one of the following scopes:
customer_invoices:all
curl --request POST \
--url https://app.pennylane.com/api/external/v2/customer_invoices/create_from_quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"quote_id": 42,
"draft": true,
"external_reference": "FR123",
"customer_invoice_template_id": 42
}'
{
"id": 42,
"label": "Invoice label",
"invoice_number": "F20230001",
"currency": "EUR",
"amount": "230.32",
"currency_amount": "230.32",
"currency_amount_before_tax": "196.32",
"exchange_rate": "1.0",
"date": "2023-08-30",
"deadline": "2020-09-02",
"currency_tax": "34.0",
"tax": "34.0",
"language": "fr_FR",
"paid": false,
"status": "archived",
"discount": {
"type": "absolute",
"value": "25"
},
"ledger_entry": {
"id": 42002
},
"public_file_url": "https://app.pennylane.com/public/invoice/pdf?encrypted_id=bzjoVJe...3D%3D",
"filename": "my_file.pdf",
"remaining_amount_with_tax": "20.0",
"remaining_amount_without_tax": "16.0",
"draft": false,
"special_mention": "Additional details",
"customer": {
"id": 42,
"url": "https://app.pennylane.com/api/external/v2/customers/42"
},
"invoice_line_sections": {
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/42/invoice_line_sections"
},
"invoice_lines": {
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/42/invoice_lines"
},
"custom_header_fields": {
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/42/custom_header_fields"
},
"categories": {
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/42/categories"
},
"pdf_invoice_free_text": "Thanks for paying this invoice",
"pdf_invoice_subject": "Invoice subject",
"pdf_description": "Invoice description",
"billing_subscription": {
"id": 123
},
"credited_invoice": {
"id": 40,
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/40"
},
"customer_invoice_template": {
"id": 123
},
"transaction_reference": {
"banking_provider": "bank",
"provider_field_name": "label",
"provider_field_value": "invoice_number"
},
"payments": {
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/42/payments"
},
"matched_transactions": {
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/42/matched_transactions"
},
"appendices": {
"url": "https://app.pennylane.com/api/external/v2/customer_invoices/42/appendices"
},
"quote": {
"id": 42
},
"external_reference": "FR123",
"archived_at": "2023-08-30T10:08:08.146343Z",
"created_at": "2023-08-30T10:08:08.146343Z",
"updated_at": "2023-08-30T10:08:08.146343Z"
}
The access token received from the authorization server in the OAuth 2.0 flow.
Renders the created invoice from quote
The response is of type object
.
Was this page helpful?