Send a work report again
const url = 'https://example.com/work-reports/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/resend';const options = { method: 'POST', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"to":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/work-reports/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/resend \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "to": [ "example" ] }'Emails the report’s PDF again, on its own, to the addresses given: each address once, compared without case or spaces. The report, its number and its email status do not change; the resend is recorded with who sent it, when and to whom, and listed in the report’s resends. Only a numbered report the first email has dealt with (sent, failed or no_recipient) can be sent again: an incomplete report, a cancelled one, one still waiting to send and one whose customer was erased are refused with 409. A report can be resent 10 times a day, and a business can resend to 100 addresses an hour; past either, 429. The same addresses again within a minute return the first resend with 200 and send nothing more; a new resend returns 201. Send an Idempotency-Key to make a retry safe.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Request Bodyrequired
Section titled “Request Bodyrequired”object
The email addresses to send the report to, 1 to 20. Each address gets one email, compared without case or spaces. They are not saved to the customer.
Example generated
{ "to": [ "example" ]}Responses
Section titled “Responses”Already sent again to these addresses a moment ago; nothing more is sent
object
UUID v7
Sending: queued to go. sent: the email went to at least one address. failed: the email could not be sent; Bottle does not try again.
Example
{ "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "status": "sending"}Sending
object
UUID v7
Sending: queued to go. sent: the email went to at least one address. failed: the email could not be sent; Bottle does not try again.
Example
{ "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "status": "sending"}Not signed in
object
Example
{ "error": "not_found", "message": "Customer not found"}Not an owner or admin, or the plan does not open Assets
object
Example
{ "error": "not_found", "message": "Customer not found"}Not found, or Assets is not available to this business
object
Example
{ "error": "not_found", "message": "Customer not found"}Assets is switched off, or the report is incomplete, cancelled, still waiting to send or its customer’s details were erased
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}Resent too often: 10 times a day for one report, 100 addresses an hour for the business
object
Example
{ "error": "not_found", "message": "Customer not found"}