Saf-t PT suportado

Invoic€xpress

  • PT
  • EN
API

invoices.email-invoice

Sends the invoice by email

You call this method by submitting a HTTP PUT request to the following URL :

https://:screen-name.invoicexpress.net/invoice/:invoice-id/email-invoice.xml

Example xml to be submitted with the updated invoice data:

<?xml version="1.0" encoding="UTF-8"?>
<message>
    <client>
        <email>client@clientcompany.com</email>
        <save>1</save>
    </client>
    <cc>ccguy@ clientcompany.com</cc>
    <bcc>bccguy@ clientcompany.com</bcc>
    <subject>invoice from company</subject>
    <body>this is where the email body goes</body>
</message>

Parameters

Parameters are the data you will pass with the call.

api_key

Your secret identifier. You find your API Key under Account Overview in the Account section.
Rules: Required

invoice-id

Id of the invoice to change state.
Rules: Required

message / client / email

Invoice will be sent to this email address
Rules: Required. Must be a valid email address ex:foo@bar.com

message / client /save

save this email as your client email address

  • 0 – Does not save the email for the current client assigned to invoice
  • 1 – Save / Update the email for the current client assigned to invoice

Rules: Required

message / cc

Email CC field
Rules: Optional. Must be a valid email address ex:foo@bar.com

message / bcc

Email BCC field
Rules: Optional. Must be a valid email address ex:foo@bar.com

Return Values

Success

HTTP: 200 OK

Error

HTTP: 401 Access denied
The API Key parameter is missing or incorrect.


HTTP: 404 Not Found
No invoice matches the :invoice-id supplied.


HTTP: 422 Unprocessable Entity
Some of the parameters were incorrect.

Possible errors:

<?xml version="1.0" encoding="UTF-8"?>
<errors>
 <error>No content type or wrongly specified.</error>
</errors>
<?xml version="1.0" encoding="UTF-8"?>
<errors>
 <error>Client:  is an invalid email</error>
 <error>CC:  is an invalid email</error>
 <error>BCC:  is an invalid email</error>
</errors>