Saf-t PT Suportado

InvoiceXpress API

purchase_orders.email-document

Sends the purchase order by email

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

https://:screen-name.invoicexpress.net/purchase_orders/:purchase-order-id/email-document.xml

Example xml to be submitted:

<?xml version="1.0" encoding="UTF-8"?>
<message>
    <supplier>
        <email>supplier@suppliercompany.com</email>
        <save>1</save>
    </supplier>
    <cc>ccguy@ suppliercompany.com</cc>
    <bcc>bccguy@ suppliercompany.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

purchase-order-id

Id of the purchase order to send email
Rules: Required

message / supplier / email

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

message / supplier /save

save this email as your supplier email address

  • 0 – Does not save the email for the current supplier assigned to purchase order
  • 1 – Save / Update the email for the current supplier assigned to purchase order

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 purchase order matches the :purchase-order-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>Email:  is an invalid email</error>
 <error>CC:  is an invalid email</error>
 <error>BCC:  is an invalid email</error>
</errors>