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/5b2c0f2e-1d4a-4c8b-9f3a-7e1a2b3c4d5e/send" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Example Request — override recipient

curl -X POST "https://cart.easy.tools/api/v1/invoices/5b2c0f2e-1d4a-4c8b-9f3a-7e1a2b3c4d5e/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"
}

Invoice Not Found (404)

{
"message": "Invoice with ID <UUID> not found"
}

Validation Error (422)

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 (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."
}