Great News! To offer you an even better invoicing experience, Invoice Machine is officially joining invoicely on June 22nd, 2019.
Please make sure to switch to invoicely as soon as possible to continue using our platform.

Hook up your own application with The Machine's functionality.

invoice.send

This method let you send the invoice with the given id.

You call this method with the following URL:

Parameters

Parameters are the data you will pass with the call.

api_token

Your secret identifier. You find your API Token under Account Overview in the Account section.

Rules: Required

id

The ID of the invoice.

Rules: Required.

attach (optional)

Attach the invoice as a PDF file in the email.

Rules: If used, it must be set to ''true". Otherwise it will be ignored.

copy (optional)

Send a copy to yourself. The copy will be sent to your email address specified in your account.

Rules: If used, it must be set to ''true". Otherwise it will be ignored.

subject (optional)

Subject of email.

Rules: If this parameter is not set it will use your default send invoice subject from your Settings.

message (optional)

Message for email.

Rules: If this parameter is not set it will use your default send invoice message from your Settings. You can do a line break with {br}.

Return Values

This is the result that will be passed back to you when you have sent a call.

Success

Success: Invoice sent.

The invoice was successfully sent.

Error

Error: No data passed.

No data was passed to the method.

Error: API Token is invalid.

The API Token parameter is missing or incorrectly entered.

Error: ID is invalid.

The ID parameter is missing or incorrectly entered.

Example

The example below is strictly a demonstration of the method and it's parameters. Methods should never be posted from a HTML form. They should be posted directly from your server script.

<form action="http://machine_id.invoicemachine.com/api/invoice.send" method="post">
    <input type="hidden" name="api_token" value="c86cea54c71sbb05a5f8297bed641944">
    <input type="hidden" name="id" value="205092">
    <input type="hidden" name="attach" value="true">
    <input type="hidden" name="subject" value="Invoice">
    <input type="hidden" name="message" value="Hello.{br}Here is your invoice.">
</form>