Send a Pro Forma Invoice by Email
If you are using the contract-based REST API to integrate MYOB Acumatica with an external system, this external system can create pro forma invoices and send them by email. For details about pro forma invoices, see Pro Forma Invoices: General Information.
Testing of the Request
Sending a pro forma invoice by email is a final stage of a more common task of creating and sending a pro forma invoice by email.
If you were performing the overall process of creating and sending a pro forma invoice by email, you (or another employee) would perform the following general steps:
- Create a Project from a Project Template
- Make a Project Active
- Specify the Next Billing Date for a Project
- Retrieve a Project Task
- Activate a Project Task
- Specify the Progress of a Project Task
- Invoke Project Billing
- Retrieve the List of Pro Forma Invoices of a Project
- Send a Pro Forma Invoice by Email
- Deploy a new MYOB Acumatica instance with the U100 dataset. For details on deploying an instance, see To Deploy an MYOB Acumatica Instance.
- On the Enable/Disable Features (CS100000) form, make sure the Projects feature is enabled.
- To sign in to the instance in the client application, use the tenant name (which you specified when you created the instance) and the HEADOFFICE branch.
- If you use Postman as the client application for testing, in the IntegrationDevelopmentGuide.postman_collection.json collection (which is located in the IntegrationDevelopment\Help folder of the Help-and-Training-Examples repository on GitHub), make sure the collection variables have the proper values.
Requests
You can use the following sequence of examples of HTTP requests to send a pro forma invoice by email through the contract-based REST API. You will use theRefNbr
value of the pro forma invoice that is retrieved in
Retrieve the List of Pro Forma Invoices of a Project.<MYOB Acumatica instance URL>
is the URL of the MYOB Acumatica
instance (such as https://my.acumatica.com/MyInstance
). You can omit
the instance name in the URL (such as https://my.acumatica.com
) if the
instance is installed in the root of the website.Do the following:
- Send the pro forma invoice by
email.
POST /EmailProFormaInvoice HTTP/1.1 Host: [<MYOB Acumatica instance URL>]/entity/Default/23.200.001/ProFormaInvoice Accept: application/json Content-Type: application/json { "entity" : { "RefNbr": { "value": "000019" } } } HTTP/1.1 202 Accepted Location: [/<MYOB Acumatica instance URL>]/entity/Default/23.200.001/ ProFormaInvoice/EmailProFormaInvoice/status/a4caa455-0eed-4c11-a5a9-2a8333e53db1
- Monitor the status of the operation until the system returns the 204 No
Content
code.
GET /EmailProFormaInvoice/status/a4caa455-0eed-4c11-a5a9-2a8333e53db1 HTTP/1.1 Host: [<MYOB Acumatica instance URL>]/entity/Default/23.200.001/ProFormaInvoice Accept: application/json Content-Type: application/json HTTP/1.1 204 No Content
Usage Notes
For a pro forma invoice to be created from the project, the project must have the Customer, BillingRule, BillingPeriod, and NextBillingDate values specified, and must have the Active status. Because of data validation in the project, NextBillingDate cannot be specified for a project with the In Planning status, and you cannot change the customer in a project with the Active status. Therefore, these settings can be specified only in multiple API calls.