Skip to main content

Re-email an Invoice

Re-send an issued invoice's PDF to the customer by email.

Omit email to send to the invoice's original billing recipient; pass email to send to a different address.

The email is sent asynchronously

A 202 Accepted means the email was submitted to the send queue with the invoice PDF attached. It has not necessarily been delivered when the call returns.

Request​

POST /invoices/{id}/send

Path Parameters​

ParameterTypeRequiredDescription
idstringYesInvoice UUID

Request Body​

ParameterTypeRequiredDescription
emailstringNoRecipient email. Omit (or send null) to send to the invoice's original billing recipient.

Example Request — original recipient​

curl -X POST "https://cart.easy.tools/api/v1/invoices/001fd355-2cd4-4bb1-9fca-cf30e5eb76a8/send" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Example Request — override recipient​

curl -X POST "https://cart.easy.tools/api/v1/invoices/001fd355-2cd4-4bb1-9fca-cf30e5eb76a8/send" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "new.recipient@example.com"
}'

Response​

Success Response (202)​

Acknowledges that the invoice email was submitted. The email echoes the recipient it was sent to.

{
"message": "Invoice email submitted. It will be delivered once the queued notification is processed.",
"email": "anna.kowalska@example.com"
}

Response Fields​

FieldTypeNullableDescription
messagestringNoConfirmation that the email was submitted
emailstringNoThe recipient the invoice email was submitted to

Error Responses​

Bad Request (400)​

{
"message": "Invalid invoice ID"
}

Not Found Error (404)​

{
"message": "Invoice with ID c9d1f6b3-4a8e-4d2c-9b7f-3e5a1c8d6b29 not found"
}

Validation Error (422 Unprocessable Entity)​

Returned when email is present but not a valid email address.

{
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field must be a valid email address."
]
}
}

Cannot Be Sent (422)​

Returned when the invoice has not been issued yet, when it has no associated transaction to send to, or when no recipient is available and none was provided.

{
"message": "Invoice has not been issued yet and cannot be sent"
}
{
"message": "Invoice has no associated transaction and cannot be sent"
}
{
"message": "No recipient email is available for this invoice; provide one in the request body"
}

Unauthorized Error (401)​

{
"message": "Unauthenticated."
}

Unavailable (422)​

Returned when your store does not issue invoices through EasyTools invoicing.

{
"message": "Invoices are only available for stores using Easybilling."
}