Sales Invoices API
Update sales invoice
Changed onCertain details of an existing sales invoice can be updated. For draft it is all values listed below, but for statuses paid and issued there are certain additional requirements (paymentDetails and emailDetails, respectively).
patch/v2/sales-invoices/{salesInvoiceId}
Request
- Base URLhttps://api.mollie.com
- URLhttps://api.mollie.com/v2/sales-invoices/{salesInvoiceId}
- Auth
- HTTP bearer
- or HTTP bearer
- or OAuth 2Authorization code: https://my.mollie.com/oauth2/authorizeToken URL: https://api.mollie.com/oauth2/tokens scopes: sales-invoices.write
Headers
idempotency-keystring
Example:123e4567-e89b-12d3-a456-426
A unique key to ensure idempotent requests. This key should be a UUID v4 string.
Request body
Example request
{
"status": "draft",
"memo": "An updated memo!",
"paymentTerm": "30 days",
"paymentDetails": {
"source": "payment-link",
"sourceReference": "pl_d9fQur83kFdhH8hIhaZfq"
},
"emailDetails": {
"subject": "Your invoice is available",
"body": "Please find your invoice enclosed."
},
"recipientIdentifier": "customer-xyz-0123",
"recipient": {
"type": "consumer",
"title": "Mrs.",
"givenName": "Jane",
"familyName": "Doe",
"organizationName": "Organization Corp.",
"organizationNumber": "12345678",
"vatNumber": "NL123456789B01",
"email": "example@email.com",
"phone": "+0123456789",
"streetAndNumber": "Keizersgracht 126",
"streetAdditional": "4th floor",
"postalCode": "5678AB",
"city": "Amsterdam",
"region": "Noord-Holland",
"country": "NL",
"locale": "nl_NL"
},
"lines": [
{
"description": "LEGO 4440 Forest Police Station",
"quantity": 1,
"vatRate": "21.00",
"unitPrice": {
"currency": "EUR",
"value": "10.00"
},
"discount": {
"type": "amount",
"value": "10.00"
}
}
],
"discount": {
"type": "amount",
"value": "10.00"
}
}Response
The sales invoice object.
Example response
{
"resource": "sales-invoice",
"id": "invoice_4Y0eZitmBnQ6IDoMqZQKh",
"mode": "live",
"invoiceNumber": "INV-0000001",
"profileId": "pfl_QkEhN94Ba",
"status": "draft",
"eInvoiceStatus": "issuing",
"vatScheme": "standard",
"vatMode": "exclusive",
"memo": "This is a memo!",
"paymentTerm": "30 days",
"paymentDetails": [
{
"source": "payment-link",
"sourceReference": "pl_d9fQur83kFdhH8hIhaZfq"
}
],
"emailDetails": {
"subject": "Your invoice is available",
"body": "Please find your invoice enclosed."
},
"customerId": "cst_8wmqcHMN4U",
"mandateId": "mdt_pWUnw6pkBN",
"recipientIdentifier": "customer-xyz-0123",
"recipient": {
"type": "consumer",
"title": "Mrs.",
"givenName": "Jane",
"familyName": "Doe",
"organizationName": "Organization Corp.",
"organizationNumber": "12345678",
"vatNumber": "NL123456789B01",
"email": "example@email.com",
"phone": "+0123456789",
"streetAndNumber": "Keizersgracht 126",
"streetAdditional": "4th floor",
"postalCode": "5678AB",
"city": "Amsterdam",
"region": "Noord-Holland",
"country": "NL",
"locale": "nl_NL"
},
"lines": [
{
"description": "LEGO 4440 Forest Police Station",
"quantity": 1,
"vatRate": "21.00",
"unitPrice": {
"currency": "EUR",
"value": "10.00"
},
"discount": {
"type": "amount",
"value": "10.00"
}
}
],
"discount": {
"type": "amount",
"value": "10.00"
},
"amountDue": {
"currency": "EUR",
"value": "10.00"
},
"subtotalAmount": {
"currency": "EUR",
"value": "10.00"
},
"totalAmount": {
"currency": "EUR",
"value": "10.00"
},
"totalVatAmount": {
"currency": "EUR",
"value": "10.00"
},
"discountedSubtotalAmount": {
"currency": "EUR",
"value": "10.00"
},
"createdAt": "2024-03-20T09:13:37+00:00",
"issuedAt": "2024-10-03T10:47:38+00:00",
"paidAt": "2024-10-04T10:47:38+00:00",
"dueAt": "2024-11-01T10:47:38+00:00",
"_links": {
"self": {
"href": "https://...",
"type": "application/hal+json"
},
"invoicePayment": {
"href": "https://...",
"type": "application/hal+json"
},
"pdfLink": {
"href": "https://...",
"type": "application/hal+json"
},
"documentation": {
"href": "https://...",
"type": "application/hal+json"
},
"next": {
"href": "https://...",
"type": "application/hal+json"
},
"previous": {
"href": "https://...",
"type": "application/hal+json"
}
}
}Changes
- breaking
removed the enum value
payment_reversedof the request property//// - warning
added the new
payment-reversedenum value to the/response property for the response status - info
added the new
payment-reversedenum value to the request property//// - info
removed the
payment_reversedenum value from the/response property for the response status
- breaking
- info
added the new
payment_reversedenum value to the request property////
- info